Multi-Episode Files

14 views
Skip to first unread message

FreQi

unread,
Jan 5, 2009, 10:50:04 AM1/5/09
to videobro...@googlegroups.com
Something that has been bugging me about my TV Series collection has been on my mind lately, and I am not entirely sure how to address it.  I thought maybe if I pointed it out, we could come up with something clever collectively.

There are several shows that have episodes that are multi-part and air back-to-back as a single episode but are billed with separate episode numbers.  Some of these episodes even transparently merge at a point where a commercial break would normally be, so often times it makes sense that the episodes exist as a single file and makes it pretty tough to cut them into separate files.  This can become a problem when listing the episodes in MediaBrowser.  Typically, the single file will only have the metadata for just the first episode of the "set" despite the fact that most sources (like TheTVDb) will have metadata and images for each episode.  Often times these multi-episodes share an episode name are are only differentiated by a "part" indicator, but occasionally they'll have their own name.

Here's some examples in my collection:
Desperate.Housewives.S02E23.S02E24.Remember-fov.avi
King.of.Queens.S09E12.E13.China.Syndrome-TOPAZ.avi
My.Name.is.Earl.S02E10.S02E11.South.of.the.Border-fov.avi
The.Office.S03E13.Traveling.Salesmen.S03E14.The.Return-nodlabs.avi
South.Park.S11E10.S11E12.S11E13.Imaginationland.Trilogy-fov.avi

So how can we address this issue?

My initial thought is to have the metadata contain the details for each episode in the xml, along with multiple posters.  This means fetchers like TVScout will need to know how to identify and merge metadata for each part of these episodes, and this will probably require a re-write of the xml format so it can list multiple names, summaries, poster image files and all the other data.  Then MediaBrowser will need to know how to parse and display the information.

MediaBrowser could list each episode in the Season List, but when selecting the episode it should somehow indicate that it's a "merged" file or something.  Say for example I select The Office s3e14 and hit play.  It would actually start at s3e13 since the file is both episodes, so the user should have some sort of heads up.  I suppose it could jump 50% of the way into the file, but there is no guarantee that it'll be in the right spot so I am not sure that's wise.

Since the metadata for TV hasn't exactly been standardized yet the way "mymovies.xml" seems to be, I think we're in a pretty good position to form things as we see fit.  Anyone else have thoughts on this?  Maybe some other solution would makes sense...

FreQi

unread,
Jan 5, 2009, 10:57:39 AM1/5/09
to videobro...@googlegroups.com
Incidently, I named my example South Park episode wrong.  Not a big deal as far as this discussion is concerned, but it should be: South.Park.S11E10.S11E11.S11E12.Imaginationland.Trilogy-fov.avi

Kristopher Gilbert

unread,
Jan 5, 2009, 10:26:28 PM1/5/09
to videobro...@googlegroups.com

Yeah like the Bones season opener was a two-parter but they were aired back-to-back so there is one file with “S04E01E02” in the filename and the Burn Notice premiere is one episode but it was aired in two parts so it’s two files with “E01.Part1” and “E01.Part2” in the filenames.

 

The latter one is easy, just make MB have two files listed but add “Part 1” and “Part 2” to the episode-names and maybe at the end of the episode description.

 

The former… Yeah. Not sure. We’d have to do what you said and allow multiple episodes to be attached to a single file. There’s really no way to know the point in the file where the next episode starts so, like you said, the only real solution is to change some stuff around in the XML and allow each episode entity to be a collection that contains multiple episode titles and descriptions. That would at least get the episode titles and descriptions working.

 

I’m not sure if this is a feature or bug but I think we should hold off until we’re sure the current stuff in trunk is stable before working on this stuff, eh?

Kristopher Gilbert

unread,
Jan 6, 2009, 6:44:30 PM1/6/09
to videobro...@googlegroups.com

I keep meaning to post about “Special” episodes. Like Doctor Who has a Christmas Special each year and Doctor Who Confidential has the Christmas Special this year and the New Doctor special, etc. Tvdb has a special season called “Specials” but each special also has an episode number. And it looks like they have a fields for “airs before/after” or something. Personally I’d like the specials to show up in season folders because technically the Who Christmas specials should be watched after the last episode of the season that for the year of that Christmas, but whatever. I’d be happy with just a “Specials” folder that has the Specials in order.

 

There doesn’t seem to be a “scene” naming convention for specials either. I suppose our naming convention would depend on if we want them to show up in a season or have their own folder. ATHF used “blah.SPECxx.blah.ext”, but, ironically, Tvdb has them as part of Season 4.

 

