Ticket #85 (new Enhancement)

Opened 7 years ago

Last modified 7 years ago

Add ability to add own regex's for filename recognition and associate with .xml data.

Reported by: hatuttle Owned by:
Priority: normal Milestone:
Component: Other Version: 1.0b4.2
Keywords: Cc:

Description

Hi, I am aware that you have specific regex's which you use, which do a fairly good job of regognizing a lot of stuff and that you don't desire to change them. I am also aware of the ability to add .xml files for each file for overriding metadata as described here: http://appletv.nanopi.net/manual/overriding-metadata, and I'm sure it's nice for people managing a very static library of movies or something, however, I tend to have stuff coming and going every day, so it doesn't help me.

However, much of this stuff that I get every day would match a regex if I could just add it myself. An example is the following format, which I get every day when I download The Daily Show.

the.daily.show.01.10.08.dsr.xvid-0tv.[VTV].avi

Now, sapphire won't take it because it doesn't have a s01e01 type episode name, so it can't look it up on tvrage. But if I made a regex to just match "the.daily.show", and every time it sees that pattern, simply make the title of the show "The Daily Show", and then regonize the next 3 numbers separated by periods ("01.10.08")and put that into the episode number (simply as same format: ("01.10.08")), that would be a heck of a lot better than having to do it manually every day for the daily show. IMHO, the simple implementation would be to have a .xml file that has a regex element, and for anything that matches that regex, it will use the values in the .xml file, and to be able to make some of the parameters in the xml files also be regex's which could transform parts of the file name into parts of the xml file.

For example you could first add a global regex to decide whether a file applies to the .xml parameters by doing

<regex>[my global regex to decide whether I should process with this .xml file]</regex>

then under individual elements you could do the same

<episodeNumber>[my regex to extract episode number from file name and fill it in here]</episodeNumber>

and anything else could be static and unchanging for all episodes that match the first regex we defined in the <regex> element

<title>The Daily Show</title>

<description>A funny show which appears every day but doesn't get regonized by Sapphire, and is too much hassle to make a new .xml file for every day</description>

A bonus would be to be able to tell it that every time it sees "the.daily.show", that it also would use a certain picture.

That is my dream.

Keep up the good work.

Change History

comment:1 Changed 7 years ago by gbooker

We have toyed with matching by date. None of the developers watch shows that air every day, so we have had no incentive to implement it.

Patches welcome.

comment:2 Changed 7 years ago by hatuttle

It's not only about shows that air every day, but the many different formats that are not supported by the current regex's.

comment:3 Changed 7 years ago by scstraus

Good idea! See this ticket for more things that cannot be recognized, which we could use an idea like this to recognize.

http://appletv.nanopi.net/trac/ticket/67

Note: See TracTickets for help on using tickets.