Closed RealKanashii closed 2 years ago
The script will just output a list of episodes that are missing. Is that alright? Like this:
Show1
S01E02 - Title
S06E01 - Title
Show2
S05E01 - Title
etc. etc.
Perfect...
Request completed. You can find the script here: https://github.com/Casvt/Plex-scripts/blob/main/various/find_missing_episodes.py.
I know there are some false positives. There's nothing I can do about that. It has to do with the tvdb not having everything and plex grabbing from multiple sources. Anyway, it does a really good job (aside from a few false positives) at finding the missing episodes.
I even included a --IgnoreSpecials
argument that you can add to not list specials (as I don't have a lot of specials downloaded so they would come up but I don't care about those).
Enjoy!
Thanks a lot. To anyone interested.
I configured IP, port and the plex token.
Then made a docker to launch the script without touching the main system ( Using Unraid but works for any system with docker)
I create the file with your script:
missing_episodes.py
Then the dockerfile to create an image ( change the "Series" with your TV Show library)
FROM python:3.9.7-alpine3.14
WORKDIR /app
COPY missing_episodes.py /app
RUN python3 -m pip install requests
CMD ["python", "/app/missing_episodes.py", "-l", "Series"]
I made the image with build:
docker build . -t missing_episodes
In my case I use the "br0" network (vlan) to expose the docker to the main network as the plex is another docker in that VLAN:
docker run --net=br0 --ip=192.168.2.13 --name missing missing_episodes
The output:
Series
12 monos - S04E11 - The Beginning (2)
30 Monedas - S02E01 - Capítulo 1
4400 - S01E06 - If You Love Something
4400 - S01E07 - Empowered Women Empower Women
4400 - S01E08 - The Kaminski Experiment
4400 - S01E09 - Great Expectations
4400 - S01E10 - Give Up the Ghost
4400 - S01E11 - You Only Meant Well
4400 - S01E12 - Group Efforts
4400 - S01E13 - Present Is Prologue
Alex Rider - S02E01 - Surf
Alex Rider - S02E02 - Hunt
Alex Rider - S02E03 - Mirror
Alex Rider - S02E04 - Serpent
But I got some errors:
Traceback (most recent call last):
File "/app/missing_episodes.py", line 102, in <module>
response = find_missing_episodes(ssn=ssn, library_name=args.LibraryName, series_name=args.SeriesName, ignore_specials=args.IgnoreSpecials)
File "/app/missing_episodes.py", line 70, in find_missing_episodes
episode_link = re_findall(r'(?<=<a href=").*?(?=">All Seasons)', show_info)[0]
IndexError: list index out of range
Probably some show with special chars ( UTF8 in spanish) ???
I already know what the problem is. I'm just... not going to fix it now. It's 22.00 here and tomorrow I'm busy the whole day... I'll fix it when I can alright?
Sure, don't worry, I really appreciate what you did. Just testing it and trying to help to anyone with docker, Unraid, TrueNAS or similar configurations.
I made a bug request for it (to keep stuff separated): #77 .
BTW, no hurries at all, but: I currently have setup documentation in the wiki that's targeted at Linux, Windows, Mac, etc. However, I don't have any docs on docker and such.
If you want, you can help write the setup docs for those types of environments too. Nu hurry at all behind this but if you have the knowledge (which I very much don't; I've never used docker though I understand what it is) and want to contribute, you're very welcome.
Every script has different needs but I can make a generic documentation how to "create", "build" and "run" some docker with the scripts with examples if needed. The values, requirements, etc can change from script to script but I can try to do it most general possible,
Filling in variables is the same for everyone, downloading the requirements and running the script isn't. I already have extensive docs for filling in the variables. And I have docs for running the script in a simple way from your terminal. But no docs for if you want to run your script using docker. And that would be awesome if I could have that added to the wiki to allow more people to use the scripts.
Basically this:
Then made a docker to launch the script without touching the main system ( Using Unraid but works for any system with docker)
I create the file with your script:
missing_episodes.py
Then the dockerfile to create an image ( change the "Series" with your TV Show library)
FROM python:3.9.7-alpine3.14 WORKDIR /app COPY missing_episodes.py /app RUN python3 -m pip install requests CMD ["python", "/app/missing_episodes.py", "-l", "Series"]
I made the image with build:
docker build . -t missing_episodes
In my case I use the "br0" network (vlan) to expose the docker to the main network as the plex is another docker in that VLAN:
docker run --net=br0 --ip=192.168.2.13 --name missing missing_episodes
Again no hurry at all. You can also just reject if you don't want to make it. It's up to you.
I can make some simple examples using docker if you want.
That would be great! Just write it and make a documentation request and that's it.
Hi, it will be really useful to be able to "mark" or report the missing episodes from a TV Show. Maybe a red dot in the cover? It's easy to miss an episode and it's aawful when you need to stop your favourite TV show night marathon 'cause you missed one.
Thanks for your effort.