Actually look at this shit:

 

http://thetvdb.com/?tab=seasonall&id=77120&lid=7

 

There’s two ATHF Christmas Specials, Tvdb has one of them as an episode and one of them as a “Special”. And the “Movie” is listed on the Tvdb, which, I guess, technically makes sense because the movie was aired on Adult Swim, but it’s also a real move:

 

http://themoviedb.org/movie/13158

 

(HA! Best backdrop evar…)

 

Hmm, I think the key to working this out is the “Airs Before” field. The second Xmas special is tagged as “Airs Before Dickesode” which is technically correct. So if we use that field, we can put the “special” episodes in the proper order.

 

It seems to be that, at this point, using a simple folder structure isn’t going to cut it and we’ll need a SQL backend, right? Cuz everyone’s going to put “Specials” in a folder called “Specials” and in order to make them display in the “Season X” folder, we’ll have to know about folders other than the current one.

 

And while we’re on this topic, might as well bring up “one-off” “specials” like this Joana Lumley thing:

 

http://thetvdb.com/?tab=series&id=83681&lid=7

 

and Hogfather:

 

http://thetvdb.com/?tab=series&id=79988&lid=7

 

Lumley’s thing is a single “special” with no season which means we can’t get metadata for it since we don’t pick up metadata for Specials. Hogfather sorta works if you put it in a Season 1 folder and rename “-Part1” and “-Part2” to “S01E01” and “S01E02” but that’s sorta non-intuitive since it’s a “one-off” and not really a “proper series”.

 

Paul J, how does TVScout handle specials?

 

Anyway, I’m rambling so… I propose we use ATHF, Hogfather and Lumley’s thing as the benchmark for adding this stuff since they seem to cover all of the permutations, at least the ones I can think of. Anyone else have any other TV shows with weird stuff like this that might cover any other permutations?

 

Ahh, just remembered, Bones and Burn Notice and the ones FreQi listed have special cases where episodes are combined into one file or split into multiple files. So those should be on the benchmark list too.

 

And since this all seems to lead up to SQL…

 

MSSQL/SQLExpress

 

Advantages:

Fast

Can have a single back-end for multiple Media Center boxes

Good Visual Studio integration

WiX/VSSetup can auto-download

Disadvantages:

                Big download

                Can be a nightmare if the install goes wrong

                People are scared of it

 

SQLCE (Trust me, it’s VERY similar to SQLite)

 

Advantages:

                Small

Can be embedded into the .msi

Good Visual Studio integration

Disadvantages:

                Not as fast as MSSQL

                People are scared of it (though they won’t know we’re using it unless they look at the code/ProgramData folder)

                Might be x64/x86 issues

 

SQLite

 

Advantages:

                Hella small

                Seems to have VS2008 integration via ADO.NET providers (at least the SF.NET download says so)

                x86/x64 in same DLL (trusting Sam on this, no idea how they’d do that)

Disadvantages:

                Not MS, may have non-MS style integration issues

 

Personally, I’d like to see the SQL DB be provider based, let the user decide. That way we can have support for an MSSQL DB on a WHS that multiple machines can all access. I realize this is complicated so maybe that’s a feature for v3! For now, I was leaning toward SQLCE, but after reading a bit about it and keeping Sam’s inclination toward non-MS stuff, I’m thinking we support SQLite out-of-the-box and let the user decide if they want a more robust backend.

 

And finally, maybe it’s time to have another Skype meeting? Heh, Sam and I were the only two to show up for the first one, but now the team is starting to get fairly big and there’s like 8 code-branches now and I’m thinking we need to wrangle the stuff in this email, the Win7 future plans, the version number stuff in my branch, the MCML changes from the other branches and whatever else I’m forgetting into a cohesive Plan?

FreQi

unread,
Jan 6, 2009, 10:16:31 PM1/6/09
to videobro...@googlegroups.com
I don't want to speak for PaulJ, but, TVScout sort of behaves like TheTVDb in regards to "Specials".  I know you can have a "Season.00" folder that will be treated as the collection of specials.  To pattern match and fetch metadata, you simply name the episodes with "s00e##" and TVScout will assume the file is the corresponding "special" episode.  I do not know if it records the "Airs Before" metadata however.  This is something that we could add to the xml.

If TVScout is not able to auto-determine the correct episode/special, I am pretty sure it basically skips the file, but in a future release, TVScout will allow you to manage your collection and manually match and edit the metadata.  So a special (being "special") aught to be able to be matched up manually down the road.

