Mercurial > hg > xmms-sid
diff src/xmms-sid.c @ 846:7b11ba6fc4cc
Improve and fix probing (FP backend wasn't used when checking filename
extensions).
author | Matti Hamalainen <ccr@tnsp.org> |
---|---|
date | Thu, 08 Nov 2012 22:43:45 +0200 |
parents | 29f3c3f29c0d |
children | 2663b1ac9ce6 |
line wrap: on
line diff
--- a/src/xmms-sid.c Thu Nov 08 21:58:30 2012 +0200 +++ b/src/xmms-sid.c Thu Nov 08 22:43:45 2012 +0200 @@ -271,15 +271,16 @@ return FALSE; /* Try to detect via detection routine, if required */ - if (xs_cfg.detectMagic) + if (xs_cfg.detectMagic && xs_status.engine->plrProbe != NULL) { + gboolean res = FALSE; XSFile *f; if ((f = xs_fopen(filename, "rb")) != NULL) { - if (xs_status.engine->plrProbe(f)) - return TRUE; + res = xs_status.engine->plrProbe(f); xs_fclose(f); } + return res; } /* Detect just by checking filename extension */ @@ -290,7 +291,6 @@ switch (xs_cfg.playerEngine) { case XS_ENG_SIDPLAY1: - case XS_ENG_SIDPLAY2: if (!g_strcasecmp(ext, "psid")) return TRUE; if (!g_strcasecmp(ext, "sid")) @@ -302,6 +302,12 @@ if (!g_strcasecmp(ext, "info")) return TRUE; break; + + case XS_ENG_SIDPLAY2: + case XS_ENG_SIDPLAYFP: + if (!g_strcasecmp(ext, "sid")) + return TRUE; + break; } }