-
Notifications
You must be signed in to change notification settings - Fork 73
Feature/plex integration #516
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## dev #516 +/- ##
=======================================
Coverage 83.80% 83.80%
=======================================
Files 63 63
Lines 5741 5741
=======================================
Hits 4811 4811
Misses 930 930 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
|
Notes
|
|
Hey, thanks for working on this!
It's okay, we can add a message in plex integration section.
My tests in Github are failing too, there seems to be some problem with this external library django-allauth, #4398. Edit: Fixed tests with (d54fdd0) |
|
a request from a user, can you debug log the payload always (I see you have it commented out). As the plex webhooks can be a little temperamental. So it would be great if they were always dumped into the log. |
|
I think I am done, but happy to receive comments and suggestions :) |
|
Once we are happy with this, I think adding support for tautulli hooks (so a plexpass is not neccesary) should be easy, we could even reuse one of the existing plex/jellyfin hooks (because we can mimic payloads in tautulli) |
|
I’ve actually been looking at how you can get media at events when playing off a remote server. As if you play media from someone else’s server a local webhook won’t do it (it doesn’t even show in your Plex logs) |
I think the only way around this is
|
|
Yeah. Something like that. Will play once this integration is completed (awesome work by the dev). As I run cloudflare I could do it that way. |
|
We may need to add a setting to specify which user need to be tracked using the webhook, if not all media played by anyone in your server will be tracked in your yamtrack... |
|
You can't have a different webhook URL for each user in Plex? |
Yeah. As the default is all content off the server. |
|
@ryck thanks again for working on this! In the jellyfin webhook, I just added detect an episode as rewatched (7130368) I also added detecting when something started playing with Jellyfin's I have also seen that there is
Would you like to implement this? I can help with this if needed. |
Let me see if I can implement this too!
Yeah, I think we can
yeah, we can, I think we will need to do some requests to find the season, but I think is possible...
Let me give it a go first, I'll give you a shout if I get blocked |
Implemented
Well, the issue is that with plex webhooks the only way I can tell if something is "played" is when I receive the
I used the user to check against |
|
Also, I probably would leave rating implementation for later, most people are interested in tracking only, and that would require another setting. |
Nice!
In Jellyfin I added the Ideally it should be like with
Then with
I would also like to have this option. The implementation would look like:
Run
Then in the html: |
|
I tried to use What do you think? |
|
You can use the status which can be:
I think the handle_movie() could look something like this: |
|
Now I need help on how to access plex_usernames from the hook :( |
|
|
|
Have a look, I think I am done now We can implement rates (and maybe pause status), but I think that should be another PR |
|
Looks good! Just some minor stuff related to Django, maybe I'm missing something but I don't think Also I thought that Just like in Trakt: So we should manage that format when handling the payload: And validate the input in views.py: |
|
When this is merged (and you are happy with how items get tracked from webhooks in general), adding integrations for emby (#323) and tautulli should be quite straightforward |
|
It looks good, thanks for your work! |
|
Hi, question. And maybe it's a release 2 thing. But if scrobbling a new show - either the integration add it to the list of tracked shows? Or do you have to have it in your list to start off with? |
It will create it if you don't have it already |
|
Unsure if I should rais:e issue or not. I pulled DEV today, and was trying to figure out what this error is: I turned on the env var DEBUG=true, but that seems ot be for redis only, and not the web requests. |
* Add find tndb request * Add WIP plex integration (just tv for now) * Improve integration wording * implement movies * Remove logs and only trigger on scrobble * Add tests (WIP) * Add payload debug message * Add tests * Add user checking and handle episode rewatches * Add user info and reimplement copy-token so it works for any field * Add formatting to payload debug log * Attempt to use media.play * Attempt to use media.play * revert repeat malarkey * Pley implementation * Sdd plex_usernames settings * Implement plex username filtering * Remove media.stop * remove user.plex_usernames.errors * accepts a comma separated list of plex users * add settings header


Add Plex integration (using webhooks, so a PlexPass is needed)
I must say that python is not my thing and this is the first time I touch Django, so please don't be afraid to correct me to oblivion...