Zggis / plex-tvtime

A Plex webhook handler that automatically updates your TVTime watch history
38 stars 2 forks source link

Integration with Absolute Series Scanner and AMSA #23

Closed leonardopieralli closed 3 months ago

leonardopieralli commented 3 months ago

Hi i tried it and work perfectly with normal plex library (even for movies), i just have a question: is it possibile to integrate it with Absolute Series Scanner (https://github.com/ZeroQI/Absolute-Series-Scanner) and AMSA (https://github.com/Dingmatt/AMSA). I have a library configured with them becouse it analyzes anime automatically but i noticed that it didn't sign the episodes in TV time. Have i made a mistake or is it a function not provider by the webhook since the scanner is differente? Thanks in advance for your time

Zggis commented 3 months ago

Hi @leonardopieralli ,

I can't say for sure, it all comes down to the webhook payload Plex sends to the plex-tvtime application. If you set LOGGING_LEVEL to DEBUG and capture a sample payload that plex-tvtime receives and displays in its logs when you finish watching one of the anime shows in question I can take a closer look and try to simulate it on my side.

But chances are the information needed to update the show's watch history in TVTime is not included, which is why its not working.

leonardopieralli commented 3 months ago

Screenshot_20240819_140117_Opera Hi, i think this is the log you need (correct me if im wrong) the time of the message from the exported log is 19/08/2024 00:46 Rome it could be different from how you expect that since i installed the image on synology container manager I got even an html file exported from container manager for the log but it doesn't allow me to attach it. If you need i can send it in another way

Thanks for the quick reply!

leonardopieralli commented 3 months ago

I closed it by mistake, sorry i'm quite new to github

Zggis commented 3 months ago

I was actually looking for the full JSON that should get printed before that message in the logs, you might have to set LOGGING_LEVEL to TRACE to see it.

But even from that error message its saying the payload did not contain the identifier the app uses to mark the episode watched in TVTime.

You may want to consider opening an issue on the Absolute Series Scanner or AMSA projects and see if they could modify their agents to enrich the webhook payloads sent from Plex. I would include a full JSON example of the webhook payload sent from Plex for a normal TV Show that works, vs one that uses their agents and is missing the GUID per the error message above. That way they can see the difference. If you wanted to post the JSONs here I can confirm. You can find an example JSON payload here: https://support.plex.tv/articles/115002267687-webhooks/ so you know what you are looking for.

leonardopieralli commented 3 months ago

Ok thanks! I'll try that as soon as i can

Then i'll let you know if i find out anything interesting