Get rid of obsolete setting markPlayed
- Instead, always mark played at 90%
This commit is contained in:
parent
ced650266f
commit
386f4ca5f0
4 changed files with 9 additions and 13 deletions
|
@ -262,13 +262,12 @@ class Items(object):
|
|||
# If the playback was stopped, check whether we need to increment the
|
||||
# playcount. PMS won't tell us the playcount via websockets
|
||||
if item['state'] in ('stopped', 'ended'):
|
||||
complete = float(item['viewOffset']) / float(item['duration'])*100
|
||||
markPlayed = 0.90
|
||||
complete = float(item['viewOffset']) / float(item['duration'])
|
||||
self.logMsg('Item %s stopped with completion rate %s percent.'
|
||||
'Mark item played at %s percent.'
|
||||
% (item['ratingKey'],
|
||||
str(complete),
|
||||
utils.settings('markPlayed')), 1)
|
||||
if complete >= float(utils.settings('markPlayed')):
|
||||
% (item['ratingKey'], str(complete), markPlayed), 1)
|
||||
if complete >= markPlayed:
|
||||
self.logMsg('Marking as completely watched in Kodi', 1)
|
||||
try:
|
||||
item['viewCount'] += 1
|
||||
|
|
|
@ -510,11 +510,11 @@ class Player(xbmc.Player):
|
|||
except ZeroDivisionError:
|
||||
# Runtime is 0.
|
||||
percentComplete = 0
|
||||
|
||||
markPlayedAt = float(settings('markPlayed')) / 100
|
||||
|
||||
markPlayed = 0.90
|
||||
self.logMsg("Percent complete: %s Mark played at: %s"
|
||||
% (percentComplete, markPlayedAt), 1)
|
||||
if percentComplete >= markPlayedAt:
|
||||
% (percentComplete, markPlayed), 1)
|
||||
if percentComplete >= markPlayed:
|
||||
# Tell Kodi that we've finished watching (Plex knows)
|
||||
if (data['fileid'] is not None and
|
||||
data['itemType'] in ('movie', 'episode')):
|
||||
|
@ -539,7 +539,7 @@ class Player(xbmc.Player):
|
|||
|
||||
# Plex: never delete
|
||||
offerDelete = False
|
||||
if percentComplete >= markPlayedAt and offerDelete:
|
||||
if percentComplete >= markPlayed and offerDelete:
|
||||
resp = xbmcgui.Dialog().yesno(
|
||||
lang(30091),
|
||||
lang(33015),
|
||||
|
|
|
@ -114,8 +114,6 @@ class UserClient(threading.Thread):
|
|||
# url = "{server}/emby/System/Configuration?format=json"
|
||||
# result = doUtils.downloadUrl(url)
|
||||
|
||||
# utils.settings('markPlayed', value=str(result['MaxResumePct']))
|
||||
|
||||
def hasAccess(self):
|
||||
# Plex: always return True for now
|
||||
return True
|
||||
|
|
|
@ -95,7 +95,6 @@
|
|||
<setting id="transcodeHEVC" type="bool" label="39065" default="false"/>
|
||||
<setting id="audioBoost" type="slider" label="39001" default="0" range="0,10,100" option="int"/>
|
||||
<setting id="subtitleSize" label="39002" type="slider" option="int" range="0,30,300" default="100" />
|
||||
<setting id="markPlayed" type="number" visible="false" default="95" />
|
||||
<setting id="failedCount" type="number" visible="false" default="0" />
|
||||
<setting id="networkCreds" type="text" visible="false" default="" />
|
||||
</category>
|
||||
|
|
Loading…
Reference in a new issue