Commit a4820ed5 authored by David Trattnig's avatar David Trattnig
Browse files

Improve fallback or missing titles.

parent dc6ef0d2
......@@ -182,7 +182,7 @@ class ServerRedisAdapter(threading.Thread, RedisMessenger):
if not artist:
artist = ""
if not title:
title = "n/a"
title = ""
self.execute(RedisChannel.TS_REPLY.value, self.scheduler.adapt_trackservice_title, file, artist, title)
......
......@@ -310,7 +310,7 @@ class AuraCalendarService(threading.Thread):
playlistentrymetadata_db.artificial_entry_id = playlistentry_db.artificial_id
if "artist" not in metadata:
self.logger.warning("Artist not found in metadata for track '%s'. Setting to 'n/a'" % playlistentry_db.filename)
playlistentrymetadata_db.artist = "n/a"
playlistentrymetadata_db.artist = ""
else:
playlistentrymetadata_db.artist = metadata["artist"]
playlistentrymetadata_db.title = metadata["title"]
......
......@@ -131,7 +131,7 @@ class FallbackManager:
if file:
# Send admin email to notify about the fallback state
if not active_playlist:
active_playlist = "n/a"
active_playlist = "-"
msg = "AURA ENGINE %s FALLBACK DETECTED!\n\n" % fallbackname
msg += "Expected, active Schedule: %s \n" % active_schedule
msg += "Expected, active Playlist: %s \n\n" % active_playlist
......
......@@ -325,6 +325,10 @@ class AuraScheduler(ExceptionLogger, threading.Thread):
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)
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment