Project

General

Profile

Actions

Feature #444

closed

Scans should include TV episodes

Added by Hammel about 7 years ago. Updated almost 6 years ago.

Status:
Closed
Priority:
Urgent
Assignee:
Category:
TMDB API
Target version:
Start date:
06 Jun 2015
Due date:
% Done:

100%

Estimated time:
Severity:
02 - High

Description

The MovieDB supports TV episodes.

  1. TV API
  2. TV API announcement
  3. Search TV

Looks like you do a search/tv for the show, then use the return ID to get episode details.

This will require a directory and file naming scheme of
  1. TV (top level dir, separate from movies)
  2. Show Title (2nd level dir)
  3. <season>.<episode>-Title.mp4 with both season and episode fields zero-padded.
Actions #1

Updated by Hammel over 6 years ago

  • Status changed from New to In Progress
  • % Done changed from 0 to 20
To implement this:
  1. Add Movies, TV radio buttons to UI
  2. Add separate directory scan processing based on
    1. Top level: series title
    2. Second level: season
    3. Third level: episodes
  3. Add series and season to Video object (and db output); the episode title uses the movie title field

The key is the directory scan, which needs to save series and season data before adding a Video entry for an episode. I need to keep level-state during the scan.

Use of this feature requires that directories kept by the user are separate for movies and TV files.

Actions #2

Updated by Hammel over 6 years ago

  • % Done changed from 20 to 40

I've moved some TV episodes (/movies/Cinema-3/tv/...) around to fit the proper structure (series/season/episode). Then I updated the UI code to handle scanning this and displaying them in sorted order in the video list if the TV radio button is selected. That all works and is in my sandbox.

Next up is to have the BuildDB button use the new information to search the TheMovieDB's TV API for episode info. The way to do this is to cache series and season data so it only has to request that data once for any associated set of episodes.

Actions #3

Updated by Hammel over 6 years ago

  • % Done changed from 40 to 50

I now have the ability to retrieve the episode entry. The query for that still needs to be written, however. But the pieces needed to make the request are now available (series, season and episode IDs).

After that I will have the JSON data for the episdoe. The scanVideo() method will need to be update to pull the description and images for that episode out of the returned JSON. It's not clear yet if this will be different from the old movie queries, but that's where I'm at.

The code is still in my tree and not checked in yet.

Actions #4

Updated by Hammel over 6 years ago

  • % Done changed from 50 to 70

This is nearly fully working now. You have to scan for either movies or tv shows, but not both. Scans work well. As do the checks for alternates (which will list all show information retrieved for a given series and season).

What's still missing:
  1. Fix rescan to scan for the series and season and then look for the named episode. The scan for series and season should update the static arrays in MovieDB.
  2. It's not clear if all season info is there. Online I can see South Park Season 3 "Tweek vs. Craig", but my scan it doesn't find it. Also, showing the alternates doesn't show the full season episode list, which it should.

I need to create a directory of filenames that matches the South Park and Game of Thrones lists so I can use them for testing instead of using the real directory structures. That way I can move everything out of the way except the one file that needs testing, like "Tweek vs. Craig".

Actions #5

Updated by Hammel over 6 years ago

  • % Done changed from 70 to 80

Alternates dialog now works and all South Park and Game of Thrones episodes scanned correctly. The Alternates selection needs to retrieve the poster for the selected episode, however.

After fixing that, I need to regression test movies.

Actions #6

Updated by Hammel almost 6 years ago

  • Status changed from In Progress to Closed
  • % Done changed from 80 to 100

TV episodes are now fully supported in VideoLib and movies also work correctly. All changes tested, committed and pushed.

Closing issue.

Actions

Also available in: Atom PDF