fix lower()

This commit is contained in:
dsc 2023-09-05 23:13:23 +03:00
parent 0bd046cf77
commit bbb9c7b0c6
2 changed files with 2 additions and 2 deletions

View File

@ -192,7 +192,7 @@ class Commands:
return await send_message(target, "No song(s) found!") return await send_message(target, "No song(s) found!")
if songs and needle_2nd: if songs and needle_2nd:
songs = [s for s in songs if needle_2nd in s.title.lower()] songs = [s for s in songs if s.title and needle_2nd in s.title.lower()]
len_songs = len(songs) len_songs = len(songs)
max_songs = 6 max_songs = 6

View File

@ -88,7 +88,7 @@ class Station:
meta: dict = await Radio.icecast_metadata(self) meta: dict = await Radio.icecast_metadata(self)
if meta: if meta:
meta_title = meta.get('title') meta_title = meta.get('title')
if meta_title.lower() in [' ', 'unknown', 'error', 'empty', 'bleepbloopblurp']: if meta_title and meta_title.lower() in [' ', 'unknown', 'error', 'empty', 'bleepbloopblurp']:
meta_title = None meta_title = None
if meta_title and len(songs) > 1 and songs: if meta_title and len(songs) > 1 and songs: