# HG changeset patch # User nenolod # Date 1178901174 25200 # Node ID 69cf6184edef4ba19cfd108998b2f49f4b6e6857 # Parent af586df84c9bc5f6400c16f67bd8914e2bc24131 [svn] - make this work without controlsocket diff -r af586df84c9b -r 69cf6184edef ChangeLog --- a/ChangeLog Fri May 11 09:18:02 2007 -0700 +++ b/ChangeLog Fri May 11 09:32:54 2007 -0700 @@ -1,3 +1,11 @@ +2007-05-11 16:18:02 +0000 William Pitcock + revision [2192] + - lets avoid spawning >1 threads for metadata + + trunk/src/lastfm/lastfm.c | 151 ++++++++++++++++++++++------------------------ + 1 file changed, 75 insertions(+), 76 deletions(-) + + 2007-05-11 13:08:46 +0000 Cristi Magherusan revision [2190] lastfn's metadata seems to wotk, but still it has some glitches diff -r af586df84c9b -r 69cf6184edef src/scrobbler/plugin.c --- a/src/scrobbler/plugin.c Fri May 11 09:18:02 2007 -0700 +++ b/src/scrobbler/plugin.c Fri May 11 09:32:54 2007 -0700 @@ -13,6 +13,7 @@ #include #include #include +#include #include #include @@ -196,6 +197,7 @@ playtime_i = 0, time_i = 0, playtime_ofs = 0; static char *file_c = NULL, *file_p = NULL; + Playlist *playlist = playlist_get_active(); static enum playstatus { ps_stop, ps_play, ps_pause @@ -216,35 +218,35 @@ dosubmit.dosubmit = dosubmit.pos_c = dosubmit.len = dosubmit.gerpok = 0; /* current music number */ - pos_c = xmms_remote_get_playlist_pos(XS_CS); + pos_c = playlist_get_position(playlist); /* current file name */ - file_c = xmms_remote_get_playlist_file(XS_CS, pos_c); + file_c = playlist_get_filename(playlist, pos_c); if ((file_c != NULL) && (ishttp(file_c))) return dosubmit; /* total number */ - playlistlen_c = xmms_remote_get_playlist_length(XS_CS); + playlistlen_c = playlist_get_length(playlist); /* current playtime */ - playtime_c = xmms_remote_get_output_time(XS_CS); + playtime_c = playback_get_time(); /* total length */ - len = xmms_remote_get_playlist_time(XS_CS, pos_c); + len = playlist_get_songtime(playlist, pos_c); /* current time (ms) */ gettimeofday(&timetmp, NULL); time_c = timetmp.tv_sec * 1000 + timetmp.tv_usec / 1000; /* current status */ - if( xmms_remote_is_paused(XS_CS) ) { + if( playback_get_paused(XS_CS) ) { ps_c = ps_pause; - }else if( xmms_remote_is_playing(XS_CS) ) { + }else if( playback_get_playing(XS_CS) ) { ps_c = ps_play; }else{ ps_c = ps_stop; } /* repeat setting */ - repeat = xmms_remote_is_repeat(XS_CS); + repeat = cfg.repeat; if( ps_p == ps_stop && ps_c == ps_stop ) playstate = stopping; else if( ps_p == ps_stop && ps_c == ps_play ) playstate = start;