diff --git a/Contents/Code/__init__.py b/Contents/Code/__init__.py index 5d93941..7d7d2fe 100644 --- a/Contents/Code/__init__.py +++ b/Contents/Code/__init__.py @@ -12,7 +12,7 @@ # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. -# Version 2.0.3 +# Version 2.0.4 from m3u_parser import LoadPlaylist, PlaylistReloader from xmltv_parser import GuideReloader @@ -28,7 +28,7 @@ def Start(): ObjectContainer.art = R('art-default.jpg') DirectoryObject.thumb = R('icon-folder.png') DirectoryObject.art = R('art-default.jpg') - VideoClipObject.thumb = R('icon-tv.jpg') + VideoClipObject.thumb = R('icon-tv.png') VideoClipObject.art = R('art-default.jpg') if Prefs['m3u_reload_time'] == 'never' or not Dict['groups'] or not Dict['streams']: @@ -44,7 +44,7 @@ def MainMenu(): if not Dict['groups']: LoadPlaylist() if not Dict['groups']: - return ObjectContainer(header = "Error", message = "Provided playlist files are invalid, missing or empty, check the log file for more information") + return ObjectContainer(header = unicode(L("Error")), message = unicode(L("Provided playlist files are invalid, missing or empty, check the log file for more information"))) groups = Dict['groups'] groups_list = groups.values() @@ -98,7 +98,7 @@ def ListItems(group, page = 1): if not Dict['streams']: LoadPlaylist() if not Dict['streams']: - return ObjectContainer(header = "Error", message = "Provided playlist files are invalid, missing or empty, check the log file for more information") + return ObjectContainer(header = unicode(L("Error")), message = unicode(L("Provided playlist files are invalid, missing or empty, check the log file for more information"))) group = unicode(group) # Plex loses unicode formating when passing string between @route procedures if string is not a part of a @route @@ -209,6 +209,9 @@ def GetImage(file_name, default): if file_name: if file_name.startswith('http'): return Resource.ContentsOfURLWithFallback(file_name, fallback = R(default)) + elif Prefs['images_url'].startswith('http'): + file_name = Prefs['images_url'] + file_name if Prefs['images_url'].endswith('/') else Prefs['images_url'] + '/' + file_name + return Resource.ContentsOfURLWithFallback(file_name, fallback = R(default)) else: r = R(file_name) if r: @@ -264,4 +267,5 @@ def GetSummary(id, name, title, default = ''): #################################################################################################### def ValidatePrefs(): + pass \ No newline at end of file diff --git a/Contents/DefaultPrefs.json b/Contents/DefaultPrefs.json index e80fc83..50c0296 100644 --- a/Contents/DefaultPrefs.json +++ b/Contents/DefaultPrefs.json @@ -11,6 +11,12 @@ "type": "text", "default": "" }, + { + "id": "images_url", + "label": "URL path where images are located, if left empty images will be loaded from Resources folder", + "type": "text", + "default": "" + }, { "id": "filename_groups", "label": "Use file name as group name if group-title attribute is absent", diff --git a/Contents/Resources/playlist.m3u b/Contents/Resources/playlist.m3u index e2e39e4..80eab02 100644 --- a/Contents/Resources/playlist.m3u +++ b/Contents/Resources/playlist.m3u @@ -1,17 +1,9 @@ #EXTM3U -#EXTINF:0 tvg-id="Dummy" tvg-name="ABC News" tvg-logo="http://upload.wikimedia.org/wikipedia/en/f/fa/ABCNewsLogo.png" group-title="News",ABC News (http) +#EXTINF:0 tvg-id="1" tvg-name="ABC News" tvg-logo="http://upload.wikimedia.org/wikipedia/en/f/fa/ABCNewsLogo.png" group-title="News",ABC News (http) http://abclive.abcnews.com/i/abc_live4@136330/index_1200_av-b.m3u8 -#EXTINF:0 tvg-id="Dummy" tvg-name="NDTV" tvg-logo="http://upload.wikimedia.org/wikipedia/commons/thumb/c/c5/NDTV_logo.svg/2000px-NDTV_logo.svg.png" group-title="News",NDTV (http) +#EXTINF:0 tvg-id="2" tvg-name="NDTV" tvg-logo="http://upload.wikimedia.org/wikipedia/commons/thumb/c/c5/NDTV_logo.svg/2000px-NDTV_logo.svg.png" group-title="News",NDTV (http) http://bglive-a.bitgravity.com/ndtv/247hi/live/native -#EXTINF:0 tvg-id="Dummy" tvg-name="NDTV" tvg-logo="http://upload.wikimedia.org/wikipedia/commons/thumb/c/c5/NDTV_logo.svg/2000px-NDTV_logo.svg.png" group-title="News",NDTV alternative link (http) +#EXTINF:0 tvg-id="2" tvg-name="NDTV" tvg-logo="http://upload.wikimedia.org/wikipedia/commons/thumb/c/c5/NDTV_logo.svg/2000px-NDTV_logo.svg.png" group-title="News",NDTV alternative link (http) http://ndtv.live.cdn.bitgravity.com/ndtv/live/ndtv247live512 -#EXTINF:0 tvg-id="Dummy" tvg-name="Sky TG24" tvg-logo="http://upload.wikimedia.org/wikipedia/en/9/91/SKY_TG24.png" group-title="News",Sky TG24 (rtmp) -rtmp://cp49989.live.edgefcs.net:1935/live/streamRM1@2564 -#EXTINF:0 tvg-id="Dummy" tvg-name="ABC News" tvg-logo="http://upload.wikimedia.org/wikipedia/en/f/fa/ABCNewsLogo.png" group-title="English",ABC News (http) -http://abclive.abcnews.com/i/abc_live4@136330/index_1200_av-b.m3u8 -#EXTINF:0 tvg-id="Dummy" tvg-name="NDTV" tvg-logo="http://upload.wikimedia.org/wikipedia/commons/thumb/c/c5/NDTV_logo.svg/2000px-NDTV_logo.svg.png" group-title="English",NDTV (http) -http://bglive-a.bitgravity.com/ndtv/247hi/live/native -#EXTINF:0 tvg-id="Dummy" tvg-name="NDTV" tvg-logo="http://upload.wikimedia.org/wikipedia/commons/thumb/c/c5/NDTV_logo.svg/2000px-NDTV_logo.svg.png" group-title="English",NDTV alternative link (http) -http://ndtv.live.cdn.bitgravity.com/ndtv/live/ndtv247live512 -#EXTINF:0 tvg-id="Dummy" tvg-name="Sky TG24" tvg-logo="http://upload.wikimedia.org/wikipedia/en/9/91/SKY_TG24.png" group-title="Italian",Sky TG24 (rtmp) +#EXTINF:0 tvg-id="3" tvg-name="Sky TG24" tvg-logo="http://upload.wikimedia.org/wikipedia/en/9/91/SKY_TG24.png" group-title="News",Sky TG24 (rtmp) rtmp://cp49989.live.edgefcs.net:1935/live/streamRM1@2564 \ No newline at end of file diff --git a/Contents/Strings/en.json b/Contents/Strings/en.json index 7c4de3c..191a975 100644 --- a/Contents/Strings/en.json +++ b/Contents/Strings/en.json @@ -1,5 +1,7 @@ { "All": "All", "No Category": "No Category", - "No description available": "No description available" + "No description available": "No description available", + "Error": "Error", + "Provided playlist files are invalid, missing or empty, check the log file for more information": "Provided playlist files are invalid, missing or empty, check the log file for more information" } \ No newline at end of file