Commit Graph

8 Commits

Author SHA1 Message Date
Tim Rae
1a2aedf7a5 Set 2s timeout when connecting to Spotify
I've been having an issue where the script hangs for a long time
when starting up. It seems to be caused by the connection request
to Spotify failing on the first request (which uses IPv6) and
having to wait for the retry attempt using IPv4

2s should be plenty for just getting the refresh token and is
much more tolerable in case of IPv6 failure
2024-05-25 12:13:02 +02:00
Tim Rae
8884ec8c8f Merge pull request #41 from spotify2tidal/feature/miss_cache
Add cache of match failures
2024-05-25 09:41:12 +02:00
joshrmcdaniel
b25e1c3b36 rm playlist import 2024-05-24 16:59:26 -05:00
joshrmcdaniel
df3e406570 playlist 2024-05-24 16:59:01 -05:00
Tim Rae
311822ecdc Add cache of match failures
This change introduces an sqlite database that contains the track_id,
db insertion time, and ttl in the cache. The ttl starts with one week,
and increases exponentially by a factor of 2 each time the same track_id
is added to the database.

This significantly reduces the execution of the time script when there
are a lot of match failures accumulating, which do not need to check
every time.
2024-05-22 14:54:17 +02:00
joshrmcdaniel
76f502f2bc types 2024-05-12 10:46:39 -05:00
joshrmcdaniel
6aaf72bdd1 type hint, move 2024-05-12 10:27:23 -05:00
joshrmcdaniel
4e0c81071b move to src 2024-05-12 10:20:52 -05:00