Move MIME types in desktop file to separate file for easier maintenance
authorPetter Reinholdtsen <pere@hungry.com>
Sun, 8 May 2016 18:27:24 +0000 (20:27 +0200)
committerSebastian Ramacher <sramacher@debian.org>
Sat, 12 Aug 2017 10:56:58 +0000 (11:56 +0100)
Move list of supported MIME types from vlc.desktop.in to vlc.desktop.mimetypes,
with one mime type per line with the option of hash comments to associate
information with the MIME types.

Signed-off-by: Jean-Baptiste Kempf <jb@videolan.org>
Gbp-Pq: Name 0002-Move-MIME-types-in-desktop-file-to-separate-file-for.patch

share/Makefile.am
share/vlc.desktop.in
share/vlc.desktop.mimetypes [new file with mode: 0644]

index b08b3e87513630e923b8f754eb4a66c67a9c46e2..f0be5ff6015de6d8ced3dc273adfae78239fc980 100644 (file)
@@ -6,11 +6,12 @@ appdatadir = $(datadir)/applications
 if !HAVE_WIN32
 appdata_DATA = vlc.desktop
 endif
-EXTRA_DIST += vlc.desktop.in
+EXTRA_DIST += vlc.desktop.in vlc.desktop.mimetypes
 CLEANFILES += $(appdata_DATA)
 
 vlc.desktop: vlc.desktop.in $(top_builddir)/config.status
        $(AM_V_GEN)sed -e 's,\@bindir\@,$(bindir),g' < "$<" > tmp-$@
+       $(AM_V_GEN)mimetypes="$$(sed 's/\s*#.*$$//g' vlc.desktop.mimetypes | egrep -v '^$$' | tr "\n" ';')"; sed -ie "s,\@MIMETYPES\@,$$mimetypes,g" tmp-$@
        $(AM_V_at)$(DESKTOP_FILE_VALIDATE) tmp-$@
        $(AM_V_at)mv -f tmp-$@ $@
 
index 4052cd11d382ede2498ba1a3707adb4e9022df91..19d4134688b2c9b1873829d0ba776d311dadb2c7 100644 (file)
@@ -88,6 +88,6 @@ Icon=vlc
 Terminal=false
 Type=Application
 Categories=AudioVideo;Player;Recorder;
-MimeType=video/dv;video/mpeg;video/x-mpeg;video/msvideo;video/quicktime;video/x-anim;video/x-avi;video/x-ms-asf;video/x-ms-wmv;video/x-msvideo;video/x-nsv;video/x-flc;video/x-fli;video/x-flv;video/vnd.rn-realvideo;video/mp4;video/mp4v-es;video/mp2t;application/ogg;application/x-ogg;video/x-ogm+ogg;audio/x-vorbis+ogg;audio/ogg;video/ogg;application/x-matroska;audio/x-matroska;video/x-matroska;video/webm;audio/webm;audio/x-mp3;audio/x-mpeg;audio/mpeg;audio/x-wav;audio/x-mpegurl;audio/x-scpls;audio/x-m4a;audio/x-ms-asf;audio/x-ms-asx;audio/x-ms-wax;application/vnd.rn-realmedia;audio/x-real-audio;audio/x-pn-realaudio;application/x-flac;audio/x-flac;application/x-shockwave-flash;misc/ultravox;audio/vnd.rn-realaudio;audio/x-pn-aiff;audio/x-pn-au;audio/x-pn-wav;audio/x-pn-windows-acm;image/vnd.rn-realpix;audio/x-pn-realaudio-plugin;application/x-extension-mp4;audio/mp4;audio/amr;audio/amr-wb;x-content/video-vcd;x-content/video-svcd;x-content/video-dvd;x-content/audio-cdda;x-content/audio-player;application/xspf+xml;x-scheme-handler/mms;x-scheme-handler/rtmp;x-scheme-handler/rtsp;video/vnd.mpegurl;
+MimeType=@MIMETYPES@
 X-KDE-Protocols=ftp,http,https,mms,rtmp,rtsp,sftp,smb
 Keywords=Player;Capture;DVD;Audio;Video;Server;Broadcast;
diff --git a/share/vlc.desktop.mimetypes b/share/vlc.desktop.mimetypes
new file mode 100644 (file)
index 0000000..f567458
--- /dev/null
@@ -0,0 +1,137 @@
+# List of MIME types to announce in the desktop file, to let desktop
+# environments and browsers know which file types to pass on to VLC.
+
+# DV files
+video/dv
+
+video/mpeg
+
+video/x-mpeg
+
+video/msvideo
+
+video/quicktime
+
+video/x-anim
+
+video/x-avi
+
+video/x-ms-asf
+
+video/x-ms-wmv
+
+video/x-msvideo
+
+video/x-nsv
+
+video/x-flc
+
+video/x-fli
+
+video/x-flv
+
+video/vnd.rn-realvideo
+
+video/mp4
+
+video/mp4v-es
+
+video/mp2t
+
+application/ogg
+
+application/x-ogg
+
+video/x-ogm+ogg
+
+audio/x-vorbis+ogg
+
+audio/ogg
+
+video/ogg
+
+application/x-matroska
+
+audio/x-matroska
+
+video/x-matroska
+
+video/webm
+
+audio/webm
+
+audio/x-mp3
+
+audio/x-mpeg
+
+audio/mpeg
+
+audio/x-wav
+
+audio/x-mpegurl
+
+audio/x-scpls
+
+audio/x-m4a
+
+audio/x-ms-asf
+
+audio/x-ms-asx
+
+audio/x-ms-wax
+
+application/vnd.rn-realmedia
+
+audio/x-real-audio
+
+audio/x-pn-realaudio
+
+application/x-flac
+
+audio/x-flac
+
+application/x-shockwave-flash
+
+misc/ultravox
+
+audio/vnd.rn-realaudio
+
+audio/x-pn-aiff
+
+audio/x-pn-au
+
+audio/x-pn-wav
+
+audio/x-pn-windows-acm
+
+image/vnd.rn-realpix
+
+audio/x-pn-realaudio-plugin
+
+application/x-extension-mp4
+
+audio/mp4
+
+audio/amr
+
+audio/amr-wb
+
+x-content/video-vcd
+
+x-content/video-svcd
+
+x-content/video-dvd
+
+x-content/audio-cdda
+
+x-content/audio-player
+
+application/xspf+xml
+
+x-scheme-handler/mms
+
+x-scheme-handler/rtmp
+
+x-scheme-handler/rtsp
+
+video/vnd.mpegurl