mirror of
https://github.com/Findus23/RadioStats.git
synced 2024-09-19 16:03:48 +02:00
skip songs without images
This commit is contained in:
parent
2bf7874cb9
commit
450ba98437
1 changed files with 2 additions and 1 deletions
3
color.py
3
color.py
|
@ -29,7 +29,8 @@ if len(sys.argv) > 1:
|
|||
else:
|
||||
limit = 50
|
||||
|
||||
query = Song.select().where((Song.show == 0) & (Song.spotify_data == 1) & (Song.background_color.is_null()))
|
||||
query = Song.select().where(
|
||||
(Song.show == 0) & (Song.spotify_data == 1) & (Song.image_large.is_null(False)) & (Song.background_color.is_null()))
|
||||
for song in query.order_by(fn.Rand()).limit(limit):
|
||||
print(song.title)
|
||||
url = song.image_large
|
||||
|
|
Loading…
Reference in a new issue