FAQ  •  Register  •  Login

regex TV series

<<

fizze

Serviio lover

Posts: 88

Joined: Wed Dec 02, 2009 8:27 am

Location: Austria

Post Wed Dec 09, 2009 5:13 pm

regex TV series

Many of my TV series were picked up correctly by Serviio.
But many weren't. I saw that the rules for checking are rather strict.

I'm running Swisscenter too, which handles metadata in (imho) very good way.
It users user changeable regulex expressions to parse TV episode, series and season info.

The regexes are run in order, and the first one to offer all variables, gets chosen.

That's from swisscenter's config thingy (hope layout doesnt get messed up too bad):

The details for a TV series are determined from the filename and path using regular expressions. The file is compared with the following expressions until a match is found. These expressions contain placeholders for programme {p}, series {s}, episode {e}, and title {t}. You must have at least one of these placeholders in each expression to extract details. If you require assistance with this then you should post in the forums.

Priority Expression
1 {p}/season {s}/{t}\W+\(?s{s}e{e}\)?
2 {p}/season {s}/{t}\W+\(?{s}x{e}\)?
3 {p}/{t}\W+\(?s{s}e{e}\)?
4 {p}^/*/[^/]+s{s}e{e}\W+{t}
5 {p}\W+s{s}e{e}\W+{t}
6 {p}\W+{s}x{e}\W+{t}
7 {p}/series {s}/{e}\W+{t}
8 {p}/season {s}/{e}\W+{t}
9 {p}/{s}-{e} - {p} - {t}
10 {p}-season {s},ep.{e}-{t}
11 {p}/{s}/{e}\W*{t}
12 {p}/{e}\W+{t}
13 {p}/{t}\W+\(?s{s}e{e}\)?
14 {p}/{t}\W+\(?{s}x{e}\)?
15 {p}\W+s{s}e{e}
16 {p}\W+{s}x{e}
17 {p}/{t}
18 {t}


It would be great to have something similiar implemented, since I don't want to rename all the files ;)
Plus this gives everyone the chance of adding support for their own archiving system.

Btw, Swisscenter also differenciates between movies and TV series as a category. It might make things easier for serviio to do this as well.
0.02€ ;)
Intel SS4200 - Ubuntu Server 8.04
LG BD - 390
<<

zip

User avatar

Serviio developer / Site Admin

Posts: 17212

Joined: Sat Oct 24, 2009 12:24 pm

Location: London, UK

Post Thu Dec 10, 2009 11:14 pm

Re: regex TV series

It's an interesting solution but I won't be doing it at the moment - it's usable for maybe 1% of the users. I'd love to know what are the series names that you have that don't get recognized - I can add move patterns to the code.
<<

fizze

Serviio lover

Posts: 88

Joined: Wed Dec 02, 2009 8:27 am

Location: Austria

Post Fri Dec 11, 2009 5:38 pm

Re: regex TV series

Will do, will do. ;)
There you go:

  Code:
(129)S06E01 - some title.avi
(131)S06E03 - another title.avi
(132)S06E04 - some other title.avi
(133)S06E05 - title title.avi

and so on.

Stuff like that, too:
  Code:
01-06 - Series Name - title words.avi
02-01 - Series Name - title blah.avi
03-01 - Series Name - title title.avi

etc, you get the idea.

Further:
  Code:
3x01_-_title.and.more.titles.avi
3x02_-_title.foo.avi
5x04_-_hyphen_-_title.story.avi

etc.

  Code:
114 - Intersting Title.avi
216 - Stuff.avi
318-Information.avi

...you get the idea.

Wait, there's more!
  Code:
Series.Name.-.S01E01.-.Words.Words.,.More.Words.avi
Series.Name.-.S01E04.-.Funny.Sentences.avi
Series.Name.-.S03E19.-.Crazy.Things.avi
Series.Name.-.S04E22.-.Whatever.avi


I've got more:
  Code:
Seriesname.2.s01e04.boring.title.avi
Seriesname.2.s01e07.snooze.avi
Seriesname.2.s01e15.some.wordy.long.name.that.is.weird.avi
The.Name.Of.The.Show.S01E01.avi
The.Name.Of.The.Show.S01E02.avi


And also:
  Code:
title.of.series.203.title.of.episode.avi
title.of.series.113.title.of.episode.avi
title.of.series.209.title.of.episode.avi


In addition:
  Code:
TV.Show.Name.2009.08.04.Guest.Of.The.Show.avi

etc.

Now this is a special case, because there are no seasons, and there definitely isn't any metadata to be found. Still I wouldn't want these episodes to clutter up my movies.

To sum it up:
I've got a lot of filenames that match:
  Code:
.[sS]\d{2}[eExX]\d{2}.
but aren't recognized, even though the name of the series is part of the filename.

edit:
Oh and while we're on the wonderful topic of metadata: Currently DVD rips show up as individual vob files, which surely isn't very nice.
Is it possible to fall back to parent folder name, if the file name doesn't get any metadata hits?
Intel SS4200 - Ubuntu Server 8.04
LG BD - 390
<<

zip

User avatar

Serviio developer / Site Admin

Posts: 17212

Joined: Sat Oct 24, 2009 12:24 pm

Location: London, UK

Post Fri Dec 25, 2009 2:22 pm

Re: regex TV series

Oh and while we're on the wonderful topic of metadata: Currently DVD rips show up as individual vob files, which surely isn't very nice.
Is it possible to fall back to parent folder name, if the file name doesn't get any metadata hits?


Working on this issue now. This I believe is already implemented, ie it will recognize this:

  Code:
c:/Videos/Movie/Video_TS/VTS_02_1.VOB


as a video with name "Movie". Obviously if there are more vob in the folder you'll get more of the same 'movie' when you browse.
<<

fizze

Serviio lover

Posts: 88

Joined: Wed Dec 02, 2009 8:27 am

Location: Austria

Post Fri Dec 25, 2009 5:13 pm

Re: regex TV series

Good News! :)

Of course there are multiple VOB files.... Could you just show them in a folder called "Movie" instead?
I don't think it's possible to show "Movie" as a single FILE and then chain all the files together (in playlist-like manner, figuratively speaking, right?
Intel SS4200 - Ubuntu Server 8.04
LG BD - 390
<<

zip

User avatar

Serviio developer / Site Admin

Posts: 17212

Joined: Sat Oct 24, 2009 12:24 pm

Location: London, UK

Post Fri Dec 25, 2009 5:31 pm

Re: regex TV series

Definitely not at the moment I'm afraid.
<<

zip

User avatar

Serviio developer / Site Admin

Posts: 17212

Joined: Sat Oct 24, 2009 12:24 pm

Location: London, UK

Post Fri Dec 25, 2009 6:24 pm

Re: regex TV series

Ok, I've added a vfew more regex definitions, but at least half of the examles you provided pass my tests and should work already:

  Code:
Series.Name.-.S01E01.-.Words.Words.,.More.Words.avi
Seriesname.2.s01e04.boring.title.avi
The.Name.Of.The.Show.S01E01.avi
<<

fizze

Serviio lover

Posts: 88

Joined: Wed Dec 02, 2009 8:27 am

Location: Austria

Post Wed Jan 20, 2010 6:26 pm

Re: regex TV series

I took a peek at this again, and these are still not recognized properly:

  Code:
Series Name - 1 - 01 - The Title Of The Episode.avi
name.of.series.101.the.title.of.the.episode.avi
101 - Pilot.avi
1x01_-_Title.Of.The.Episode.avi
The Name Of The Series 101.avi

Obviously all of these are Season 1, Episode 1.
Intel SS4200 - Ubuntu Server 8.04
LG BD - 390
<<

zip

User avatar

Serviio developer / Site Admin

Posts: 17212

Joined: Sat Oct 24, 2009 12:24 pm

Location: London, UK

Post Wed Jan 20, 2010 7:18 pm

Re: regex TV series

Ok,Will look into it.... some of them might be not doable, since they might represent a movie title (e.g. 300, 500 days, year in the title of the movie etc)
<<

fizze

Serviio lover

Posts: 88

Joined: Wed Dec 02, 2009 8:27 am

Location: Austria

Post Wed Jan 20, 2010 7:31 pm

Re: regex TV series

Well, that's why it might be best to separate movies and TV series altogether. ;)
Intel SS4200 - Ubuntu Server 8.04
LG BD - 390
<<

zip

User avatar

Serviio developer / Site Admin

Posts: 17212

Joined: Sat Oct 24, 2009 12:24 pm

Location: London, UK

Post Wed Jan 20, 2010 9:36 pm

Re: regex TV series

Or you might just rip your legally owned series DVDs using the supported file names :-D
<<

fizze

Serviio lover

Posts: 88

Joined: Wed Dec 02, 2009 8:27 am

Location: Austria

Post Sat Feb 20, 2010 12:30 pm

Re: regex TV series

Alright, so I went on a prename spree to sort this out once and for all.
Most things were picked up alright, but it still doesn't like Stargate SG-1. :(

I've got filenames like:
  Code:
Stargate.SG-1 S05E19 Reese.avi


"Stargate SG-1" is what the series is called on TheTVDB, so that should work fine. It's deffo being picked up by Swisscenter alright, so that can't be it.
Maybe the dash throws serviio off?
Intel SS4200 - Ubuntu Server 8.04
LG BD - 390
<<

zip

User avatar

Serviio developer / Site Admin

Posts: 17212

Joined: Sat Oct 24, 2009 12:24 pm

Location: London, UK

Post Sun Apr 11, 2010 2:55 pm

Re: regex TV series

fizze wrote:I took a peek at this again, and these are still not recognized properly:

  Code:
Series Name - 1 - 01 - The Title Of The Episode.avi - FIXED in 0.4
1x01_-_Title.Of.The.Episode.avi  - WAS ALREADY SUPPORTED



The rest are not supported, could represent movies (e.g. 300.avi)
<<

fizze

Serviio lover

Posts: 88

Joined: Wed Dec 02, 2009 8:27 am

Location: Austria

Post Mon Apr 12, 2010 1:07 pm

Re: regex TV series

Don't know why this thread came up again, seeems this case is almost closed to me. ;)

Any idea why serviio dislikes Scrubs? :roll: ;)
I've got episodes named like "Scrubs.S01E01.avi" and they are not recognized. Not one of them. Which might lead me to believe that there might be a problem with thetvdb with this series in general?
Anyone else also getting this?
Intel SS4200 - Ubuntu Server 8.04
LG BD - 390
<<

xaphan

Serviio newbie

Posts: 14

Joined: Mon Nov 30, 2009 11:10 pm

Post Sat May 22, 2010 5:34 pm

Re: regex TV series

Hi, glad to see you are working on getting this excellent program to recognise various naming conventions.

I tend to use a specific syntax for my files:

  Code:
Series Name - [01x01] - Episode Title.avi


some of these series are correctly tagged, some arent. is there any particular reason why the same syntax of filename may not be recognised for some series over others?
<<

zip

User avatar

Serviio developer / Site Admin

Posts: 17212

Joined: Sat Oct 24, 2009 12:24 pm

Location: London, UK

Post Sun May 23, 2010 9:12 pm

Re: regex TV series

Give an example of one that is not recognised.

Return to Feature requests

Who is online

Users browsing this forum: No registered users and 26 guests

Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group.
Designed by ST Software for PTF.