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

Track Service entries for schedules.

parent 0a08ab1d
No related branches found
No related tags found
No related merge requests found
......@@ -311,9 +311,13 @@ class AuraScheduler(ExceptionLogger, threading.Thread):
if not entry.duration:
self.logger.critical("Entry %s has no duration! This may cause malfunction of some engine services." % (str(entry)))
trackservice_entry = TrackService(entry)
trackservice_entry.store(add=True, commit=True)
self.logger.info("Stored track-service entry %s" % trackservice_entry)
trackservice = TrackService(entry)
trackservice.store(add=True, commit=True)
entry.trackservice_id = trackservice.id
entry.store(add=False, commit=True)
self.logger.info("Stored track-service entry %s" % trackservice)
......@@ -321,14 +325,16 @@ class AuraScheduler(ExceptionLogger, threading.Thread):
"""
Updates the track-service entry with the info from a fallback track/playlist.
"""
# FIXME
scheduled_entry = self.get_active_entry()
entry = SingleEntry()
meta = SingleEntryMetaData()
# Validate artist and title
if not title:
title = self.config.get("fallback_title_not_available")
# Create Entry
entry.filename = filename
entry.duration = self.fallback_manager.get_track_duration(filename)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment