GNOME Bugzilla – Bug 390991
Add filter for supported audio and video files
Last modified: 2007-02-06 15:36:11 UTC
In addition to the existing filters "All files" and "Supported files" Totem should offer filters to only show supported audio or video files in the file chooser. Use case: While surfing the web you randomly download video files from fun sites and music from an online music store. When you want to listen to your new music you don't care about the videos, and vice versa. Hence it would be nice to only see music or video files, but not both.
Created attachment 79066 [details] [review] Patch to this bug
This patch splits data/mime-type-list.txt into two seperate files for audio and video files. Though not perfect for every possible container format it should work well enough for most cases and media files. But I have to admit that I don't know if it's wise to now have three char arrays in the generated data/totem-mime-types.h or if it's better to iterate both mime_types_audio and mime_types_video when needed and get rid of mime_types. Comments appreciated.
schemas.sh already has some code to "split" the video and audio files. I think it'd be easier to use the same logic (and possibly share it), rather than having 2 new files.
2007-02-06 Bastien Nocera <hadess@hadess.net> * data/Makefile.am: * data/mime-functions.sh: * data/mime-type-include.sh: * data/mime-type-list.txt: * data/schemas.sh: * src/totem-uri.c: (totem_setup_file_filters), (totem_destroy_file_filters), (totem_add_files): Move functions to split the mime-types in video/audio types to mime-functions.sh, add "Audio files" and "Video files" filters to the Open dialogues (Closes: #390991)