Open ghost opened 6 months ago
I was able to fixt trakt issue on mine, janky but it worked I tracked down trakt.py script in my docker subvolumes for plex_debrid i temporarily changed this function
def post(url, data):
try:
response = session.post(url, headers={
'User-Agent': 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_11_5) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/50.0.2661.102 Safari/537.36',
'Content-type': "application/json", "trakt-api-key": client_id, "trakt-api-version": "2",
"Authorization": "Bearer " + current_user[1]}, data=data)
logerror(response)
response = json.loads(response.content, object_hook=lambda d: SimpleNamespace(**d))
time.sleep(1.1)
except:
response = None
return response
to
def post(url, data):
try:
response = session.post(url, headers={
'Content-type': "application/json"}, data=data)
logerror(response)
response = json.loads(response.content, object_hook=lambda d: SimpleNamespace(**d))
time.sleep(1.1)
except:
response = None
return response
restarted PD and went through trakt authorzation again saved settings reverted script change and restarted PD again
HI it worked for me. Thank you! I guess the author of this script should take a note of it and add it to the next version. Thanks so much @mash2k3
I made changes to the fix, its more of a permanent fix no reverting required. in case dev does not fix before trakt token expires. adds a separate post(post2) function for oauth function.
If you dont feel comfortable editing file, i attached the file here. make sure to extract first then copy and overwrite in correct location. trakt.zip
Tell me one thing, whatever changes I made now based on your previous comment would require the need of re-authentication soon?
Tell me one thing, whatever changes I made now based on your previous comment would require the need of re-authentication soon?
no re-authentication will come up in a month or so or several month, but when it does and you used the first fix method you will need to do the same thing with changing code and reverting.
With the second fix method you set it once and it should be good for the next re-authentications with out tinkering with the script.
Got it so shall I do this now or do it when re-authenticating next time? If I do the changes in script now, is there any need of re-authentication?
Got it so shall I do this now or do it when re-authenticating next time? If I do the changes in script now, is there any need of re-authentication?
its up to you
Okay I have a made a changes
does anyone have this in a fork?
Not understanding why this issue got closed exactly.
@mash2k3 Can you tell us where you put this or how to locate this file?
@mash2k3 Can you tell us where you put this or how to locate this file?
basically you want to access your docker sub-volume for plex_debrid
On my unraid i used winscp and connected using my ssh credentials and port 22. it should work the same for other linux servers or NAS.
my path was what i pasted below but for you the value bcf216c3705d416a61f9be5be7b46703165759b3b1a41be541fe5fc12efc88e0
will be different. go to /var/lib/docker/btrfs/subvolumes/
first then search for trakt.py it will find the file and your correct folder name
/var/lib/docker/btrfs/subvolumes/bcf216c3705d416a61f9be5be7b46703165759b3b1a41be541fe5fc12efc88e0/content/services
For my ubuntu server on a cloud server i used filebrowser, which is a docker container. i installed following their instructions.
on ubuntu the path is /var/lib/docker/overlay2
then i did the same thing above to find correct folder.
If you dont feel comfortable editing file, i attached the file here. make sure to extract first then copy and overwrite in correct location. trakt.zip
You could just do docker exec -it plex_debrid /bin/bash
to gain a shell to the docker container
You could just do
docker exec -it plex_debrid /bin/bash
to gain a shell to the docker container
In my book a volume for mounting the edited file does the job elegantly for the time being.
Yeah bind mounting the dir as well would be really simple. Can just look at the Dockerfile to find out where it stores the app, then bind mount that dir locally.
Whatever is easiest for others 🍡
def post(url, data): try: response = session.post(url, headers={ 'Content-type': "application/json"}, data=data) logerror(response) response = json.loads(response.content, object_hook=lambda d: SimpleNamespace(**d)) time.sleep(1.1) except: response = None return response
So I think I was able to edit it, but it keeps creating a new container each time.
def post(url, data):
try: response = session.post(url, headers={ 'Content-type': "application/json"}, data=data) logerror(response) response = json.loads(response.content, object_hook=lambda d: SimpleNamespace(**d)) time.sleep(1.1) except: response = None return response
So I think I was able to edit it, but it keeps creating a new container each time.
That why you want to mount the edit from the host to the container. Otherwise just use git and python directly.
So I got git to work with python and was able to reauthorize it using the code that popped up, but it's still giving the 401 unauthorized error.
I made changes to the fix, its more of a permanent fix no reverting required. in case dev does not fix before trakt token expires.
adds a separate post(post2) function for oauth function.
If you dont feel comfortable editing file, i attached the file here. make sure to extract first then copy and overwrite in correct location.
This is the permafix.
I made changes to the fix, its more of a permanent fix no reverting required. in case dev does not fix before trakt token expires. adds a separate post(post2) function for oauth function. If you dont feel comfortable editing file, i attached the file here. make sure to extract first then copy and overwrite in correct location. trakt.zip
This is the permafix.
I think there was something wrong with my config as it's working after I deleted settings.json and went through and redid it. Thank you for the help!
Hi I am raising this concern as the Trakt API to authenticate user has been deprecated I guess and it needs to be updated in the script.
While setting up the service again, I found this issue here and I am not able to check the new content from Trakt and the new content can only be seen from Plex