Now, rather than making MediaBrowser do anything particularly fancy with a database, what if we just managed the metadata differently?  MediaBrowser would know when it is listing a series due to the processing of series.xml right?  So it could parse the subfolders for the /metadata folder and build a list of what "airs before" what.  Then, when using the sort "by air date" option while viewing a Season, MediaBrowser could list the Specials that aired before the episodes in the Current Season.  The trick then would be to show only the specials that aired before the current season AND after and previous season (if NOT season 1).


On another topic, when a series makes a movie, I personally will put that movie in it's own folder and use SMO to fetch the metadata, and then I put that folder in the root of the Series (along with the Season folders).  This works great in MediaBrowser, but it doesn't really place it in any "sort by air date" order.  On one had, the movie could be treated like a "Specials" episode, but what happens now when you have a multi-file file (cda, cd2, etc)?

Maybe "SeriesMovies" could be put into the "Specials" folder, and then TVScout can be revised to detect mymovies.xml in subfolders and fetch the metadata on it as if it were a matched video file, recording the "Airs Before" data that VideoBrowser would use for sorting, but uses the mymovies.xml for display?

So an example snippet from a proposed Series collection, let's say it's all located in \\server\TVShows\Stargate.SG1\:

\banner.jpg
\folder.jpg
\series.xml
\Season.00\metadata\Stargate M01 The Ark of Truth [2008.DVDRip.XviD-MEMETiC].xml
\Season.00\metadata\From.Stargate.To.Atlantis.Lowdown.DSRip.XviD-SFM.xml
\Season.00\metadata\72449-360134.jpg
\Season.00\folder.jpg
\Season.00\From.Stargate.To.Atlantis.Lowdown.DSRip.XviD-SFM.avi
\Season.00\Stargate M01 The Ark of Truth [2008.DVDRip.XviD-MEMETiC]\folder.jpg
\Season.00\Stargate M01 The Ark of Truth [2008.DVDRip.XviD-MEMETiC]\mymovies.xml
\Season.00\Stargate M01 The Ark of Truth [2008.DVDRip.XviD-MEMETiC]\stargate.the.ark.of.truth.dvdrip.xvid-memetic.nfo
\Season.00\Stargate M01 The Ark of Truth [2008.DVDRip.XviD-MEMETiC]\Stargate - The Ark of Truth-memetic-cd1.avi
\Season.00\Stargate M01 The Ark of Truth [2008.DVDRip.XviD-MEMETiC]\Stargate - The Ark of Truth-memetic-cd2.avi
\Season.10.DVDRips\metadata\Stargate.SG1.S10E01.Flesh.and.Blood-fov.xml
\Season.10.DVDRips\metadata\72449-303121.jpg
\Season.10.DVDRips\folder.jpg
\Season.10.DVDRips\Stargate.SG1.S10E01.Flesh.and.Blood-fov.avi

Kristopher Gilbert

unread,
Jan 6, 2009, 10:54:23 PM1/6/09
to videobro...@googlegroups.com

Heh, I didn’t know about the “Season 0” folder until Paul mentioned it on Messenger. I don’t necessarily like that solution, but I’m gonna play around with some of the folders I have and see if I can make it all look presentable.

 

Just off the top of my head though, Season 0 isn’t going to work out for Aqua Teen because of the two Christmas Specials. One is considered an Episode (in Season 4, Episode 3) and the other is considered a Special, however, the second special is intended to be watched right after the first but in order to do that you have to back out of Season 4 and go into Season 0 and then find the other Xmas special. Not intuitive, right?

 

Heh, plus wouldn’t it be cool if you could just dump all the episodes from every season and all of the specials into one folder and not have to move them into Season X folders? SQL backend would definitely help facilitate this…

FreQi

unread,
Jan 7, 2009, 1:25:22 AM1/7/09
to videobro...@googlegroups.com
Well, if you look at the metadata for the Aqua Teen special you pointed out, I fixed it.

The metadata showed that "Star Studded Xmas Spectacula:2" airs before s4e04, but it also said that it aired after season 4.  Apparently that forced it to list the episode at the end of the season instead of before the episode.  I have removed the "airs after season" info and now it lists it in the "correct" order.

Having a flat listing of all episodes in a series is appealing to a lot of people, but what about those of us with all 8 seasons of a show and I just want to see the most recent episode?  Kinda inconvenient to scroll to the end of 170+ episodes then.  I'd rather stick to the "Season X" directory structure myself.  If MediaBrowser wants to fabricate another display method to flatten out the series episode listing, cool, but I want my files in Season folders.

