mirror of
https://github.com/unshackle-dl/unshackle.git
synced 2026-12-03 06:25:10 +00:00
fix(title-cache): key a cookie-only login by its cookie file path
This commit is contained in:
@@ -650,14 +650,16 @@ prepared, all derived from the Click context (`ctx`) that `dl` passes in.
|
||||
everywhere. (unshackle also ships an rnet-based TLS-fingerprinting HTTP session that the
|
||||
newer `session()` factory uses and that the `network` config key configures.)
|
||||
- **`self.credential`**: the active `Credential` (`username:password[:extra]`), populated
|
||||
by `authenticate`. unshackle uses its `sha1` as the account hash for cache keys.
|
||||
by `authenticate`. unshackle uses its `sha1` as the account hash for cache keys. A login
|
||||
with cookies only uses a hash of the path of its cookie file.
|
||||
- **`self.cache`**: a generic `Cacher`: JSON key/value storage under the service's cache
|
||||
dir, with CRC32 integrity checks, versioning, and optional expiry (auto-derived from a
|
||||
JWT `exp` claim when present). Good for auth tokens and API responses.
|
||||
- **`self.title_cache`**: a `TitleCacher` that wraps `get_titles` results, keyed by title
|
||||
ID, region, and account hash. It serves fresh data within `title_cache_time`, falls back
|
||||
to stale data within `title_cache_max_retention` when an API call fails, and `--no-cache`
|
||||
bypasses it.
|
||||
bypasses it. If you put the cookies of a different account into the same cookie file, use
|
||||
`--reset-cache` once.
|
||||
- **`self.track_request`**: the `TrackRequest` describing what the user asked for
|
||||
(codecs, ranges, best-available), for use inside `get_tracks`.
|
||||
|
||||
|
||||
Reference in New Issue
Block a user