From 21ca87a50a252d81f2f07d1596b33511e98a3c0d Mon Sep 17 00:00:00 2001 From: Stefan Pluecken Date: Wed, 4 Nov 2009 16:18:44 +0100 Subject: [PATCH] bug #238 added m4v file extension to media player capabilities --- lib/python/Components/FileList.py | 1 + lib/python/Plugins/Extensions/MediaPlayer/plugin.py | 2 +- lib/service/servicemp3.cpp | 3 ++- 3 files changed, 4 insertions(+), 2 deletions(-) diff --git a/lib/python/Components/FileList.py b/lib/python/Components/FileList.py index 54bb1ac..38b0854 100755 --- a/lib/python/Components/FileList.py +++ b/lib/python/Components/FileList.py @@ -23,6 +23,7 @@ EXTENSIONS = { "ts": "movie", "avi": "movie", "divx": "movie", + "m4v": "movie", "mpg": "movie", "mpeg": "movie", "mkv": "movie", diff --git a/lib/python/Plugins/Extensions/MediaPlayer/plugin.py b/lib/python/Plugins/Extensions/MediaPlayer/plugin.py index 0e3bdf0..98bc060 100644 --- a/lib/python/Plugins/Extensions/MediaPlayer/plugin.py +++ b/lib/python/Plugins/Extensions/MediaPlayer/plugin.py @@ -110,7 +110,7 @@ class MediaPlayer(Screen, InfoBarBase, InfoBarSeek, InfoBarAudioSelection, InfoB # 'None' is magic to start at the list of mountpoints defaultDir = config.mediaplayer.defaultDir.getValue() - self.filelist = FileList(defaultDir, matchingPattern = "(?i)^.*\.(mp2|mp3|ogg|ts|wav|wave|m3u|pls|e2pls|mpg|vob|avi|divx|mkv|mp4|m4a|dat|flac|mov)", useServiceRef = True, additionalExtensions = "4098:m3u 4098:e2pls 4098:pls") + self.filelist = FileList(defaultDir, matchingPattern = "(?i)^.*\.(mp2|mp3|ogg|ts|wav|wave|m3u|pls|e2pls|mpg|vob|avi|divx|m4v|mkv|mp4|m4a|dat|flac|mov)", useServiceRef = True, additionalExtensions = "4098:m3u 4098:e2pls 4098:pls") self["filelist"] = self.filelist self.playlist = MyPlayList() diff --git a/lib/service/servicemp3.cpp b/lib/service/servicemp3.cpp index e1bf23d..34d0936 100644 --- a/lib/service/servicemp3.cpp +++ b/lib/service/servicemp3.cpp @@ -34,6 +34,7 @@ eServiceFactoryMP3::eServiceFactoryMP3() extensions.push_back("vob"); extensions.push_back("wav"); extensions.push_back("wave"); + extensions.push_back("m4v"); extensions.push_back("mkv"); extensions.push_back("avi"); extensions.push_back("divx"); @@ -235,7 +236,7 @@ eServiceMP3::eServiceMP3(eServiceReference ref) sourceinfo.containertype = ctAVI; sourceinfo.is_video = TRUE; } - else if ( strcasecmp(ext, ".mp4") == 0 || strcasecmp(ext, ".mov") == 0) + else if ( strcasecmp(ext, ".mp4") == 0 || strcasecmp(ext, ".mov") == 0 || strcasecmp(ext, ".m4v") == 0) { sourceinfo.containertype = ctMP4; sourceinfo.is_video = TRUE; -- 2.7.4