diff options
author | Bastien Nocera <hadess@hadess.net> | 2020-02-28 11:53:48 +0100 |
---|---|---|
committer | Bastien Nocera <hadess@hadess.net> | 2020-02-28 11:53:48 +0100 |
commit | 2cc80fe6abd9584eb9126fd061a2e9f41800fa41 (patch) | |
tree | b36c6ee477f43ec2f5a5b8e45ecc0e3523cef9e0 | |
parent | 4f3ca838c8d1ccc25b4f85ffe1da2c334bd6a29c (diff) | |
download | totem-pl-parser-2cc80fe6abd9584eb9126fd061a2e9f41800fa41.tar.gz |
plparser: Make sure that remote MP3s get treated as audio
Make sure that after verifying that a remote file advertised as
"audio/mpeg" is actually an MPEG stream, and not an M3U in disguise, we
pass it on to the caller as being unhandled for the purpose of playlist
parsing, rather than returning an error.
Closes: #19
-rw-r--r-- | plparse/totem-pl-parser.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/plparse/totem-pl-parser.c b/plparse/totem-pl-parser.c index 0628f53..c1b0600 100644 --- a/plparse/totem-pl-parser.c +++ b/plparse/totem-pl-parser.c @@ -2075,6 +2075,9 @@ totem_pl_parser_parse_internal (TotemPlParser *parser, mimetype = tmp; } DEBUG(file, g_print ("_get_mime_type_with_data for '%s' returned '%s' (was %s)\n", uri, mimetype, AUDIO_MPEG_TYPE)); + + if (strcmp (mimetype, AUDIO_MPEG_TYPE) == 0) + return TOTEM_PL_PARSER_RESULT_UNHANDLED; } if (totem_pl_parser_mimetype_is_ignored (parser, mimetype) != FALSE) |