Try 30 days of free premium.

Plex-to-TVMaze Watch Status Sync

srob650 wrote 7 years ago: 1

And here is an update to my original proof-of-concept script which will iterate over your whole Plex TV library and mark episodes as either "watched" or "acquired" here. It's pretty self-explanatory but you may need to Google how to find your Plex token. It will not work for specials (I was too lazy) but the Plex-to-TVMaze watch status script above should work for specials. You should really only have to run this once if you employ the above method because after that everything will get marked as watched as you watch it :)


Jan wrote 7 years ago: 1

Great work Rob, we'll post it next week on our social channels.


gazza911 wrote 7 years ago: 1

When you do, remember to mention that a premium account is required.

FevLoad wrote 4 years ago: 2

is it still working script? 

or is it in need of an update?


Jan wrote 4 years ago: 1

We haven't heard from @srob650  in a while. Maybe you could test the script and let us know if it's still working or not? We are thinking about forking it or looking into developing something from scratch at some point in the future.

FevLoad wrote 4 years ago: 1

it didn't work for me.
I wish if you cloud make a webhook link like other similar sites 
I paid for premium subscription purely to test this script and it didn't work.


Jan wrote 4 years ago: 1

Hi @FevLoad ,

This addon isn't official so there isn't much more I can tell you about it. If you need to report any issues you're having, then you can also try reporting it in the issues section of the addon's github repository. Perhaps @srob650 will respond there.

As from our side. We are taking your use case into account and are working on something related. But specifically for Plex itself we're not developing anything at the moment. If someone wishes to volunteer some time and expertise to help speed things up (for plex) they are welcome to get in touch with us.

 


gazza911 wrote 4 years ago: 3

@FevLoad wrote:
it didn't work for me.
I wish if you cloud make a webhook link like other similar sites 
I paid for premium subscription purely to test this script and it didn't work.

In order for it to work, I had to install two more things things compared to srob's instructions;

1. http://aka.ms/vcpython27(it's required for python-Levenshtein on Windows at least, so if you're on another OS then run #2 and see what's required)
2. pip install python-Levenshtein
3. pip install --upgrade pytvmaze
4. pip install --upgrade fuzzywuzzy

I set it up myself with a dummy file.

In order for it to work, I had to set plex_username in the markwatched_tvmaze.py file to the user that PlexPy (Tautulli) shows is watching it at http://localhost:8181/users (in my case 'Local').

The interface on PlexPy was also different to the instructions on the github page;

1. Modify the script by entering your TVMaze premium credentials (password is the API key found on your dashboard)  and Plex username at the top
2. Ensure PlexPy is running
3. Launch the PlexPy web interface by typing http://localhost:8181/ into your browser
4. 'Watched Percent' is at Settings > General > TV Episode Watched Percent
5. 'Script' is at Settings > Notifaction Agents > Add a new notification agent > Script
6. On the Configuration tab of the script settings, set the 'Script Folder' and then wait a few seconds and select the script from the 'Script File' dropdown
7. On the Triggers tab of the script settings, check 'Watched'
8. On the Arguments tab of the script settings, add the arguments to 'Watched'
    {show_name} {title} {username} {thetvdb_id} {imdb_id} {air_date} {season_num} {episode_num}
9. Click Save

 'Enable TV Show Notifications' doesn't exist anymore (it's implicit)

When you watch something to your watched percent, the PlexPy console will show 'Trying to run notify script, action: watched, arguments...' and then show the results, so if you're having any more issues afterwards, I'd check there.

FevLoad wrote 4 years ago: 1

Thanks @gazza911  I still have few question I would like you to walk me through them all to get mine works and I can keep my premium subscription valid 

8. On the Arguments tab of the script settings, add the arguments to 'Watched'

What the arguments you put in there?


gazza911 wrote 4 years ago: 1

@FevLoad wrote:
Thanks @gazza911  I still have few question I would like you to walk me through them all to get mine works and I can keep my premium subscription valid 

What the arguments you put in there?

It's the same as in srob's original instructions:

{show_name} {title} {username} {thetvdb_id} {imdb_id} {air_date} {season_num} {episode_num}

I also added a note to clarify that the password for your TVMaze premium credentials is the API key found on your dashboard, not your actual password.

FevLoad wrote 4 years ago: 1

@gazza911 wrote:
It's the same as in srob's original instructions:

{show_name} {title} {username} {thetvdb_id} {imdb_id} {air_date} {season_num} {episode_num}

I also added a note to clarify that the password for your TVMaze premium credentials is the API key found on your dashboard, not your actual password.

Did you put something in the conditions page when setup the arguments ?


gazza911 wrote 4 years ago: 1

@FevLoad wrote:
Did you put something in the conditions page when setup the arguments ?

Nope, nothing on the conditions page, that's no longer needed as it's just controlled by the watch percent.

The instructions above should be all that you need to do.

FevLoad wrote 4 years ago: 1

okay, how can I know if the script is workng fine?
where can I find what I've watched?

on the setup I only did 
sudo pip install python-Levenshtein

since I'm running it on my local server synology 
 


gazza911 wrote 4 years ago: 1

@FevLoad wrote:
okay, how can I know if the script is workng fine?
where can I find what I've watched?

on the setup I only did 
sudo pip install python-Levenshtein

since I'm running it on my local server synology 
 

On PlexPy, you can see it in the 'History' section.

On TVmaze, it's on your stats page.

If it's not working, check the console after watching something to see what it returns.

If that's still not helpful, then you'll need to add debugging - change each of the sys.exit() calls in the markwatched_tvmaze.py file to have a different number, e.g. sys.exit(1) - if the console shows it as '0', the script finished without any errors.

FevLoad wrote 4 years ago: 1

got it, I have this problem as I may say.
 

Tautulli Notifiers :: Script error:

   Traceback (most recent call last):

       File "/scripts/plex-to-tvmaze/mark_watched_tvmaze.py", line 2, in <module>

           import pytvmaze

   ImportError: No module named pytvmaze

How can I fix it if you had this problem before


gazza911 wrote 4 years ago: 1

@FevLoad wrote:
got it, I have this problem as I may say.
 

How can I fix it if you had this problem before

Run these two, I missed them off from my instructions as it wasn't any different to srob's.

pip install --upgrade pytvmaze
pip install --upgrade fuzzywuzzy

Try 30 days of free premium.