Prepare V0.2
This commit is contained in:
@@ -17,6 +17,9 @@ import uuid
|
||||
import json
|
||||
import ffmpy
|
||||
|
||||
# Track whether we've already applied the OGG delay for bulk (album/playlist) downloads
|
||||
_ogg_delay_applied_once = False
|
||||
|
||||
def get_saved_tracks() -> list:
|
||||
songs = []
|
||||
offset = 0
|
||||
@@ -346,8 +349,16 @@ def download_track(mode: str, track_id: str, extra_keys=None, disable_progressba
|
||||
else:
|
||||
Printer.print(PrintChannel.PROGRESS_INFO, '\n### STARTING "' + song_name + '" ###' + "\n")
|
||||
if ext == 'ogg':
|
||||
# SpotiClub : TEMP? : For albums/playlists, wait 5 seconds between OGG tracks to avoid
|
||||
# spamming the SpotiClub API for audio keys.
|
||||
# Skip the very first track in the run and for single-track downloads.
|
||||
global _ogg_delay_applied_once
|
||||
if mode in ('album', 'playlist', 'extplaylist'):
|
||||
if _ogg_delay_applied_once:
|
||||
Printer.print(PrintChannel.PROGRESS_INFO, '\n## OGG File : Waiting 5 seconds before resuming... ##')
|
||||
time.sleep(5);
|
||||
time.sleep(5)
|
||||
else:
|
||||
_ogg_delay_applied_once = True
|
||||
if track_id != scraped_song_id:
|
||||
track_id = scraped_song_id
|
||||
track = TrackId.from_base62(track_id)
|
||||
|
||||
Reference in New Issue
Block a user