[GH-ISSUE #140] [REQUEST] provide a way to get the decrypted file size for a given stream #20

Open
opened 2026-02-27 08:11:28 +03:00 by kerem · 0 comments
Owner

Originally created by @Yetangitu on GitHub (Jun 30, 2022).
Original GitHub issue: https://github.com/kokarare1212/librespot-python/issues/140

See https://github.com/kokarare1212/librespot-python/issues/135#issuecomment-1171364255

I'm looking for way to get the decrypted size - or 'file size' - for a content stream. I use this data point in spodcast to decide whether to re-download a previously downloaded episode, e.g. due to it being edited since publishing (I've seen this happen) or due to the previous download being interrupted. This worked in the previous iteration (which used raw web API access, something which no longer works due to changes in the way Spotify serves netcast episodes) but in the current version (which uses librespot-python interfaces to retrieve metadata) I seem to only be able to get the size of the encrypted stream which is ~13% larger than the decrypted content.

I don't know whether Spotify makes these data available, if they don't I'll have to forego on this check for Spotify-hosted (i.e. encrypted) episodes.

Originally created by @Yetangitu on GitHub (Jun 30, 2022). Original GitHub issue: https://github.com/kokarare1212/librespot-python/issues/140 See https://github.com/kokarare1212/librespot-python/issues/135#issuecomment-1171364255 I'm looking for way to get the decrypted size - or 'file size' - for a content stream. I use this data point in _spodcast_ to decide whether to re-download a previously downloaded episode, e.g. due to it being edited since publishing (I've seen this happen) or due to the previous download being interrupted. This worked in the previous iteration (which used raw web API access, something which no longer works due to changes in the way Spotify serves netcast episodes) but in the current version (which uses _librespot-python_ interfaces to retrieve metadata) I seem to only be able to get the size of the encrypted stream which is ~13% larger than the decrypted content. I don't know whether Spotify makes these data available, if they don't I'll have to forego on this check for Spotify-hosted (i.e. encrypted) episodes.
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/librespot-python-kokarare1212#20
No description provided.