I-am-PUID-0 / pd_zurg

A combined docker image for the unified deployment of itsToggle's, yowmamasita's, and ncw's projects -- plex_debrid, zurg, and rclone
MIT License
173 stars 14 forks source link

trakt not working on jellyfin #72

Closed chessvoid closed 1 month ago

chessvoid commented 1 month ago

Trying to authenticate via Trakt API results in "[trakt] error: (401 unauthorized): trakt api key for user 'f' does not seem to work. Consider re-authorizing plex_debrid for this trakt user."

My config file:

    "Content Services": [
        "Plex",
        "Trakt",
        "Overseerr"
    ],
    "Plex users": [],
    "Plex auto remove": "movie",
    "Trakt users": [
    "redacted1"
    ],
    "Trakt lists": [
        "movies-and-shows"
    ],
    "Trakt auto remove": "movie",
    "Trakt early movie releases": "false",
    "Overseerr users": [
        "all"
    ],
    "Overseerr API Key": "redacted",
    "Overseerr Base URL": "http://address",
    "Library collection service": [
        "Trakt Collection"
    ],
    "Library update services": [
        "Jellyfin Libraries"
    ],
    "Library ignore services": [
        "Local Ignore List"
    ],
    "Trakt library user": [
        "redacted1"
    ],
    "Trakt refresh user": [
        "redacted1"
    ],
    "Plex library refresh": [],
    "Plex library partial scan": "true",
    "Plex library refresh delay": "2",
    "Plex server address": "http://localhost:32400",
    "Plex library check": [],
    "Plex ignore user": "",
    "Trakt ignore user": "",
    "Local ignore list path": "/config/",
    "Jellyfin API Key": "redacted",
    "Jellyfin server address": "redacted",
    "Sources": [
        "torrentio"
    ],
    "Versions": [
        [
            "1080p SDR",
            [
                [
                    "retries",
                    "<=",
                    "48"
                ],
                [
                    "media type",
                    "all",
                    ""
                ]
            ],
            "true",
            [
                [
                    "cache status",
                    "requirement",
                    "cached",
                    ""
                ],
                [
                    "resolution",
                    "requirement",
                    "<=",
                    "1080"
                ],
                [
                    "resolution",
                    "preference",
                    "highest",
                    ""
                ],
                [
                    "title",
                    "requirement",
                    "exclude",
                    "([^A-Z0-9]|HD|HQ)(CAM|T(ELE)?(S(YNC)?|C(INE)?)|ADS|HINDI)([^A-Z0-9]|RIP|$)"
                ],
                [
                    "title",
                    "requirement",
                    "exclude",
                    "(3D)"
                ],
                [
                    "title",
                    "requirement",
                    "exclude",
                    "(DO?VI?)"
                ],
                [
                    "title",
                    "requirement",
                    "exclude",
                    "(HDR)"
                ],
                [
                    "title",
                    "preference",
                    "include",
                    "(EXTENDED|REMASTERED|DIRECTORS|THEATRICAL|UNRATED|UNCUT|CRITERION|ANNIVERSARY|COLLECTORS|LIMITED|SPECIAL|DELUXE|SUPERBIT|RESTORED|REPACK)"
                ],
                [
                    "size",
                    "preference",
                    "highest",
                    ""
                ],
                [
                    "seeders",
                    "preference",
                    "highest",
                    ""
                ],
                [
                    "size",
                    "requirement",
                    ">=",
                    "0.1"
                ]
            ]
        ]
    ],
    "Special character renaming": [
        [
            "&",
            "and"
        ],
        [
            "\u00fc",
            "ue"
        ],
        [
            "\u00e4",
            "ae"
        ],
        [
            "\u00e2",
            "a"
        ],
        [
            "\u00e1",
            "a"
        ],
        [
            "\u00e0",
            "a"
        ],
        [
            "\u00f6",
            "oe"
        ],
        [
            "\u00f4",
            "o"
        ],
        [
            "\u00df",
            "ss"
        ],
        [
            "\u00e9",
            "e"
        ],
        [
            "\u00e8",
            "e"
        ],
        [
            "\u00ee",
            "i"
        ],
        [
            "sh!t",
            "shit"
        ],
        [
            "f**k",
            "fuck"
        ],
        [
            "f**king",
            "fucking"
        ],
        [
            ":",
            ""
        ],
        [
            "(",
            ""
        ],
        [
            ")",
            ""
        ],
        [
            "`",
            ""
        ],
        [
            "\u00b4",
            ""
        ],
        [
            ",",
            ""
        ],
        [
            "!",
            ""
        ],
        [
            "?",
            ""
        ],
        [
            " - ",
            " "
        ],
        [
            "'",
            ""
        ],
        [
            "\u200b",
            ""
        ],
        [
            "*",
            ""
        ],
        [
            " ",
            "."
        ]
    ],
    "Rarbg API Key": "r05xvbq6ul",
    "Jackett Base URL": "http://127.0.0.1:9117",
    "Jackett API Key": "",
    "Jackett resolver timeout": "1",
    "Jackett indexer filter": "!status:failing,test:passed",
    "Prowlarr Base URL": "http://127.0.0.1:9696",
    "Prowlarr API Key": "",
    "Orionoid API Key": "",
    "Orionoid Scraper Parameters": [
        [
            "limitcount",
            "5"
        ],
        [
            "sortvalue",
            "popularity"
        ],
        [
            "streamtype",
            "torrent"
        ],
        [
            "filename",
            "true"
        ]
    ],
    "Nyaa parameters": "&c=1_0&s=seeders&o=desc",
    "Nyaa sleep time": "5",
    "Nyaa proxy": "nyaa.si",
    "Torrentio Scraper Parameters": "https://torrentio.strem.fun/sort=qualitysize|qualityfilter=480p,scr,cam/manifest.json",
    "Zilean Base URL": "http://zilean.zilean:8181",
    "Debrid Services": [
        "Real Debrid"
    ],
    "Tracker specific Debrid Services": [],
    "Real Debrid API Key": "redacted",
    "All Debrid API Key": "",
    "Premiumize API Key": "",
    "Debrid Link API Key": "",
    "Put.io API Key": "",
    "Show Menu on Startup": "true",
    "Debug printing": "false",
    "Log to file": "false",
    "Watchlist loop interval (sec)": 30,
    "version": [
        "2.97",
        "Settings compatible update",
        []
    ]
}

