Index: podpress_functions.php
===================================================================
--- podpress_functions.php	(Revision 195094)
+++ podpress_functions.php	(Arbeitskopie)
@@ -82,11 +82,12 @@
 			}
 			return PODPRESSURL;
 		} else {
-			$result = get_settings('siteurl');
-			if(substr($result, -1, 1) != '/') {
-				$result .= '/';
-			}
-			return $result.'wp-content/plugins/podpress/';
+			//~ $result = get_settings('siteurl');
+			//~ if(substr($result, -1, 1) != '/') {
+				//~ $result .= '/';
+			//~ }
+			//~ return $result.'wp-content/plugins/podpress/';
+			return PODPRESS_URL.'/';
 		}
 	}
 
@@ -447,16 +448,12 @@
 
 		if($options['useSlimPlayer']) {
 			echo '<object type="application/x-shockwave-flash" width="150" height="170" ';
-			//echo 'data="'.podPress_url().'players/xspf_player_slim.swf?playlist_url='.get_settings('siteurl').'/playlist.xspf">'."\n";
 			echo 'data="'.podPress_url().'players/xspf_player_slim.swf?playlist_url='.get_feed_link('playlist.xspf').'">'."\n";
-			//echo '	<param name="movie" value="'.podPress_url().'players/xspf_player_slim.swf?playlist_url='.get_settings('siteurl').'/playlist.xspf" />'."\n";
 			echo '	<param name="movie" value="'.podPress_url().'players/xspf_player_slim.swf?playlist_url='.get_feed_link('playlist.xspf').'" />'."\n";
 			echo '</object>'."\n";
 		} else {
 			echo '<object type="application/x-shockwave-flash" width="150" height="170" ';
-			//echo 'data="'.podPress_url().'players/xspf_player.swf?playlist_url='.get_settings('siteurl').'/playlist.xspf">'."\n";
 			echo 'data="'.podPress_url().'players/xspf_player.swf?playlist_url='.get_feed_link('playlist.xspf').'">'."\n";
-			//echo '	<param name="movie" value="'.podPress_url().'players/xspf_player.swf?playlist_url='.get_settings('siteurl').'/playlist.xspf" />'."\n";
 			echo '	<param name="movie" value="'.podPress_url().'players/xspf_player.swf?playlist_url='.get_feed_link('playlist.xspf').'" />'."\n";
 			echo '</object>'."\n";
 		}
@@ -474,14 +471,8 @@
 			case 'feed':
 			case 'web':
 			case 'play':
-				$sqlI = "INSERT INTO ".$wpdb->prefix."podpress_statcounts (postID, media, $method) VALUES ($postID, '$media', 1)";
-				$sqlU = "UPDATE ".$wpdb->prefix."podpress_statcounts SET $method = $method+1, total = total+1 WHERE postID = '$postID' AND media = '$media'";
-				$wpdb->hide_errors();
-				$result = $wpdb->query($sqlI);
-				if(!$result) {
-					$wpdb->query($sqlU);
-				}
-				$wpdb->show_errors();
+				$sqlIoU = "INSERT INTO ".$wpdb->prefix."podpress_statcounts (postID, media, $method) VALUES ($postID, '$media', 1) ON DUPLICATE KEY UPDATE $method = $method+1, total = total+1";
+				$result = $wpdb->query($sqlIoU);
 				break;
 			default:
 				return;

