question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

[Feature]: Store Trakt.tv authentication details outside of config.yml

See original GitHub issue

Is your feature request related to a problem? Please elaborate.

I have an Ansible playbook to deploy a Docker container for Plex Meta Manager which includes all my configuration YAML files (i.e. config.yml, and other metadata and collection YAML files). When I want to make a change to my configuration, I change the source files, and re-deploy with Ansible. This will rewrite whatever it’s on my server.

You can see how this is problematic for Trakt.tv authentication, which is written to the config.yml by PMM. Every time I re-deploy my Ansible playbooks, the authentication: section for Trakt.tv will be gone, losing the authentication and refresh tokens, thus losing access to my Trakt.tv data.

Describe the solution you’d like

Split the Trakt.tv static configuration from dynamic configuration into different files:

config.yml

trakt:
  client_id:
  client_secret:
  pin:

auth.yml

trakt:
  authorization:
    access_token:
    token_type:
    expires_in:
    refresh_token:
    scope:
    created_at:

This way, I could keep overwriting config.yml without worrying that the Trakt.tv authentication details are going to be overwritten and lost.

Additional Information

No response

Issue Analytics

  • State:closed
  • Created a year ago
  • Comments:19 (11 by maintainers)

github_iconTop GitHub Comments

1reaction
chazlarsoncommented, Aug 29, 2022

But, like you said, I’m just trying to offer workarounds for something that is unlikely to be implemented.

The use cases suggested when this has been discussed previously have basically been this very same use case, so it’s unlikely that plans will change. I’ll bow out, though.

0reactions
meisnate12commented, Aug 30, 2022

When I run my Ansible playbook, this file contents be copied to the remote server, and fully replace the config.yml in the remote server (where I have PMM running, not the same machine where I’m running the Ansible script).

I then run PMM on the remote server (by logging into the machine with SSH), and it will authenticate against Trakt with the provided client ID and secret. Once that process is done, the config.yml in the remote server will be changed to this:

I would recommend authenticating locally and saving that trakt info and push it just like you do for tmdb. Like chaz described above.

The access token expires after 3 months (this is on Trakt’s documentation), and when that happens, the refresh token is then used to regenerate a new access token. Once the refresh token is used on one of the installs it should expire, and not be usable in the other two installs.

In my experience working with the trakt api is that their info on the documentation and what actually happens sometimes differ. I’ve definitely used access tokens longer then every 3 months

Ultimately im working on other features that would make this change meaningless so theres that too.

Read more comments on GitHub >

github_iconTop Results From Across the Web

How do I connect my media center, add-ons or apps using a ...
Create a new Trakt.tv account if you don't have one. Open the plugin, app or add-on settings and look for the authentication section....
Read more >
listrr.pro creates and maintains lists on trakt.tv ... - GitHub
Listrr creates lists for shows and movies based on your filters. The created lists get updated every 24 hours based on your filters,...
Read more >
twolaw/plextraktsync - Docker Image | Docker Hub
This project adds a two-way-sync between trakt.tv and Plex Media Server. ... parts of the functionality of this software, look no further than...
Read more >
Local Walkthrough - Plex Meta Manager Wiki
All the configuration of PMM is done via YAML text files, so if you are unable ... Describing a python install for any...
Read more >
Plex Meta Manager exists as a super easy way to configure ...
yml, in order to authenticate w/ trakt. Make sure to put in the values as instructed on the github when making your trakt...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found