Mercurial > audlegacy-plugins
comparison src/sid/xmms-sid.c @ 1745:68312d3b39a8
Remove xs_is_our_file()
author | Matti Hamalainen <ccr@tnsp.org> |
---|---|
date | Wed, 19 Sep 2007 03:10:54 +0300 |
parents | e60cfd9e3d48 |
children | b3decbd3051b |
comparison
equal
deleted
inserted
replaced
1733:e60cfd9e3d48 | 1745:68312d3b39a8 |
---|---|
254 | 254 |
255 | 255 |
256 /* | 256 /* |
257 * Check whether the given file is handled by this plugin | 257 * Check whether the given file is handled by this plugin |
258 */ | 258 */ |
259 gint xs_is_our_file(gchar *pcFilename) | |
260 { | |
261 gint result = 0; | |
262 t_xs_file *f; | |
263 assert(xs_status.sidPlayer); | |
264 | |
265 /* Check the filename */ | |
266 if (pcFilename == NULL) | |
267 return 0; | |
268 | |
269 if ((f = xs_fopen(pcFilename, "rb")) != NULL) { | |
270 if (xs_status.sidPlayer->plrProbe(f)) | |
271 result = 1; | |
272 xs_fclose(f); | |
273 } | |
274 | |
275 return result; | |
276 } | |
277 | |
278 static gchar * xs_has_tracknumber(gchar *pcFilename) | 259 static gchar * xs_has_tracknumber(gchar *pcFilename) |
279 { | 260 { |
280 gchar *tmpSep = xs_strrchr(pcFilename, '?'); | 261 gchar *tmpSep = xs_strrchr(pcFilename, '?'); |
281 if (tmpSep && g_ascii_isdigit(*(tmpSep + 1))) | 262 if (tmpSep && g_ascii_isdigit(*(tmpSep + 1))) |
282 return tmpSep; | 263 return tmpSep; |
682 | 663 |
683 if (xs_cfg.titleOverride) | 664 if (xs_cfg.titleOverride) |
684 tuple_associate_string(pResult, FIELD_FORMATTER, NULL, xs_cfg.titleFormat); | 665 tuple_associate_string(pResult, FIELD_FORMATTER, NULL, xs_cfg.titleFormat); |
685 } | 666 } |
686 | 667 |
668 | |
687 Tuple * xs_get_song_tuple(gchar *songFilename) | 669 Tuple * xs_get_song_tuple(gchar *songFilename) |
688 { | 670 { |
689 Tuple *tmpResult; | 671 Tuple *tmpResult; |
690 gchar *tmpFilename; | 672 gchar *tmpFilename; |
691 t_xs_tuneinfo *tmpInfo; | 673 t_xs_tuneinfo *tmpInfo; |
713 xs_tuneinfo_free(tmpInfo); | 695 xs_tuneinfo_free(tmpInfo); |
714 | 696 |
715 return tmpResult; | 697 return tmpResult; |
716 } | 698 } |
717 | 699 |
700 | |
718 Tuple *xs_probe_for_tuple(gchar *filename, t_xs_file *fd) | 701 Tuple *xs_probe_for_tuple(gchar *filename, t_xs_file *fd) |
719 { | 702 { |
720 if (!xs_is_our_file_vfs(filename, fd)) | 703 if (!xs_is_our_file_vfs(filename, fd)) |
721 return NULL; | 704 return NULL; |
722 | 705 |