comparison src/scrobbler/plugin.c @ 744:c380f078aa26 trunk

[svn] - scrobbler: check that there are files in playlist at all, before looking up whether they are http sources or not
author giacomo
date Tue, 27 Feb 2007 10:15:17 -0800
parents be03e09c7c20
children 13bb2cf2f9e6
comparison
equal deleted inserted replaced
743:6ec1a12cbf0c 744:c380f078aa26
240 dosubmit.dosubmit = dosubmit.pos_c = dosubmit.len = dosubmit.gerpok = 0; 240 dosubmit.dosubmit = dosubmit.pos_c = dosubmit.len = dosubmit.gerpok = 0;
241 241
242 /* current music number */ 242 /* current music number */
243 pos_c = xmms_remote_get_playlist_pos(XS_CS); 243 pos_c = xmms_remote_get_playlist_pos(XS_CS);
244 /* current file name */ 244 /* current file name */
245 file_c = xmms_remote_get_playlist_file(XS_CS, pos_c); 245 file_c = xmms_remote_get_playlist_file(XS_CS, pos_c);
246 246
247 if (ishttp(file_c)) 247 if ((file_c != NULL) && (ishttp(file_c)))
248 return dosubmit; 248 return dosubmit;
249 249
250 /* total number */ 250 /* total number */
251 playlistlen_c = xmms_remote_get_playlist_length(XS_CS); 251 playlistlen_c = xmms_remote_get_playlist_length(XS_CS);
252 /* current playtime */ 252 /* current playtime */