Author Topic: New TV PostProcessing  (Read 6135 times)

Offline bobtongue

  • Prolific Indexer
  • ****
  • Posts: 109
  • Helpful: +7/-0
  • Wherever you go, There you are!
New TV PostProcessing
« on: 2015-11-20, 06:26:04 PM »
Can anyone share the new way of editing tv episodes and titles? It used to be pretty straight forward. s01e01.
Now every individual episode has its own unique number. Is that number related to a database like tvdb. Also, where does the videos_id come from. Is that number the same for everyone? or is it an incremental index as tv series are added to the database. There are times when I like to add series manually, and i wouldn't know how to add it if its not already in my local database. Am I making any sense with these questions?

ruhllatio

  • Guest
Re: New TV PostProcessing
« Reply #1 on: 2015-11-20, 08:27:45 PM »
We are working on devising a better way to edit the TV releases manually.  Will update when we know more.  The ONLY downside to the way we do things now, is if a release isn't matched against an external DB, it will never have season/episode/airdate/seriesfull information.  Bart and I have discussed creating a manual edit popup that will allow you to select the desired show via manual search from the nZEDb implemented API of your choice.  Still, we feel that our way is much, much better than the old way.  I have way more TV matches than I did before.  Out of 1.5 Million TV show releases, I have 1.1M matched to real, accurate data.  But I digress.

The Video and Episode IDs of the releases are localized.  They do not directly correlate to any external site.  There are number of ways to lookup what you want, but it's all MySQL intensive.  I will provide some examples.

Let's say you know the tvdb/tvmaze/tmdb/imdb/tvrage ID and want to find the video/episode IDs for Season 4 Episode 3.  Simply run:

Code: [Select]
SELECT v.id AS video, tve.id AS episode FROM videos v INNER JOIN tv_episodes tve ON v.id = tve.videos_id WHERE v.tvdb = 1234 AND tve.series = 4 AND tve.episode = 3;
Plug these two numbers into the appropriate spots in the edit fields and you're all done.  This is all that is needed to be a match.

For air by date shows, the query is a little more simple.

Code: [Select]
SELECT v.id AS video, tve.id AS episode FROM videos v INNER JOIN tv_episodes tve ON v.id = tve.videos_id WHERE v.tvmaze = 1234 AND tve.firstaired = '2010-01-28';
Alternatively, let's say you know the local Video ID.  You might know this if you can readily identify the show, and you have selected it from the TV Series list within your nZEDb installation.  If you look at the URL for the series, you'll see something like http://serverroot//series/106226.  106226 is the local Video ID.  So your query should be:

Code: [Select]
SELECT v.id AS video, tve.id AS episode FROM videos v INNER JOIN tv_episodes tve ON v.id = tve.videos_id WHERE v.id = 106226 AND tve.series = 4 AND tve.episode = 3;
For the most part, you can do any combination of these queries if you're clever enough.  For example, the way Sonarr works is it sends a request with all possible site IDs and requests ANY matches be returned.  So the query ends up looking like:

Code: [Select]
WHERE (v.tvdb = 1234 OR v.tvmaze = 2345 OR v.tvrage = 3456) AND tve.series = 4 AND tve.episode = 3;
So as long as we have one of the site IDs listed above stored with the Video entry, it will return the video/episode IDs if we also have a season/episode match.  Any questions?

Offline bobtongue

  • Prolific Indexer
  • ****
  • Posts: 109
  • Helpful: +7/-0
  • Wherever you go, There you are!
Re: New TV PostProcessing
« Reply #2 on: 2015-11-23, 03:04:10 PM »
Thanks for the explanation. I have been editing manually with phpmyadmin open in another window. It just seemed like the long way around. But I get where you are going with this, so I will continue to kludge along until you get it sorted. Just something good to look forward to :D

Offline bobtongue

  • Prolific Indexer
  • ****
  • Posts: 109
  • Helpful: +7/-0
  • Wherever you go, There you are!
Re: New TV PostProcessing
« Reply #3 on: 2015-12-02, 07:46:12 AM »
  The ONLY downside to the way we do things now, is if a release isn't matched against an external DB, it will never have season/episode/airdate/seriesfull information. ............  Any questions?
Is there a way to add shows that aren't yet matched to an external DB manually?