My docker compose file:

pd_zurg:
    container_name: pd_zurg
    image: iampuid0/pd_zurg:latest
    ## Optionally, specify a specific version of pd_zurg
    # image: iampuid0/pd_zurg:2.0.0
    stdin_open: true # docker run -i
    tty: true        # docker run -t    
    volumes:
      ## Location of configuration files. If a Zurg config.yml and/or Zurg app is placed here, it will be used to override the default configuration and/or app used at startup. 
      - ~/docker/pd_zurg/config:/config
      ## Location for logs
      - ~/docker/pd_zurg/log:/log
      ## Location for rclone cache if enabled
      - ~/docker/pd_zurg/cache:/cache
      ## Location for Zurg RealDebrid active configuration
      - ~/docker/pd_zurg/RD:/zurg/RD
      ## Location for Zurg AllDebrid active configuration -- when supported by Zurg     
      - /home/username/pd_zurg/AD:/zurg/AD   
      ## Location for rclone mount to host
      - ~/docker/pd_zurg/mnt:/data:shared       
    environment:
      - TZ=
      ## Zurg Required Settings
      - ZURG_ENABLED=true      
      - RD_API_KEY=red     
      - TRAKT_CLIENT_ID=red
      - TRAKT_CLIENT_SECRET=red

      ## Zurg Optional Settings
     # - ZURG_LOG_LEVEL=DEBUG
     # - ZURG_VERSION=v0.9.2-hotfix.4
     # - ZURG_UPDATE=true
     # - PLEX_REFRESH=true
     # - PLEX_MOUNT_DIR=/rclone/pd_zurg 
     # - ZURG_USER=
     # - ZURG_PASS=
     # - ZURG_PORT=8800
      ## Rclone Required Settings
      - RCLONE_MOUNT_NAME=pd_zurg
      ## Rclone Optional Settings - See rclone docs for full list
      - RCLONE_UID=1000
      - RCLONE_GID=1000
      #- NFS_ENABLED=true
      #- NFS_PORT=8000
      #- RCLONE_LOG_LEVEL=DEBUG
      - RCLONE_CACHE_DIR=/cache
      - RCLONE_DIR_CACHE_TIME=10s
      - RCLONE_VFS_CACHE_MODE=full
     # - RCLONE_VFS_CACHE_MAX_SIZE=100G
     # - RCLONE_ATTR_TIMEOUT=8700h
     # - RCLONE_BUFFER_SIZE=32M
     # - RCLONE_VFS_CACHE_MAX_AGE=4h
     # - RCLONE_VFS_READ_CHUNK_SIZE=32M
     # - RCLONE_VFS_READ_CHUNK_SIZE_LIMIT=1G
     # - RCLONE_TRANSFERS=8
      ## Plex Debrid Required Settings
      - PD_ENABLED=true
      ## To utilize plex_debrid with Plex, the following environment variables are required
      #- PLEX_USER=
      #- PLEX_TOKEN=
      #- PLEX_ADDRESS=
      ## To utilize plex_debrid with Jellyfin, the following environment variables are required - Note that plex_debrid will require addtional setup befor use with Jellyfin
      - JF_ADDRESS=http://red:8096
      - JF_API_KEY=red
      ## Plex Debrid Optional Settings
      - PD_UPDATE=true # only works when PD_REPO set
      - PD_REPO=itsToggle,plex_debrid,main
      - SHOW_MENU=true
      - SEERR_API_KEY=red
      - SEERR_ADDRESS=http:/red:5055
      ## Special Features
      #- AUTO_UPDATE_INTERVAL=12
      #- DUPLICATE_CLEANUP=true
      #- CLEANUP_INTERVAL=1
      - PDZURG_LOG_LEVEL=DEBUG
      #- PDZURG_LOG_COUNT=2
      #- PDZURG_LOG_SIZE=10M
      - PD_LOG_LEVEL=DEBUG    
