changeset 1025:b70103d4b5ba trunk

[svn] - make scrobbler work again.
author yaz
date Fri, 11 May 2007 20:59:58 -0700
parents 7cd2050c6f82
children ff0487e9d00d
files ChangeLog src/scrobbler/plugin.c
diffstat 2 files changed, 16 insertions(+), 5 deletions(-) [+]
line wrap: on
line diff
--- a/ChangeLog	Fri May 11 20:39:37 2007 -0700
+++ b/ChangeLog	Fri May 11 20:59:58 2007 -0700
@@ -1,3 +1,11 @@
+2007-05-12 03:39:37 +0000  Yoshiki Yazawa <yaz@cc.rim.or.jp>
+  revision [2212]
+  - migrate to audacious_drct API.
+  
+  trunk/src/song_change/song_change.c |   22 +++++++++++-----------
+  1 file changed, 11 insertions(+), 11 deletions(-)
+
+
 2007-05-12 01:35:51 +0000  Giacomo Lozito <james@develia.org>
   revision [2210]
   - evdev-plug: works again with auddrct
--- a/src/scrobbler/plugin.c	Fri May 11 20:39:37 2007 -0700
+++ b/src/scrobbler/plugin.c	Fri May 11 20:59:58 2007 -0700
@@ -11,7 +11,7 @@
 #include <audacious/ui_preferences.h>
 #include <audacious/playlist.h>
 #include <audacious/configdb.h>
-#include <audacious/beepctrl.h>
+#include <audacious/auddrct.h>
 #include <audacious/strings.h>
 #include <audacious/main.h>
 
@@ -30,7 +30,6 @@
 #include "fmt.h"
 #include "configure.h"
 
-#define XS_CS xmms_scrobbler.xmms_session
 #define XS_SLEEP 1
 #define HS_SLEEP 10
 
@@ -217,6 +216,10 @@
 	/* clear dosubmit */
 	dosubmit.dosubmit = dosubmit.pos_c = dosubmit.len = dosubmit.gerpok = 0;
 
+	/* make sure playlist != NULL */
+	if (!playlist)
+		return dosubmit;
+
 	/* current music number */
 	pos_c = playlist_get_position(playlist);
 	/* current file name */
@@ -228,7 +231,7 @@
 	/* total number */
 	playlistlen_c = playlist_get_length(playlist);
 	/* current playtime */
-	playtime_c = playback_get_time(); 
+	playtime_c = audacious_drct_get_time(); 
 	/* total length */
 	len = playlist_get_songtime(playlist, pos_c); 
 
@@ -237,9 +240,9 @@
 	time_c = timetmp.tv_sec * 1000 + timetmp.tv_usec / 1000; 
 
 	/* current status */
-	if( playback_get_paused(XS_CS) ) {
+	if( audacious_drct_get_paused() ) {
 		ps_c = ps_pause;
-	}else if( playback_get_playing(XS_CS) ) {
+	}else if( audacious_drct_get_playing() ) {
 		ps_c = ps_play;
 	}else{
 		ps_c = ps_stop;