Offline Wally73

  • Overlord
  • ******
  • Posts: 254
  • Helpful: +28/-1
  • i'm nuts
Re: New TV PostProcessing
« Reply #4 on: 2015-12-02, 07:56:20 AM »
if you're on dev branch, do a pull since trakt.tv is now added as another external db for tv postprocessing

Offline bobtongue

  • Prolific Indexer
  • ****
  • Posts: 109
  • Helpful: +7/-0
  • Wherever you go, There you are!
Re: New TV PostProcessing
« Reply #5 on: 2015-12-02, 08:14:53 AM »
if you're on dev branch, do a pull since trakt.tv is now added as another external db for tv postprocessing
On master, I don't know if I am ready for the bleeding edge yet :D

Offline Wally73

  • Overlord
  • ******
  • Posts: 254
  • Helpful: +28/-1
  • i'm nuts
Re: New TV PostProcessing
« Reply #6 on: 2015-12-02, 10:29:01 AM »
On master, I don't know if I am ready for the bleeding edge yet :D

the next to master merge will have 2 additional tv postprocessing providers in it

Offline bobtongue

  • Prolific Indexer
  • ****
  • Posts: 109
  • Helpful: +7/-0
  • Wherever you go, There you are!
Re: New TV PostProcessing
« Reply #7 on: 2015-12-03, 04:27:56 AM »
the next to master merge will have 2 additional tv postprocessing providers in it
That might take care of some of the titles I have that aren't matching. Quick question, will the unmatched releases be reprocessed with the new providers automatically, or will there be something we need to do to get them to process?

ruhllatio

  • Guest
Re: New TV PostProcessing
« Reply #8 on: 2015-12-03, 05:26:14 AM »
It is designed to run automatically against any amount of scrapers we decide to add as we just decrement the tv_episodes_id column.  Each new scraper looks for the next lowest ID.  Once N-M is merged to master, the next time you run TV process it will automatically run all remaining releases against the new scrapers.

TVMaze will pick up a lot of missing matches.  Specifically shows that are named the same as older shows that aren't uploaded with the year in the title.

Offline bobtongue

  • Prolific Indexer
  • ****
  • Posts: 109
  • Helpful: +7/-0
  • Wherever you go, There you are!
Re: New TV PostProcessing
« Reply #9 on: 2015-12-03, 05:53:55 AM »
Good to know, thanks for the info.

Offline bobtongue

  • Prolific Indexer
  • ****
  • Posts: 109
  • Helpful: +7/-0
  • Wherever you go, There you are!
Re: New TV PostProcessing
« Reply #10 on: 2015-12-04, 06:29:09 AM »
OK, I still have one more question. One of the titles that isn't matching right now is "The Flash". I was looking around and noticed that a lot of the first season matched, but to the wrong title. (The flash 1990 instead of 2014). Is there a way to unmatch the releases so that they can be processed later?

ruhllatio

  • Guest
Re: New TV PostProcessing
« Reply #11 on: 2015-12-04, 09:23:21 AM »
So that's one of the titles that really shines with TVMaze.  TVMaze tends to order their responses by date descending thus the newer show is matched first.  Suggest editing  the release and setting the Video ID to 0 and the Episode ID to -1 to skip TVDB.  When TV Proc runs, it will automatically try TVMaze first.  If you're on master, you'll need to wait until Monday to get TVMaze and TMDB processing.

Offline bobtongue

  • Prolific Indexer
  • ****
  • Posts: 109
  • Helpful: +7/-0
  • Wherever you go, There you are!
Re: New TV PostProcessing
« Reply #12 on: 2015-12-07, 08:28:08 AM »
OH YEAH! Just pulled latest master and Tvmaze scraper is picking up a ton of stuff. Good job!!!!!

Offline ebro

  • Junior Indexer
  • **
  • Posts: 27
  • Helpful: +5/-0
Re: New TV PostProcessing
« Reply #13 on: 2017-12-12, 04:14:14 AM »
An FYI for those manually adding a series to their system.
You must create a new record in "Videos" table, and populate with as much IMDB, TVMAZE etc info as possible.
You must also add a record to tv_info table with the Videos_id of the newly created series.
This way, you will see the series in TVseries lists.