GNOME Bugzilla – Bug 337411
parsing issue due to gnome_vfs_mime_type_from_name (), gnome_vfs_get_mime_type () works fine
Last modified: 2008-06-03 17:40:00 UTC
As figured on IRC while working on https://launchpad.net/distros/ubuntu/+source/totem/+bug/38169 libtotem-plparser has some issue with http://repubblicaradio.repubblica.it/asx/search.php?player_id=2454 totem_pl_parser_parse_internal() returns TOTEM_PL_PARSER_RESULT_UNHANDLE because mimetype == application/octet-stream from gnome_vfs_mime_type_from_name () gnome_vfs_get_mime_type () works correctly and mimetype == 'video/x-ms-asf' when using it totem 1.4.0 gnome-vfs 2.14.0 shared-mime-info 0.17 with some fixes from the CVS but it does the same with a non patched version
gnome_vfs_get_mime_type_for_name() seems to be the non outdated API function for that and it has the same issue (mimetype == application/octet-stream) (it's not documented from the html API...)
that function is not the issue (but still it would be nice to replace the deprecated one), since gnome-vfs defines "application/octet-stream" GNOME_VFS_MIME_TYPE_UNKNOWN the plparser goes to the _type_with_data() function which should return the correct type but doesn't
gnome_vfs_get_mime_type_for_name() doesn't exist in older versions of gnome-vfs, so I'm a bit wary to update it. As for my_gnome_vfs_get_mime_type_with_data() not working, which mime-type does it send back?
"$ gnomevfs-info http://repubblicaradio.repubblica.it/asx/search.php?player_id=2454 Name : search.php?player_id=2454 Type : Regular MIME type : video/x-ms-asf Default app : totem.desktop Access time : Sun Apr 30 22:23:38 2006 Modification time : Sun Apr 30 22:23:38 2006" "$ ./test-parser http://repubblicaradio.repubblica.it/asx/search.php?player_id=2454 ###################### parsing ################ mimetype: application/octet-stream mimetype from data: application/octet-stream url 'http://repubblicaradio.repubblica.it/asx/search.php?player_id=2454' unhandled" where the prints are "mimetype = gnome_vfs_mime_type_from_name (url)" and "mimetype = my_gnome_vfs_get_mime_type_with_data (url, &data);" from totem-pl-parser.c totem_pl_parser_parse_internal() function
$ ./test-parser -d "http://repubblicaradio.repubblica.it/asx/search.php?player_id=2454" Enabling debug ###################### parsing ################ _mime_type_from_name for 'http://repubblicaradio.repubblica.it/asx/search.php?player_id=2454' returned 'application/octet-stream' _get_mime_type_with_data for 'http://repubblicaradio.repubblica.it/asx/search.php?player_id=2454' returned 'audio/x-ms-asx' URL 'http://repubblicaradio.repubblica.it/asx/search.php?player_id=2454' is special type 'audio/x-ms-asx' Entity: line 3: parser error : Input is not proper UTF-8, indicate encoding ! Bytes: 0xEC 0x20 0x74 0x61 oppa stima dell'intelligenza degli italiani per pensare che ci siano in giro cos ^Entity: line 3: parser error : Input is not proper UTF-8, indicate encoding ! Bytes: 0xEC 0x20 0x74 0x61 oppa stima dell'intelligenza degli italiani per pensare che ci siano in giro cos ^URL 'mms://mediaserver.kataweb.it/repradio/video/file/berlusconi040406.wmv' is MMS or RTSP, ignoring added URI 'mms://mediaserver.kataweb.it/repradio/video/file/berlusconi040406.wmv' with title 'empty' genre '(null)' Please update your version of shared-mime-info (or raise the priority of the 'audio/x-ms-asx' magic to 51).
works fine now
Mass-move from totem to totem-pl-parser. You can remove all messages by searching for this comment.