Describe the issue
Every 10 seconds, I download a new image from my photo library and the downloading of image hangs when using an account that is being shared a photo album.
This seems to work fine when I use a token and the address to my local plex server but I didn't want to use a token that gave full access to my plex server.
So I created a new user and shared my plex photo library to it.
Then I used MyPlexAccount to connect instead of just PlexServer(baseurl, token) which seems to work but after a while, downloading will hang and never finish.
I can't even ctrl-C to kill the job.
Code snipppets
account=MyPlexAccount(shared_username, shared_password)
token=account.authenticationTokenplex=account.resources()[0].connect() # returns a PlexServer instancetoken=plex.createToken()
photoAlbums=plex.library.section('Photos')
photo=photoList[photoIndex]
media=photo.media[0]
part=media.parts[0]
downloadUrl=plex.url(part.key)
tempFilename=GetTempFilePath()
try:
plexapi.utils.download(downloadUrl, token, tempFilename)
except:
e=sys.exc_info()[0]
print('Failed to download: %s at: %s for: %s'% (downloadUrl, tempFilename, e))
raiseafter a while, it stops. it never except, it never finishes...
baseurl='http://raspberrypi.local:32400'token='some token looked up on my main account that i can'tfindequivalentonmysharedaccount'
plex=PlexServer(baseurl, token)
photoAlbums=plex.library.section('Photos')
photo=photoList[photoIndex]
media=photo.media[0]
part=media.parts[0]
downloadUrl=plex.url(part.key)
tempFilename=GetTempFilePath()
try:
plexapi.utils.download(downloadUrl, token, tempFilename)
except:
e=sys.exc_info()[0]
print('Failed to download: %s at: %s for: %s'% (downloadUrl, tempFilename, e))
raiseThis can work for days but I can only get the token to my main account which has full access to the server. I want to avoid this.
Expected behavior
Just don't hang.
Enviroment (please complete the following information):
- OS: [Windows]
- Plex version [4.20.2]
- Python Version [3.7.9]
- PlexAPI version [ 4.1.0]
Additional context
I can probably provide my full code with credentials since it's a "shared account". just not on public github.
Describe the issue
Every 10 seconds, I download a new image from my photo library and the downloading of image hangs when using an account that is being shared a photo album.
This seems to work fine when I use a token and the address to my local plex server but I didn't want to use a token that gave full access to my plex server.
So I created a new user and shared my plex photo library to it.
Then I used MyPlexAccount to connect instead of just PlexServer(baseurl, token) which seems to work but after a while, downloading will hang and never finish.
I can't even ctrl-C to kill the job.
Code snipppets
after a while, it stops. it never except, it never finishes...
This can work for days but I can only get the token to my main account which has full access to the server. I want to avoid this.
Expected behavior
Just don't hang.
Enviroment (please complete the following information):
Additional context
I can probably provide my full code with credentials since it's a "shared account". just not on public github.