Add "mime-type" property to plparser object
Rhythmbox currently passes the 'collectionViewUrl'
( from itunes search json results ), as below:
collectionViewUrl: https://podcasts.apple.com/us/podcast/global-news-podcast/id135067274?uo=4
totem_pl_parser_parse (parser, collectionViewUrl, FALSE);
totem-pl-parser obtaines the itms id which is 135067274
and again does a itunes lookup, as below:
json_uri = g_strdup_printf ("https://itunes.apple.com/lookup?id=%s&entity=podcast", itms_id);
and obtains the RSS feed url from the 'feedUrl'
json attribute in the lookup result.
The second itunes lookup step is pure overhead, as Rhythmbox can obtain and pass 'feedUrl'
directly from search results to totem-pl-parser. In that case, it would be better if Rhythmbox can force the mime-type as application/rss+xml
rather than totem-pl-parser detecting the mime-type and matching against supported types. The itms code path described above, infact uses the direct call without checking mime-type, as below:
ret = totem_pl_parser_add_rss (parser, feed_file, NULL, parse_data, NULL);
This should speedup podcast parsing in all apps which know the mime-type well in advance.