# Example to attach to gluetun vpn container if realdebrid blocks IP address 
    network_mode: container:gluetun  
    devices:
      - /dev/fuse:/dev/fuse:rwm
    cap_add:
      - SYS_ADMIN     
    security_opt:
      - apparmor:unconfined    
      - no-new-privileges

OS: Ubuntu Docker

I-am-PUID-0 commented 1 month ago

I noticed that "Trakt users" and "Trakt library user" in your example don't have the api_key field, were they removed as part of redacting or missing?


{
    "Content Services": [
        "Plex",
        "Trakt",
        "Overseerr"
    ],
    "Plex users": [],
    "Plex auto remove": "movie",
    "Trakt users": [
        [
            "username",
            "api_key"
        ]
    ],
    "Trakt lists": [],
    "Trakt auto remove": "movie",
    "Trakt early movie releases": "false",
    "Overseerr users": [
        "all"
    ],
    "Overseerr API Key": "api_key",
    "Overseerr Base URL": "http://192.168.90.215:5055",
    "Library collection service": [
        "Trakt Collection"
    ],
    "Library update services": [
        "Jellyfin Libraries"
    ],
    "Library ignore services": [
        "Local Ignore List"
    ],
    "Trakt library user": [
        "username",
        "api_key"
    ],
    "Trakt refresh user": [],
    "Plex library refresh": [],
    "Plex library partial scan": "true",
    "Plex library refresh delay": "2",
    "Plex server address": "http://localhost:32400",
    "Plex library check": [],
    "Plex ignore user": "",
    "Trakt ignore user": "",
    "Local ignore list path": "/config/",
    "Jellyfin API Key": "api_key",
    "Jellyfin server address": "http://192.168.90.26:8096",
    "Sources": [
        "torrentio"
    ],```
chessvoid commented 1 month ago

Solved the issue had to delete config recreate container and apply settings from here https://github.com/I-am-PUID-0/pd_zurg/issues/71, to my docker-compose, the api field was missing for some reason from my config, and plex_debrid ui didn't ask for api authorization before.