spotify: resilient fetching, progress bars, venv launcher

- fetch() uses a retrying session (connection resets, 5xx, 429 Retry-After)
  with backoff, so a transient drop mid-fetch no longer aborts the run.
- tqdm progress bars on all paginated fetches (driven by paging `total`).
- Flow.fetch_spotify(): drop stray `self` from the @staticmethod.
- gui.sh runs the venv's streamlit from the script dir; add requirements.txt.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
Шурупов Илья Викторович 2026-06-15 00:39:59 +03:00
parent 16b55b0674
commit 36058c318a
5 changed files with 71 additions and 26 deletions

12
main.py
View file

@ -17,17 +17,17 @@ def test1():
def main():
flow = Flow.Flow()
# flow.fetch_spotify()
flow.fetch_spotify()
# flow.fetch_local()
flow.parse_spotify_library()
flow.parse_itunes_library()
flow.parse_local_library()
#flow.parse_itunes_library()
#flow.parse_local_library()
flow.load_libraries()
#flow.load_libraries()
flow.map_local_to_spotify()
flow.save_libraries()
#flow.map_local_to_spotify()
#flow.save_libraries()
# flow.log_stats()