# HG changeset patch # User chainsaw # Date 1136070942 28800 # Node ID 11d9ea46c9c7c31609cf4ae58c0b7487dfe8486b # Parent 5d0a74c31ee65b53ae10c23639aebcd6351b20b8 [svn] Use file magic instead of extensions. diff -r 5d0a74c31ee6 -r 11d9ea46c9c7 Plugins/Input/sid/xmms-sid.c --- a/Plugins/Input/sid/xmms-sid.c Sat Dec 31 15:04:34 2005 -0800 +++ b/Plugins/Input/sid/xmms-sid.c Sat Dec 31 15:15:42 2005 -0800 @@ -265,31 +265,9 @@ if (pcFilename == NULL) return FALSE; - /* Try to detect via detection routine, if required */ - if (xs_cfg.detectMagic && xs_status.sidPlayer->plrIsOurFile(pcFilename)) + if (xs_status.sidPlayer->plrIsOurFile(pcFilename)) return TRUE; - /* Detect just by checking filename extension */ - pcExt = xs_strrchr(pcFilename, '.'); - if (pcExt) { - pcExt++; - switch (xs_cfg.playerEngine) { - case XS_ENG_SIDPLAY1: - case XS_ENG_SIDPLAY2: - if (!g_strcasecmp(pcExt, "psid")) - return TRUE; - if (!g_strcasecmp(pcExt, "sid")) - return TRUE; - if (!g_strcasecmp(pcExt, "dat")) - return TRUE; - if (!g_strcasecmp(pcExt, "inf")) - return TRUE; - if (!g_strcasecmp(pcExt, "info")) - return TRUE; - break; - } - } - return FALSE; }