Skip to content

Commit

Permalink
Merge pull request #2611 from realcopacetic/script.copacetic.helper-1…
Browse files Browse the repository at this point in the history
….0.13

[script.copacetic.helper 1.0.13]
  • Loading branch information
basrieter authored Apr 27, 2024
2 parents 43fe339 + 883d220 commit a573865
Show file tree
Hide file tree
Showing 4 changed files with 22 additions and 3 deletions.
5 changes: 4 additions & 1 deletion script.copacetic.helper/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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**
Expand Down
2 changes: 1 addition & 1 deletion script.copacetic.helper/addon.xml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<addon id="script.copacetic.helper" name="Copacetic Helper" version="1.0.12" provider-name="realcopacetic">
<addon id="script.copacetic.helper" name="Copacetic Helper" version="1.0.13" provider-name="realcopacetic">
<requires>
<import addon="xbmc.python" version="3.0.1" />
<import addon="script.module.pil" version="5.1.0" />
Expand Down
1 change: 1 addition & 0 deletions script.copacetic.helper/resources/lib/service/monitor.py
Original file line number Diff line number Diff line change
Expand Up @@ -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) | '
Expand Down
17 changes: 16 additions & 1 deletion script.copacetic.helper/resources/lib/service/player.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,14 +17,28 @@ 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()
if label:
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():
Expand All @@ -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)

0 comments on commit a573865

Please sign in to comment.