diff --git a/script.copacetic.helper/README.md b/script.copacetic.helper/README.md index 9cf98261b..df2ad68d5 100644 --- a/script.copacetic.helper/README.md +++ b/script.copacetic.helper/README.md @@ -13,7 +13,10 @@ All code contained in this project is licensed under GPL 3.0. * __jurialmunkey__ for all the best-practice code examples from [plugin.video.themoviedb.helper](https://github.com/jurialmunkey/plugin.video.themoviedb.helper) and forum support. ### Changelog -**1.0.11** +**1.0.13** +- Player monitor captures Set ID for currently playing movie and passes to a window property for skin.copacetic to use for Now_Playing indicator on sets + +**1.0.12** - Removed visualisation waveform setting from list of settings changed by SettingsMonitor **1.0.11** diff --git a/script.copacetic.helper/addon.xml b/script.copacetic.helper/addon.xml index b3955c435..32fe7a5eb 100644 --- a/script.copacetic.helper/addon.xml +++ b/script.copacetic.helper/addon.xml @@ -1,5 +1,5 @@ - + diff --git a/script.copacetic.helper/resources/lib/service/monitor.py b/script.copacetic.helper/resources/lib/service/monitor.py index 79b90c00b..201aed1f0 100644 --- a/script.copacetic.helper/resources/lib/service/monitor.py +++ b/script.copacetic.helper/resources/lib/service/monitor.py @@ -147,6 +147,7 @@ def poller(self): # slideshow window is visible run SlideshowMonitor() elif condition( '[Window.IsVisible(home) | ' + 'Window.IsVisible(favouritesbrowser) | ' 'Window.IsVisible(skinsettings) | ' 'Window.IsVisible(appearancesettings) | ' 'Window.IsVisible(mediasettings) | ' diff --git a/script.copacetic.helper/resources/lib/service/player.py b/script.copacetic.helper/resources/lib/service/player.py index adbe7407e..0701c1330 100644 --- a/script.copacetic.helper/resources/lib/service/player.py +++ b/script.copacetic.helper/resources/lib/service/player.py @@ -17,7 +17,6 @@ def onAVStarted(self): # Crop clearlogo for use on fullscreen info or pause self.clearlogo_cropper(source='VideoPlayer', reporting=window_property) - # Clean filename item = self.getPlayingItem() label = item.getLabel() @@ -25,6 +24,21 @@ def onAVStarted(self): clean_filename(label=label) else: window_property('Return_Label', clear=True) + + # Get set id + tag = self.getVideoInfoTag() + dbid = tag.getDbId() + if dbid: + query = json_call( + 'VideoLibrary.GetMovieDetails', + params={'properties': [ + 'setid'], 'movieid': dbid}, + parent='get_set_id' + ) + if query['result'].get('moviedetails', None): + setid = int(query['result']['moviedetails']['setid']) + window_property('VideoPlayer_SetID', set=setid) + # Get user rating on music playback if self.isPlayingAudio(): @@ -38,4 +52,5 @@ def onPlayBackStopped(self): # Clean properties window_property('MusicPlayer_UserRating', clear=True) window_property('MusicPlayer_AlbumArtist', clear=True) + window_property('VideoPlayer_SetID', clear=True) window_property('Return_Label', clear=True)