Skip to content

Commit d3a9bf0

Browse files
committed
Update playback.py
1 parent 05a80b9 commit d3a9bf0

1 file changed

Lines changed: 4 additions & 4 deletions

File tree

resources/lib/playback.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -391,7 +391,7 @@ def load_or_init(self) -> None:
391391
if self.remove_watched_playbacks:
392392
paths_to_remove = []
393393
for item in list(self.list):
394-
# BD item? Is it marked as watched in the DB?
394+
# DB item? Is it marked as watched in the DB?
395395
if item.dbid:
396396
playcount = get_playcount(item.type, item.dbid)
397397
if playcount and playcount > 0:
@@ -403,11 +403,11 @@ def load_or_init(self) -> None:
403403
elif item.resumetime and item.totaltime:
404404
percent_played = (item.resumetime / item.totaltime) * 100
405405
# Use the user set playcount_minium_percent if there is one, or fallback to Kodi default 90 percent
406-
setting = float(get_advancedsetting('video/playcountminimumpercent')) or None
407-
playcount_minium_percent = float(setting) if setting else 90.0
406+
setting = get_advancedsetting('video/playcountminimumpercent')
407+
playcount_minium_percent = float(setting) if setting and setting != 0 else 90.0
408408
if percent_played >= playcount_minium_percent:
409409
list_needs_save = True
410-
Logger.debug(f"Filtering watched playback from the list (as {percent_played:.1f}% played over playcount_minium_percent {playcount_minium_percent}%: [{item.pluginlabel}]")
410+
Logger.debug(f"Filtering watched playback from the list (as {percent_played:.1f}% played over playcount_minium_percent {playcount_minium_percent}%): [{item.pluginlabel}]")
411411
paths_to_remove.append(item.path)
412412

413413
if paths_to_remove:

0 commit comments

Comments
 (0)