Skip to content

download related issues #448

Description

@MrDini123

Hi,

Since Plex doesn't have an option to directly mirror a complete server content, I am doing it via plexapi and a simple script. I do it as simple as follows:

from pathlib import Path
from plexapi.myplex import MyPlexAccount

plex = MyPlexAccount('my_user', 'supersecret').resource('Da Server').connect()

movies = plex.library.section('Movies')
    print(movie.title)
    print(movie.download(savepath=Path.cwd()/f'{movie.title.replace(":", ".")}'))

However my first problem happened while pulling a 4K video over a not so powerfull server. On the webgui, upon opening I get a "server is not powerfull enough to play the content" error, but plexapi seems to simply download a 400 error in mkv format. Would be nice to check for those.

Then the next issue I have encountered is directly connected to how the download function was implemented:

https://github.com/pkkid/python-plexapi/blob/20160b9b4f327ed9cdddeb1f180033e976e793cc/plexapi/video.py#L263-L287

There is no check for actually valid file path names therefore the movie that has a : in its name, simply fails on Windows. I would recommend using sluggify to solve this problem.

Thanks

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions