Skip to content

Commit

Permalink
Merge pull request #280 from MoojMidge/patch-discs
Browse files Browse the repository at this point in the history
Check for physical disc or disc image being played
  • Loading branch information
MoojMidge authored Sep 2, 2022
2 parents dcd6ce2 + a2488b3 commit 80258b1
Showing 1 changed file with 10 additions and 1 deletion.
11 changes: 10 additions & 1 deletion resources/lib/monitor.py
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ def log(self, msg, level=1):
"""Log wrapper"""
ulog(msg, name=self.__class__.__name__, level=level)

def run(self):
def run(self): # pylint: disable=too-many-branches
"""Main service loop"""
self.log('Service started', 0)

Expand Down Expand Up @@ -64,6 +64,15 @@ def run(self):
self.playback_manager.demo.hide()
continue

if (current_file.startswith((
'bluray://', 'dvd://', 'udf://', 'iso9660://', 'cdda://'))
or current_file.endswith((
'.bdmv', '.iso', '.ifo'))):
self.log('Up Next tracking stopped, Blu-ray/DVD/CD playing', 2)
self.player.disable_tracking()
self.playback_manager.demo.hide()
continue

if last_file and last_file == from_unicode(current_file):
# Already processed this playback before
continue
Expand Down

0 comments on commit 80258b1

Please sign in to comment.