Skip to content
Snippets Groups Projects
Commit 9ba4d763 authored by David Trattnig's avatar David Trattnig
Browse files

Entry history output and stream source attribute.

parent 1cd3a481
No related branches found
No related tags found
No related merge requests found
...@@ -66,7 +66,11 @@ class PlayerStateService: ...@@ -66,7 +66,11 @@ class PlayerStateService:
self.entry_history.pop() self.entry_history.pop()
self.entry_history.appendleft(entry) self.entry_history.appendleft(entry)
self.logger.info("Active entry history:\n"+str(self.entry_history)) msg = "Active entry history:\n"
msg += "\n" + str(self.entry_history[0])
msg += "\n" + str(self.entry_history[1])
msg += "\n" + str(self.entry_history[2])
self.logger.info(msg)
...@@ -93,7 +97,7 @@ class PlayerStateService: ...@@ -93,7 +97,7 @@ class PlayerStateService:
if not active_entry: if not active_entry:
raise NoActiveEntryException raise NoActiveEntryException
if active_entry.filename == source: if active_entry.source == source:
trackservice = TrackService(active_entry) trackservice = TrackService(active_entry)
trackservice.store(add=True, commit=True) trackservice.store(add=True, commit=True)
...@@ -102,13 +106,13 @@ class PlayerStateService: ...@@ -102,13 +106,13 @@ class PlayerStateService:
self.logger.info("Stored active entry '%s' to TrackService as '%s'" % (active_entry, trackservice)) self.logger.info("Stored active entry '%s' to TrackService as '%s'" % (active_entry, trackservice))
else: else:
msg = "Active entry source '%s' != '%s' activated source." % (active_entry.filename, source) msg = "Active entry source '%s' != '%s' activated source." % (active_entry.source, source)
self.logger.critical(SimpleUtil.red(msg)) self.logger.critical(SimpleUtil.red(msg))
# def adapt_trackservice_title(self, filename): # def adapt_trackservice_title(self, source):
# """ # """
# Updates the track-service entry with the info from a fallback track/playlist. # Updates the track-service entry with the info from a fallback track/playlist.
# """ # """
...@@ -123,8 +127,8 @@ class PlayerStateService: ...@@ -123,8 +127,8 @@ class PlayerStateService:
# # title = self.config.get("fallback_title_not_available") # # title = self.config.get("fallback_title_not_available")
# # Create Entry # # Create Entry
# entry.filename = filename # entry.source = source
# entry.duration = self.fallback_manager.get_track_duration(filename) # entry.duration = self.fallback_manager.get_track_duration(source)
# if not entry.duration: # if not entry.duration:
# self.logger.critical("Entry %s has no duration! This may cause malfunction of some engine services." % (str(entry))) # self.logger.critical("Entry %s has no duration! This may cause malfunction of some engine services." % (str(entry)))
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment