[totem-pl-parser/wip/hadess/remote-mp3: 1/2] plparser: Make sure that remote MP3s get treated as audio



commit 2cc80fe6abd9584eb9126fd061a2e9f41800fa41
Author: Bastien Nocera <hadess hadess net>
Date:   Fri Feb 28 11:53:48 2020 +0100

    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

 plparse/totem-pl-parser.c | 3 +++
 1 file changed, 3 insertions(+)
---
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)


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]