# HG changeset patch # User Matti Hamalainen # Date 1352407425 -7200 # Node ID 7b11ba6fc4cc45f89a0602161350786c90bbaa89 # Parent f54ef18673e60b6bafc6728aae90c1f98ec1951e Improve and fix probing (FP backend wasn't used when checking filename extensions). diff -r f54ef18673e6 -r 7b11ba6fc4cc src/xmms-sid.c --- 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; } }