mirror of
https://github.com/jellyfin/jellyfin-kodi.git
synced 2024-12-25 10:16:11 +00:00
Add offer delete for episode option
This commit is contained in:
parent
68c7c7ac64
commit
e45b59c487
2 changed files with 9 additions and 0 deletions
|
@ -91,6 +91,14 @@ class Player( xbmc.Player ):
|
|||
self.logMsg("emby Service -> Percent Complete:" + str(percentComplete) + " Mark Played At:" + str(markPlayedAt))
|
||||
self.stopPlayback(data)
|
||||
|
||||
if percentComplete > .80 and data.get("Type") == "Episode" and addonSettings.getSetting("offerDelete")=="true":
|
||||
return_value = xbmcgui.Dialog().yesno("Offer Delete", "Delete\n" + data.get("currentfile").split("/")[-1] + "\non Emby Server? ")
|
||||
if return_value:
|
||||
url='{server}/mediabrowser/Items/' + item_id
|
||||
xbmc.log('Deleting via URL: ' + url)
|
||||
self.doUtils.downloadUrl(url, type="DELETE")
|
||||
xbmc.sleep (15000)
|
||||
xbmc.executebuiltin( "Container.Refresh" )
|
||||
#if(refresh_id != None):
|
||||
#report updates playcount and resume status to Kodi and MB3
|
||||
#librarySync.updatePlayCount(item_id)
|
||||
|
|
|
@ -25,6 +25,7 @@
|
|||
<setting id="smbpassword" type="text" label="30008" default="" option="hidden" visible="true" enable="true" />
|
||||
<setting type="sep"/>
|
||||
<setting type="sep" />
|
||||
<setting id="offerDelete" type="bool" label="30127" visible="true" enable="true" default="false" />
|
||||
<setting type="sep" />
|
||||
<setting id="playFromStream" type="bool" label="30002" visible="true" enable="true" default="false" />
|
||||
<setting id="videoBitRate" type="enum" label="30160" values="664 Kbps SD|996 Kbps HD|1.3 Mbps HD|2.0 Mbps HD|3.2 Mbps HD|4.7 Mbps HD|6.2 Mbps HD|7.7 Mbps HD|9.2 Mbps HD|10.7 Mbps HD|12.2 Mbps HD|13.7 Mbps HD|15.2 Mbps HD|16.7 Mbps HD|18.2 Mbps HD|20.0 Mbps HD|40.0 Mbps HD|100.0 Mbps HD [default]|1000.0 Mbps HD" visible="eq(-1,true)" default="17" />
|
||||
|
|
Loading…
Reference in a new issue