Oh, and I don't remember if it got implemented or not, but I think "Season 0" and "Specials" are legit folder names that are treated as a specials collection in TVScout.  Or maybe that's just in the SVN still.

Kristopher Gilbert

unread,
Jan 7, 2009, 2:44:37 AM1/7/09
to videobro...@googlegroups.com

The directory structure doesn’t necessarily have to match what MB shows, right? That’s why I was saying a SQL backend (and something Sam’s been saying for a while) would allow us to display a “fake” folder structure that doesn’t necessarily have to match the actual folder structure on the hard drive. So like you put all of your Auqa Teen episodes in an Auqa Teen folder, make sure they’re named properly and when you select Aqua Teen in MB, it shows you Season 1/Season 2/Specials, etc. even though the episodes aren’t actually in Season X folders. Even better, we could have both, just add a new “view” to the views we currently have.

 

Cool about fixing the Aqua Teen episode on the Tvdb site, I didn’t realize we had people here who could edit that site. The problem is still though that it’s tagged as a “special” so it appears in its own folder. Apparently this falls into our “episodes split into multiple files” issue as TV.com says Adult Swim officially calls them Episode 58a and 58b:

 

http://www.tv.com/aqua-teen-hunger-force/deleted-scenes/episode/588735/summary.html?tag=ep_guide;ep_title;2

 

Also, totally unrelated but I think there’s a bug in .vf’s. If you make a change to a .vf the changes aren’t reflected unless you rename the file, run MB, exit, then rename the file back and run MB again. Pretty sure about that, need to test it again cuz I found it a while ago but forgot to mention it but it may be fixed now…

FreQi

unread,
Jan 7, 2009, 8:54:11 AM1/7/09
to videobro...@googlegroups.com
I guess that's exactly what I am saying, but the other way around.  We can have mediabrowser present the episodes any way we want, but as far as the actual file and folder structure, it would be organized by Series and Season.

Why?  Partly because that's just how a series is broken up, and partly because that would allow for more flexibility in the file naming for people.  I don't know about the rest of you, but I name all my episodes with the "Series.S01E02.Episodes-group" convention.  This way would work fine as a "flat" series file list, but a lot of people seem to use "Series\S1\02-Episode.avi".  You couldn't flatten that out very well with multiple seasons if the file names do not reflect the season that the file/episode belongs too.  This is why TVScout requires Season folders.

The closest we have come to removing the Season folder requirement for TVScout is talking about a series that only has one season and using a "rule" in the Series.xml that would identify this and put all episodes in Series\.  I don't really like this option since all shows start out with "only one season", so when a second season starts, now what?  The Rule is bad and metadata fetching becomes more complicated.

I think having the Series\Season\ folder structure as a prerequisite would make things easier than if we had to deal with unorganized file structures.


As for the editing of metadata on TheTVDb.com, you just have to create an account and you can change data too.  I have no special access.  Just log in, click the series and you can add/modify episodes, even upload posters.  Deleting has to be done by request in the forums however.

FreQi

unread,
Mar 24, 2010, 7:03:07 PM3/24/10
to videobro...@googlegroups.com
So it's been more than a year since I brought this up, but today I had a new idea of how to handle multi-part episodes.

To recap: a "multi-part episode" is my way of referring to a single file that contains more than one episode as defined in metadata sources like TheTVDB.com.

For example, let's say I have a single file named "Lost.S06E01.S06E02.LA.X-2hd.mkv" which contains both episodes 1 and 2 of the 6th season of Lost.  MediaBrowser will show this file only as Episode 1 and Episode 2 is not listed.  How to work around this has been the puzzle.

Here's my idea: What if we just created a new file that lists a starting time code and the relative path name to the file that contains the part?  Maybe an XML file if we want to get fancy, but something simple like a text file named "Lost.S06E02.prt" which contains "0:44:23 Lost.S06E01.S06E02.LA.X-2hd.mkv" ?  Then have MediaBrowser recognize these files and list them as episodes.  When the user selects them it plays the linked file starting at the specified time code.

Sort of like a combination of resume playback and playlists.

Thoughts?



--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "VideoBrowser Devs" group.
To post to this group, send email to videobro...@googlegroups.com
To unsubscribe from this group, send email to videobrowser-d...@googlegroups.com
For more options, visit this group at http://groups.google.com/group/videobrowser-devs?hl=en
-~----------~----~----~----~------~----~------~--~---



Reply all
Reply to author
Forward
0 new messages