Giter Club home page Giter Club logo

Comments (20)

mash2k3 avatar mash2k3 commented on June 11, 2024 1

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.

image

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

from plex_debrid.

ccs46 avatar ccs46 commented on June 11, 2024 1

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.
image
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!

from plex_debrid.

mash2k3 avatar mash2k3 commented on June 11, 2024

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

from plex_debrid.

dspdhckr avatar dspdhckr commented on June 11, 2024

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

from plex_debrid.

dspdhckr avatar dspdhckr commented on June 11, 2024

Tell me one thing, whatever changes I made now based on your previous comment would require the need of re-authentication soon?

from plex_debrid.

mash2k3 avatar mash2k3 commented on June 11, 2024

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.

from plex_debrid.

dspdhckr avatar dspdhckr commented on June 11, 2024

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?

from plex_debrid.

mash2k3 avatar mash2k3 commented on June 11, 2024

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

from plex_debrid.

dspdhckr avatar dspdhckr commented on June 11, 2024

Okay I have a made a changes

from plex_debrid.

jmiller0 avatar jmiller0 commented on June 11, 2024

does anyone have this in a fork?

from plex_debrid.

poochie2 avatar poochie2 commented on June 11, 2024

Not understanding why this issue got closed exactly.

from plex_debrid.

ccs46 avatar ccs46 commented on June 11, 2024

@mash2k3 Can you tell us where you put this or how to locate this file?

from plex_debrid.

mash2k3 avatar mash2k3 commented on June 11, 2024

@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
image

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

from plex_debrid.

dreulavelle avatar dreulavelle commented on June 11, 2024

You could just do docker exec -it plex_debrid /bin/bash to gain a shell to the docker container

from plex_debrid.

poochie2 avatar poochie2 commented on June 11, 2024

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.

from plex_debrid.

dreulavelle avatar dreulavelle commented on June 11, 2024

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 🍡

from plex_debrid.

ccs46 avatar ccs46 commented on June 11, 2024

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.

from plex_debrid.

poochie2 avatar poochie2 commented on June 11, 2024

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.

from plex_debrid.

ccs46 avatar ccs46 commented on June 11, 2024

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.

from plex_debrid.

poochie2 avatar poochie2 commented on June 11, 2024

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.

image

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.

from plex_debrid.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.