Modify

Opened 9 years ago

Closed 8 years ago

#6346 closed enhancement (fixed)

Subtitle, Season #, and Episode # support for MythVideo

Reported by: robert.mcnamara@… Owned by: awithers
Priority: minor Milestone: unknown
Component: Plugin - MythVideo Version: head
Severity: low Keywords:
Cc: Ticket locked: no

Description

The attached patch adds DB and UI for subtitle, Season #, and Episode # values in MythVideo?. The TVDB grabber in Trac allows for submitting the Show name and subtitle and getting back season and episode information.

This opens up a number of possibilities, including sort by season, automated playlist ordering, and other general UI and usability improvements. I have updated my patch for #6158 with the ability to poll the last season and episode in MythVideo? in order to determine the correct next export season and episode values.

Attachments (36)

seasonEpisodeSubtitle.diff (17.2 KB) - added by robert.mcnamara@… 9 years ago.
aforementioned patch
SeasEpSub.2.diff (40.6 KB) - added by robert.mcnamara@… 9 years ago.
Updated revision, new textareas, UI, grabber support
MythVideo.SubSeasEp.31609-2.diff (42.4 KB) - added by robert.mcnamara@… 9 years ago.
Automate Season/Episode?
MythVideo.SubSeasEp.31609-3.diff (42.3 KB) - added by robert.mcnamara@… 9 years ago.
Fix a silly bit of code duplication
tvgrabber.diff (2.4 KB) - added by robert.mcnamara@… 9 years ago.
Optional patch to support TV Grabber script
MythVideo.SubSeasEp.31709.diff (41.8 KB) - added by robert.mcnamara@… 9 years ago.
UI/DB Support, bugfixes
MythVideo.TVGrabbers.31709.diff (9.0 KB) - added by robert.mcnamara@… 9 years ago.
TV Grabber support and UI
MythVideo.SubSeasEp.theme.31709.diff (3.7 KB) - added by robert.mcnamara@… 9 years ago.
COMPLETELY sub-optimal default-wide theme additions for the three fields (use with above two patches)
MythVideo.SubSeasEp.terra.diff (1.1 KB) - added by robert.mcnamara@… 9 years ago.
Quick patch for Terra's browser view, too.
MythVideo.SubSeasEp.31909.diff (69.2 KB) - added by robert.mcnamara@… 9 years ago.
Lots of new things, 1 patch to rule them all.
MythVideo.SubSeasEp.32009.diff (69.2 KB) - added by robert.mcnamara@… 9 years ago.
Stupid one character bugfix and offset fix. (This is everything but the terra patch)
MythVideo.SubSeasEp.32809.diff (71.5 KB) - added by robert.mcnamara@… 8 years ago.
Various small fixes, theme and UI mostly
MythVideo.SubSeasEp.32809.2.diff (71.5 KB) - added by robert.mcnamara@… 8 years ago.
I feel silly, one character bugfix.
MythVideo.SubSeasEp.33009.diff (80.7 KB) - added by robert.mcnamara@… 8 years ago.
Lots and lots of fixes
MythVideo.SubSeasEp.33109.diff (79.3 KB) - added by robert.mcnamara@… 8 years ago.
Exorcise random hunks from another patch, sigh
MythVideo.SubSeasEp.33109-2.diff (91.5 KB) - added by robert.mcnamara@… 8 years ago.
Add all theme stuff
MythVideo.SubSeasEp.40109.diff (91.7 KB) - added by robert.mcnamara@… 8 years ago.
Extremely Minor update, only eatbraces w/ non-TV titles, makes [01x01] work.
MythVideo.SeasSubEp.4.12.09.diff (121.9 KB) - added by robert.mcnamara@… 8 years ago.
Add Hunt by Title/Subtitle?
MythVideo.SeasSubEp.4.12.09.2.diff (96.8 KB) - added by robert.mcnamara@… 8 years ago.
D'oh! Basically a whole other patch snuck into last one…
MythVideo.SeasSubEp.4.12.09-2.diff (99.3 KB) - added by robert.mcnamara@… 8 years ago.
Enhance Image Only Download
MythVideo.SeasSubEp.4.13.09.diff (99.3 KB) - added by robert.mcnamara@… 8 years ago.
Fix compiler warning
MythVideo.SeasSubEp.4.13.09-2.diff (100.3 KB) - added by robert.mcnamara@… 8 years ago.
Another day, another patch.
MythVideo.SeasSubEp.4.23.09.diff (108.2 KB) - added by robert.mcnamara@… 8 years ago.
Add OSD Support
MythVideo.SeasSubEp.4.24.09.diff (108.0 KB) - added by robert.mcnamara@… 8 years ago.
Places seas/ep string in better spot in the OSD
MythVideo.SeasSubEp.4.26.09.diff (109.4 KB) - added by robert.mcnamara@… 8 years ago.
Fixes List View
MythVideo.SeasSubEp.4.26.09.2.diff (109.4 KB) - added by robert.mcnamara@… 8 years ago.
Slight logic tweak on last patch
MythVideo.SubSeasEp.071009.diff (110.2 KB) - added by robert.mcnamara@… 8 years ago.
Updates for current trunk (20848)
MythVideo.SubSeasEp.071109.diff (111.2 KB) - added by robert.mcnamara@… 8 years ago.
Adds DOWNLOADDATA keybinding
MythVideo.SubSeasEp.071109.2.diff (111.2 KB) - added by robert.mcnamara@… 8 years ago.
Prevents a segfault if Title/Subtitle? search returns no results
MythVideo.SubSeasEp.071209.diff (114.4 KB) - added by robert.mcnamara@… 8 years ago.
Supercedes previous. Adds incremental search.
MythVideo.SubSeasEp.071209.2.diff (114.4 KB) - added by robert.mcnamara@… 8 years ago.
Extremely small bugfix on previous. Supercedes.
MythVideo.SubSeasEp.071209.3.diff (114.4 KB) - added by robert.mcnamara@… 8 years ago.
Subtle tweak, match beginning of words only in incremental search.
MythVideo.SubSeasEp.071709.diff (113.5 KB) - added by robert.mcnamara@… 8 years ago.
Adds keybinding for Item Detail Popup
MythVideo.SubSeasEp.071809.diff (115.4 KB) - added by robert.mcnamara@… 8 years ago.
Fixes bug that can crash the backend
MythVideo.SubSeasEp.072209.diff (116.1 KB) - added by robert.mcnamara@… 8 years ago.
permits MythBrowser? to compile with patch applied.
MythVideo.SubSeasEp.080409.diff (116.0 KB) - added by robert.mcnamara@… 8 years ago.
Hopefully Final version, fixes an unreachable "else"

Change History (60)

Changed 9 years ago by robert.mcnamara@…

aforementioned patch

comment:1 Changed 9 years ago by robert.mcnamara@…

comment:2 Changed 9 years ago by awithers

  • Component changed from MythTV - Video Playback to Plugin - MythVideo
  • Owner changed from ijr to awithers
  • Status changed from new to assigned

Changed 9 years ago by robert.mcnamara@…

Updated revision, new textareas, UI, grabber support

comment:3 Changed 9 years ago by robert.mcnamara@…

Updated patch adds a bit of new stuff--

Editors in the Edit Metadata screen for Season, Episode, and subtitles.
Ability to Parse Subtitle, Season, and Episode from grabbers (season/episode already present in the TVDB grabber).
Two new textareas, "s##e##" and "##x##" which output the season and episode in common formats (s01e02 and 1x02).
Theme Screen modification for the above.

Changed 9 years ago by robert.mcnamara@…

Automate Season/Episode?

comment:4 Changed 9 years ago by robert.mcnamara@…

Maybe some minor bugfixes, but mostly adds automatic setting of season and episode based on filename (recognizes s01e01 and 1x01 format, as well as with spaces/underscores/hyphens/periods, eg s 01 e 05, 01 x 05, s_01_e_01, etc.

Changed 9 years ago by robert.mcnamara@…

Fix a silly bit of code duplication

Changed 9 years ago by robert.mcnamara@…

Optional patch to support TV Grabber script

comment:5 Changed 9 years ago by robert.mcnamara@…

Added a small optional patch to force the Textual Metadata grabbing and Coverart grabbing to pass season and episode as parameters if they are not 0. So if your movies are set to season 0, episode 0, these will never get passed. If you have these values set, however, then the grabber will get something like this:

$grabber $seriesID $Season $episode, eg:

ttvdb.py 73545 4 15

Season:4
Episode:15
Title:No Exit
ReleaseDate:2009-02-13
Director:Gwyneth Horder-Payton
Plot:As Sam Anders recovers from his head injury onboard the Galactica, he begins to remember events from ancient Earth. The Final Cylon struggles with the fallout from the Final Five's former plans. One of the humanoid Cylons vows to get revenge for being created in the image of Man. Tyrol informs Admiral Adama about the extensive structural damage on the Galactica.
UserRating:8.6
Writers:Ryan Mottesheard
Episode Image:http://images.thetvdb.com/banners/episodes/73545-390805.jpg
Language:en

Changed 9 years ago by robert.mcnamara@…

UI/DB Support, bugfixes

Changed 9 years ago by robert.mcnamara@…

TV Grabber support and UI

comment:6 Changed 9 years ago by robert.mcnamara@…

Two new patches.

MythVideo?.SubSeasEp?.31709.diff- Adds UI and DB support for Subtitle/Season/Episode?, a slew of fresh bugfixes.

MythVideo?.TVGrabbers.31709.diff- Adds a new page (Page 8) in the Media Settings->Video Settings->General settings. Command lines for listing, data download, cover, and fanart download for Television. Uses Doug Vaughan's TheTVDB.com script from #6242. Download his latest script, untar in your mythvideo scripts dir (/usr{/local}/share/mythtv/mythvideo/scripts for most people).

Now, with both patches applied, when an item is set to a season or episode greater than 0, the TV grabber is used. If Season and Episode are 0, the Movie grabber is used. I have tested all download types and have them working here. There is sometimes some funkiness with the caching servers TTVDB uses, Doug is working on that one. The grabber works really well and between the two patches, this should help a lot of people with both TV and Movies in MythVideo? until the new metadata support is in.

Changed 9 years ago by robert.mcnamara@…

COMPLETELY sub-optimal default-wide theme additions for the three fields (use with above two patches)

Changed 9 years ago by robert.mcnamara@…

Quick patch for Terra's browser view, too.

Changed 9 years ago by robert.mcnamara@…

Lots of new things, 1 patch to rule them all.

comment:7 Changed 9 years ago by robert.mcnamara@…

Lots of new stuff in this patch. Notably:

  • I've added a banner downloader. This will only run on things defined a Television (season or episode > 0) as there is no movie grabber currently available (nor source of images that I am aware of) that provides movie banners. If someone writes one, I'll add that code on request.
  • The television image downloads are named according to the following format: $title Season $seasonnumber.ext. The reason for this is threefold. Firstly, with two grabbers working in the same ecosystem, naming everything numerically invites the possibility of overlap/overwrite. Secondly, this allows the downloaded images to be automatically compatible with the Watch Recordings fanart/banner/cover support (it will find them and set them in the PBB when named this way). Thirdly, this allows the fanart/banner/coverart to change nicely in both the PBB and MythVideo? when the season is incremented while not overwriting the older season. It's sexy. Trust me. :)
  • This patch combined all previous patches *except* the patches for the default theme views and Terra above. One or both of these will probably need to be applied to see the effect of this patch.

Otherwise, I think this bad boy is pretty much good to go.

Changed 9 years ago by robert.mcnamara@…

Stupid one character bugfix and offset fix. (This is everything but the terra patch)

Changed 8 years ago by robert.mcnamara@…

Various small fixes, theme and UI mostly

comment:8 Changed 8 years ago by robert.mcnamara@…

A few smallish fixes, changes some of the UI behaviors a tiny bit, makes the TV grabber work a little better. This patch includes UI support for Terra and the default and default-wide themes, should not be applied with any other previous patch, this one contains them all.

Changed 8 years ago by robert.mcnamara@…

I feel silly, one character bugfix.

Changed 8 years ago by robert.mcnamara@…

Lots and lots of fixes

comment:9 Changed 8 years ago by robert.mcnamara@…

A new unified patch. Supercedes all previous.

New version adds a lot of fixes. Notably, all image types are now hunted before downloading. If a cover, fanart, or banner exists for a given movie or season, the local copy will be used. This saves a lot of hammering on the grabber sources.

A small improvement to the Season/Episode? sort type to make it still behave as "Title" sort when no seasons or episodes are set (movies).

Biggest improvement is in the parsing of the filenames. All the filename parsing is replaced with a new function, FilenameToMeta?. This determines the season, episode, title, and subtitle of an imported file. If you have a file named "Lost S01E01 - Pilot.mpg", you will end up with "Lost" as the title, "Pilot" as the subtitle, and 01 and 01 for season and episode. This cleans up a lot of code duplication and parses the subtitle nicely, a difference from the previous versions of the patch. To make TTVDB work you only need something close to right in the title, and season and episode values, but this sets them pretty close right off the bat. Of course, if season/episode are not present, the old logic works and sets just the title, with 0/Null values in season/episode/subtitle. In tests, 100% accurate parsing was possible for formats like:

Lost s01e02 - Pilot.ext Lost 1x02 - Pilot.ext Lost 1x02.ext Lost s01e02.ext

It will also work with any period, dash, underscore, or space delimiter.

Changed 8 years ago by robert.mcnamara@…

Exorcise random hunks from another patch, sigh

Changed 8 years ago by robert.mcnamara@…

Add all theme stuff

comment:10 Changed 8 years ago by robert.mcnamara@…

One more update, maybe the last?

Adds subtitle, season, and episode tags to all themes, 4:3 and -wide, including Terra. Enables edit metadata in Terra. Little cleanups. S'good.

Changed 8 years ago by robert.mcnamara@…

Extremely Minor update, only eatbraces w/ non-TV titles, makes [01x01] work.

Changed 8 years ago by robert.mcnamara@…

Add Hunt by Title/Subtitle?

comment:11 Changed 8 years ago by robert.mcnamara@…

Newest update is pretty cool. I've added two new Metadata download methods.

The first is "Download Images Only." For any item with an inetref, it will kick off *only* the download of fanart, banner, and coverart, leaving the metadata intact. This will work great for people who are upgrading to .22 or who export to Mythvideo with my other patch and watch to preserve the info from listings.

The second is TV search by Title and Subtitle. The TVDB grabber can find the season and episode numbers based on title and subtitle, so you can export a random TV show to MythVideo? and run the "Download TV by Title/Subtitle?" grab and it will search by those criterion, first returning Season and Episode, and then running a full grab based on that information. I have a few shows that I saved all of, but figuring out their order was a pain without painstakingly going online and finding their order and setting them. This way, I don't have to.

Changed 8 years ago by robert.mcnamara@…

D'oh! Basically a whole other patch snuck into last one...

Changed 8 years ago by robert.mcnamara@…

Enhance Image Only Download

comment:12 Changed 8 years ago by robert.mcnamara@…

One last improvement for the night. Enhances the image only download so that it doesn't need an inetref. If there is at least a title, you can do an image only download (although for TV you will want at least title and season/episode).

Changed 8 years ago by robert.mcnamara@…

Fix compiler warning

Changed 8 years ago by robert.mcnamara@…

Another day, another patch.

comment:13 Changed 8 years ago by robert.mcnamara@…

A couple of tiny bugfixes in this version, but the largest change is the selective metadata grabbing. Mythvideo will now *only* insert those values into the database which are at the defaults. This allows for a "partial grab." If one were to export a recording to mythvideo, one might want to preserve the information from the listings, but pull in stuff like season, episode number, director, user ratings, etc. This is now possible. I *did* leave the Title metadata overwriting intact, and that would be one that should always be set by the grabber and doesn't have a default value to check against.

Likewise, a lot of folks are going to want to run metadata grabbing against their existing DBs populated with the old IMDB grabber. It's now possible to pull in just the missing stuff, plus fanart, banner, coverfile, etc.

comment:14 Changed 8 years ago by Markus Schulz <msc@…>

nice work, perhaps you should add something like this to playercommand.cpp::PlayerFor?

QString title = item->GetTitle?(); if (item->GetSeason?() > 0) {

title += QString(" - %1x%2").arg(item->GetSeason?()).arg(item->GetEpisode?());

} if (item->GetSubtitle?().size()) {

title += " " + item->GetSubtitle?();

}

to get the full title in the OSD.

Changed 8 years ago by robert.mcnamara@…

Add OSD Support

comment:15 Changed 8 years ago by robert.mcnamara@…

This patch, along with what are probably some minor cleanups, adds support for the subtitle, season, and episode in the OSD. I moved the "Directed By: Foo" out of the quotation marks and to precede the plot field. The Subtitle now appears in the OSD subtitle field and the season and episode, if they exist, appear next to the Title ie:

Fringe 1x01 "Pilot" Directed By: Foo Bar. Lorem ipsum etc. etc.

comment:16 Changed 8 years ago by robert.mcnamara@…

http://www.fecitfacta.com/tv_ep_osd.png

Latest part of the patch in action.

Changed 8 years ago by robert.mcnamara@…

Places seas/ep string in better spot in the OSD

Changed 8 years ago by robert.mcnamara@…

Fixes List View

comment:17 Changed 8 years ago by robert.mcnamara@…

Newest version of the patch improves the experience for list view. When building each node, rather than just getting Title, you get the following:

If exists, Title SeasonxEpisode? - Subtitle

Else

Title - Subtitle

Else

Title

This makes movies behave as they always have, TV shows behave as one would expect, and Title + subtitle behave nicely too.

Changed 8 years ago by robert.mcnamara@…

Slight logic tweak on last patch

Changed 8 years ago by robert.mcnamara@…

Updates for current trunk (20848)

comment:18 Changed 8 years ago by robert.mcnamara@…

Patch updated for Trunk @ r20848. Patch supercedes all previous. Does all of the following:<p>

  • Adds DB entries and UI (Edit Metadata) for Subtitle, Season, and Episode in MythVideo?<p>
  • Adds automatic parsing of filenames on import. Common naming schemes all get parsed out into correct fields.<p>
  • Adds Banner file downloading to MythVideo?<p>
  • Adds support for TV Grabber scripts, and default values for #6242<p>
  • Adds Season/Episode? Sort Mode<p>
  • Adds Lookup by Title/Subtitle?<p>
  • Adds Image Only Download<p>
  • Makes grabbing smarter, only updates default fields<p>
  • Adds OSD support for Subtitle/Season/Episode?<p>
  • Modifies List view to support Subtitle, Season, and Episode<p>

Note: #6242 needs to be added to the MythVideo? scripts for this to work, so they'll probably need to be committed together.

Changed 8 years ago by robert.mcnamara@…

Adds DOWNLOADDATA keybinding

comment:19 Changed 8 years ago by robert.mcnamara@…

One last (hopefully!) little enhancement. Adds a keybinding called DOWNLOADDATA, by default bound to "W". Makes going through a whole TV season *much* faster as you can avoid the menu entirely.

Changed 8 years ago by robert.mcnamara@…

Prevents a segfault if Title/Subtitle? search returns no results

Changed 8 years ago by robert.mcnamara@…

Supercedes previous. Adds incremental search.

comment:20 Changed 8 years ago by robert.mcnamara@…

Latest version of the patch supercedes all previous. This version is identical to all previous, but adds a commonly asked for feature in MythVideo?: Incremental Search. this meets the needs for those who want to "jump to" a letter, and also lets one search more specifically as well.

Default keybinding is Ctrl-S, but is modifiable as always from Edit Keys.

Changed 8 years ago by robert.mcnamara@…

Extremely small bugfix on previous. Supercedes.

Changed 8 years ago by robert.mcnamara@…

Subtle tweak, match beginning of words only in incremental search.

Changed 8 years ago by robert.mcnamara@…

Adds keybinding for Item Detail Popup

comment:21 Changed 8 years ago by robert.mcnamara@…

Small change in latest patch, remove accidental extraneous hunk from another patch, and add a (by default unbound) keybinding for the item detail popup.

Changed 8 years ago by robert.mcnamara@…

Fixes bug that can crash the backend

comment:22 Changed 8 years ago by robert.mcnamara@…

Latest patch fixes a bug in Storage Group handling of image files-- image handling checked for existence of a host, but didn't validate that the image field was non-empty, so it sent the request to the backend for a null field, which brought down the backend. Whoops. This bug is fixed in this patch. Anyone using a prior version of this patch should really update to this one.

Changed 8 years ago by robert.mcnamara@…

permits MythBrowser? to compile with patch applied.

comment:23 Changed 8 years ago by robert.mcnamara@…

Patch update. Thanks to recent changes in mythbrowser, this patch prevented it from compiling. Fix for compilation included (register media player using new format to include seas/ep/sub).

Changed 8 years ago by robert.mcnamara@…

Hopefully Final version, fixes an unreachable "else"

comment:24 Changed 8 years ago by awithers

  • Resolution set to fixed
  • Status changed from assigned to closed

(In [21123]) Closes #6346

Patch from Robert McNamara? that among other things adds:

Add Comment

Modify Ticket

Action
as closed The owner will remain awithers.
The resolution will be deleted. Next status will be 'new'.
Author


E-mail address and user name can be saved in the Preferences.

 
Note: See TracTickets for help on using tickets.