Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

download() with kwargs clobbers multiple parts/media #1427

Closed
montaguethomas opened this issue Jun 13, 2024 · 0 comments · Fixed by #1428
Closed

download() with kwargs clobbers multiple parts/media #1427

montaguethomas opened this issue Jun 13, 2024 · 0 comments · Fixed by #1428

Comments

@montaguethomas
Copy link
Contributor

Describe the Bug

The download() method on PlexObject class when passed kwargs will use getStreamURL() method. However it is called exactly the same for each Media Part that is being looped over.

download_url = self.getStreamURL(**kwargs)

This results in generating transcode urls for the same media and part index multiple times, which default to 0 and not defined in the kwargs passed to getStreamURL().

'mediaIndex': kwargs.pop('mediaIndex', 0),
'partIndex': kwargs.pop('mediaIndex', 0),

Code Snippets

No response

Expected Behavior

download() method's parts loop should set mediaIndex and partIndex when calling getStreamURL() in order to return different transcoding urls.

Additional Context

This is still affected by the #1208 issue where downloaded file names could clobber the file written to disk.

Operating System and Version

All

Plex Media Server Version

All

Python Version

All

PlexAPI Version

2.x

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant