mirror of
https://github.com/jellyfin/jellyfin-kodi.git
synced 2024-11-10 04:06:11 +00:00
Add control over notification time for new content
Video and music library
This commit is contained in:
parent
4df6bb68d3
commit
c2dace4c1e
3 changed files with 12 additions and 9 deletions
|
@ -233,11 +233,7 @@
|
|||
<string id="30241">DB Sync Indication:</string>
|
||||
<string id="30242">Play Count Sync Indication:</string>
|
||||
<string id="30243">Enable HTTPS</string><!-- Verified -->
|
||||
<string id="30245">Force Transcoding Codecs</string>
|
||||
|
||||
<string id="30246">Enable Netflix style next up notification</string>
|
||||
<string id="30247"> - The number of seconds before the end to show the notification</string>
|
||||
<string id="30248">Show Emby Info dialog on play/select action</string>
|
||||
<string id="30249">Enable server connection message on startup</string><!-- Verified -->
|
||||
|
||||
<string id="30251">Recently added Home Videos</string>
|
||||
|
@ -309,6 +305,8 @@
|
|||
<string id="30529">Startup delay (in seconds)</string>
|
||||
<string id="30530">Enable server restart message</string>
|
||||
<string id="30531">Enable new content notification</string>
|
||||
<string id="30532">For the video library (in seconds)</string>
|
||||
<string id="30533">For the music library (in seconds)</string>
|
||||
|
||||
<!-- service add-on -->
|
||||
<string id="33000">Welcome</string>
|
||||
|
|
|
@ -39,6 +39,8 @@ class Items(object):
|
|||
self.directpath = utils.settings('useDirectPaths') == "1"
|
||||
self.music_enabled = utils.settings('enableMusic') == "true"
|
||||
self.contentmsg = utils.settings('newContent') == "true"
|
||||
self.newvideo_time = int(utils.settings('newvideotime'))*1000
|
||||
self.newmusic_time = int(utils.settings('newmusictime'))*1000
|
||||
|
||||
self.artwork = artwork.Artwork()
|
||||
self.emby = embyserver.Read_EmbyServer()
|
||||
|
@ -205,11 +207,12 @@ class Items(object):
|
|||
|
||||
return True
|
||||
|
||||
def contentPop(self, name):
|
||||
def contentPop(self, name, time=5000):
|
||||
xbmcgui.Dialog().notification(
|
||||
heading="Emby for Kodi",
|
||||
message="Added: %s" % name,
|
||||
icon="special://home/addons/plugin.video.emby/icon.png",
|
||||
time=time,
|
||||
sound=False)
|
||||
|
||||
|
||||
|
@ -232,7 +235,7 @@ class Movies(Items):
|
|||
count += 1
|
||||
self.add_update(movie)
|
||||
if not pdialog and self.contentmsg:
|
||||
self.contentPop(title)
|
||||
self.contentPop(title, self.newvideo_time)
|
||||
|
||||
def added_boxset(self, items, pdialog):
|
||||
|
||||
|
@ -627,7 +630,7 @@ class MusicVideos(Items):
|
|||
count += 1
|
||||
self.add_update(mvideo)
|
||||
if not pdialog and self.contentmsg:
|
||||
self.contentPop(title)
|
||||
self.contentPop(title, self.newvideo_time)
|
||||
|
||||
|
||||
def add_update(self, item, viewtag=None, viewid=None):
|
||||
|
@ -964,7 +967,7 @@ class TVShows(Items):
|
|||
count += 1
|
||||
self.add_updateEpisode(episode)
|
||||
if not pdialog and self.contentmsg:
|
||||
self.contentPop(title)
|
||||
self.contentPop(title, self.newvideo_time)
|
||||
|
||||
|
||||
def add_update(self, item, viewtag=None, viewid=None):
|
||||
|
@ -1665,7 +1668,7 @@ class Music(Items):
|
|||
count += 1
|
||||
self.add_updateSong(song)
|
||||
if not pdialog and self.contentmsg:
|
||||
self.contentPop(title)
|
||||
self.contentPop(title, self.newmusic_time)
|
||||
|
||||
def add_updateArtist(self, item, artisttype="MusicArtist"):
|
||||
# Process a single artist
|
||||
|
|
|
@ -68,6 +68,8 @@
|
|||
<setting id="connectMsg" type="bool" label="30249" default="true" />
|
||||
<setting id="restartMsg" type="bool" label="30530" default="false" />
|
||||
<setting id="newContent" type="bool" label="30531" default="false" />
|
||||
<setting id="newvideotime" type="number" label="30532" visible="eq(-1,true)" default="5" option="int" subsetting="true" />
|
||||
<setting id="newmusictime" type="number" label="30533" visible="eq(-2,true)" default="2" option="int" subsetting="true" />
|
||||
</category>
|
||||
|
||||
<category label="30022"><!-- Advanced -->
|
||||
|
|
Loading…
Reference in a new issue