summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorpb1dft <pb1dft@ampache>2007-02-27 00:29:38 +0000
committerpb1dft <pb1dft@ampache>2007-02-27 00:29:38 +0000
commitb523809de9e2d15de782213803c7fd5ef8c7e206 (patch)
tree2c41f6357af7cab9924ce436f02796525aea5e01
parentc16d101fc29652561211866ca30d093b13d3aa19 (diff)
downloadampache-b523809de9e2d15de782213803c7fd5ef8c7e206.tar.gz
ampache-b523809de9e2d15de782213803c7fd5ef8c7e206.tar.bz2
ampache-b523809de9e2d15de782213803c7fd5ef8c7e206.zip
Global Fav albums/artist fixed
-rw-r--r--contrib/plugins/RioPlayer/modules/rio/rio.conf12
-rw-r--r--contrib/plugins/RioPlayer/modules/rio/rio.php11
2 files changed, 15 insertions, 8 deletions
diff --git a/contrib/plugins/RioPlayer/modules/rio/rio.conf b/contrib/plugins/RioPlayer/modules/rio/rio.conf
index 1a9aaa30..3c4c9a1b 100644
--- a/contrib/plugins/RioPlayer/modules/rio/rio.conf
+++ b/contrib/plugins/RioPlayer/modules/rio/rio.conf
@@ -48,7 +48,7 @@ de_private_playlists=0
// 0=Track receivers individually (default)
// 1=Group receivers together
- group_receivers_together=0
+ group_receivers_together=1
// Next you must specify if you want ampache to automatically create the users to associate the receivers with.
@@ -143,11 +143,11 @@ de_private_playlists=0
// 100 entries will be used.
// Specify how many of each type you want to appear on the list.
- favorites_newest_albums=5
- favorites_global_most_popular_albums=5
- favorites_user_most_popular_albums=5
- favorites_global_most_popular_artists=5
- favorites_user_most_popular_artists=5
+ favorites_newest_albums=10
+ favorites_global_most_popular_albums=10
+ favorites_user_most_popular_albums=10
+ favorites_global_most_popular_artists=10
+ favorites_user_most_popular_artists=10
// If you want to print divider/header lines "---<section>---" between each favorites section, set this:
diff --git a/contrib/plugins/RioPlayer/modules/rio/rio.php b/contrib/plugins/RioPlayer/modules/rio/rio.php
index 1c5f5930..e68e2a5f 100644
--- a/contrib/plugins/RioPlayer/modules/rio/rio.php
+++ b/contrib/plugins/RioPlayer/modules/rio/rio.php
@@ -622,7 +622,10 @@ require_once("../../lib/init.php");
$index++;
}
- $sql="SELECT album.name,sum(object_count.count) AS total_count FROM object_count LEFT JOIN album ON object_count.object_id=album.id WHERE object_count.object_type='album' GROUP BY object_count.object_id ORDER BY total_count DESC LIMIT $favorites_global_most_popular_albums";
+ $sql="SELECT a.name,COUNT(object_count.id) AS `count` FROM object_count, album as a ".
+ "WHERE object_type='album' AND a.id=object_count.object_id ".
+ "GROUP BY object_id ORDER BY `count` DESC LIMIT $favorites_global_most_popular_albums";
+ debug_event('RioPlayer',"FAV Albums (G):\n".$sql,1);
$db_results = mysql_query($sql);
while (($row=mysql_fetch_row($db_results)) && $index < 100) {
@@ -658,7 +661,11 @@ require_once("../../lib/init.php");
$index++;
}
- $sql="SELECT artist.name,sum(object_count.count) AS total_count FROM object_count LEFT JOIN artist ON object_count.object_id=artist.id WHERE object_count.object_type='artist' GROUP BY object_count.object_id ORDER BY total_count DESC LIMIT $favorites_global_most_popular_artists";
+// $sql="SELECT artist.name,sum(object_count.count) AS total_count FROM object_count LEFT JOIN artist ON object_count.object_id=artist.id WHERE object_count.object_type='artist' GROUP BY object_count.object_id ORDER BY total_count DESC LIMIT $favorites_global_most_popular_artists";
+ $sql="SELECT a.name,COUNT(object_count.id) AS `count` FROM object_count, artist as a ".
+ "WHERE object_type='artist' AND a.id=object_count.object_id ".
+ "GROUP BY object_id ORDER BY `count` DESC LIMIT $favorites_global_most_popular_artists";
+ debug_event('RioPlayer',"FAV Artist (G):\n".$sql,1);
$db_results = mysql_query($sql);
while (($row=mysql_fetch_row($db_results)) && $index < 100) {