mirror of
https://github.com/Findus23/RadioStats.git
synced 2024-09-19 16:03:48 +02:00
start with id
This commit is contained in:
parent
62e2fd5498
commit
3b80dfc630
1 changed files with 4 additions and 3 deletions
|
@ -17,11 +17,12 @@ else:
|
|||
limit = 50
|
||||
|
||||
query = Song.select().where((Song.show == 0))
|
||||
if not len(sys.argv) > 2 or sys.argv[2] != "force":
|
||||
if not len(sys.argv) > 3 or sys.argv[2] != "force":
|
||||
query = query.where(Song.spotify_data.is_null())
|
||||
else:
|
||||
print("fetching empty")
|
||||
query = query.where(Song.spotify_data == 0)
|
||||
starting = int(sys.argv[2])
|
||||
print("fetching empty starting from {id}".format(id=starting))
|
||||
query = query.where((Song.spotify_data == 0) & (Song.id >= starting))
|
||||
for song in query.limit(limit):
|
||||
song.title = song.title.replace("+", " ")
|
||||
print(song.title)
|
||||
|
|
Loading…
Reference in a new issue