From 0659c5bdc16ac84cb34918ec54fdfc3f537e2758 Mon Sep 17 00:00:00 2001 From: Luke Pulverenti Date: Mon, 29 Aug 2016 17:06:24 -0400 Subject: [PATCH] make chapter images a per-library setting --- .../libraryoptionseditor.js | 14 +++++++- .../libraryoptionseditor.template.html | 18 +++++++++- dashboard-ui/dashboard/librarysettings.js | 34 ------------------- dashboard-ui/librarysettings.html | 22 ------------ dashboard-ui/scripts/mediaplayer-video.js | 10 ++++-- dashboard-ui/strings/en-US.json | 4 ++- 6 files changed, 41 insertions(+), 61 deletions(-) diff --git a/dashboard-ui/components/libraryoptionseditor/libraryoptionseditor.js b/dashboard-ui/components/libraryoptionseditor/libraryoptionseditor.js index 182606c7a..013007851 100644 --- a/dashboard-ui/components/libraryoptionseditor/libraryoptionseditor.js +++ b/dashboard-ui/components/libraryoptionseditor/libraryoptionseditor.js @@ -38,6 +38,14 @@ } else { parent.querySelector('.chkEnablePhotosContainer').classList.add('hide'); } + + if (contentType == 'tvshows' || contentType == 'movies' || contentType == 'homevideos' || contentType == 'musicvideos' || contentType == 'mixed' || !contentType) { + parent.querySelector('.fldExtractChaptersDuringLibraryScan').classList.remove('hide'); + parent.querySelector('.fldExtractChapterImages').classList.remove('hide'); + } else { + parent.querySelector('.fldExtractChaptersDuringLibraryScan').classList.add('hide'); + parent.querySelector('.fldExtractChapterImages').classList.add('hide'); + } } function getLibraryOptions(parent) { @@ -45,7 +53,9 @@ var options = { EnableArchiveMediaFiles: parent.querySelector('.chkArhiveAsMedia').checked, EnablePhotos: parent.querySelector('.chkEnablePhotos').checked, - EnableRealtimeMonitor: parent.querySelector('.chkEnableRealtimeMonitor').checked + EnableRealtimeMonitor: parent.querySelector('.chkEnableRealtimeMonitor').checked, + ExtractChapterImagesDuringLibraryScan: parent.querySelector('.chkExtractChaptersDuringLibraryScan').checked, + EnableChapterImageExtraction: parent.querySelector('.chkExtractChapterImages').checked }; return options; @@ -56,6 +66,8 @@ parent.querySelector('.chkArhiveAsMedia').checked = options.EnableArchiveMediaFiles; parent.querySelector('.chkEnablePhotos').checked = options.EnablePhotos; parent.querySelector('.chkEnableRealtimeMonitor').checked = options.EnableRealtimeMonitor; + parent.querySelector('.chkExtractChaptersDuringLibraryScan').checked = options.ExtractChapterImagesDuringLibraryScan; + parent.querySelector('.chkExtractChapterImages').checked = options.EnableChapterImageExtraction; } return { diff --git a/dashboard-ui/components/libraryoptionseditor/libraryoptionseditor.template.html b/dashboard-ui/components/libraryoptionseditor/libraryoptionseditor.template.html index 7f3f9c9a8..1548fa1b3 100644 --- a/dashboard-ui/components/libraryoptionseditor/libraryoptionseditor.template.html +++ b/dashboard-ui/components/libraryoptionseditor/libraryoptionseditor.template.html @@ -8,12 +8,28 @@
${LabelEnableRealtimeMonitorHelp}
+
+ +
${ExtractChapterImagesHelp}
+
+ +
+ +
${LabelExtractChaptersDuringLibraryScanHelp}
+
+

-
-
-
-
-
${HeaderExtractChapterImagesFor}
-
- ${OptionMovies} - - ${OptionEpisodes} - - ${OptionOtherVideos} -
-
${ExtractChapterImagesHelp}
-
-
-
- ${LabelExtractChaptersDuringLibraryScan} -
${LabelExtractChaptersDuringLibraryScanHelp}
-
-
-
-
diff --git a/dashboard-ui/scripts/mediaplayer-video.js b/dashboard-ui/scripts/mediaplayer-video.js index a1fe0fc91..1948be986 100644 --- a/dashboard-ui/scripts/mediaplayer-video.js +++ b/dashboard-ui/scripts/mediaplayer-video.js @@ -1250,10 +1250,16 @@ var errorMsg = Globalize.translate('MessageErrorPlayingVideo'); var item = self.currentItem; + var mediaSource = self.currentMediaSource; if (item && item.Type == "TvChannel") { - errorMsg += '

'; + errorMsg += '
'; + errorMsg += '
'; errorMsg += Globalize.translate('MessageEnsureOpenTuner'); - errorMsg += '

'; + } + if (mediaSource && mediaSource.VideoType != "VideoFile") { + errorMsg += '
'; + errorMsg += '
'; + errorMsg += Globalize.translate('MessageFolderRipPlaybackExperimental'); } Dashboard.alert({ diff --git a/dashboard-ui/strings/en-US.json b/dashboard-ui/strings/en-US.json index dad7d4db2..1bc7632c9 100644 --- a/dashboard-ui/strings/en-US.json +++ b/dashboard-ui/strings/en-US.json @@ -2224,5 +2224,7 @@ "LabelMaxAudioFileBitrateHelp": "Audio files with a higher bitrate will be converted by Emby Server. Select a higher value for better quality, or a lower value to conserve local storage space.", "LabelVaapiDevice": "VA API Device:", "LabelVaapiDeviceHelp": "This is the render node that is used for hardware acceleration.", - "HowToConnectFromEmbyApps": "How to Connect from Emby apps" + "HowToConnectFromEmbyApps": "How to Connect from Emby apps", + "MessageFolderRipPlaybackExperimental": "Support for playback of folder rips and ISOs in this app is only expirimental. For best results, try an Emby app that supports these formats natively, or use plain video files.", + "OptionExtractChapterImage": "Enable chapter image extraction" }