|
Batch Metadata Tools This forums is for discussing the user-created Batch Metadata Tools for SageTV. |
|
Thread Tools | Search this Thread | Display Modes |
#1
|
|||
|
|||
Regex help for tv shows
Sean,
Not that good at regex how would I change the title mask for tv shows to do as I am doing \\showtitle\season\episodenumber.mpg is that possible? |
#2
|
||||
|
||||
Plucky,
I'm sure what you are asking... the TitleMask in BMT is used to set the display title for a media item... and it has nothing to do with regex. Or are you asking how to build a tv filename parser for the format that you are asking?
__________________
Batch Metadata Tools (User Guides) - SageTV App (Android) - SageTV Plex Channel - My Other Android Apps - sagex-api wrappers - Google+ - Phoenix Renamer Downloads SageTV V9 | Android MiniClient |
#3
|
|||
|
|||
Quote:
tvtitle-season-epsiode-epsiodename so it would get metadata on the tv files I have organized/named as per above if this isn't possible and I need to rename everything sorry for the dumb question |
#4
|
||||
|
||||
BMT uses an XBMC scraper for processing the filename patterns. They are included in the scrapers/xbmc/tvfilenames/ directory. You can drop a new file in there and it will be picked up (restart may need to be required)
Heres a sample scraper that uses Show Seaon ## Disc ##/Episode.avi format... Code:
<?xml version="1.0" encoding="UTF-8"?> <!-- TV Filename Scraper. Used to Scrape Show Name, Season and Episode from a given file URI $$1 is always the complete file uri --> <scraper name="title-s00d00" content="filename" thumb="thumb.png"> <!-- input: $1=complete file uri --> <!-- returns: show name --> <GetShowName dest="3"> <RegExp input="$$1" output="\1" dest="3"> <expression>.*[/\\](.*)Season\s+([0-9]{1,2})\s?Disc\s+([[0-9]]{1,2})</expression> </RegExp> </GetShowName> <!-- input: $1=complete file uri --> <!-- returns: Season #--> <GetSeason dest="3"> <RegExp input="$$1" output="\2" dest="3"> <expression>.*[/\\](.*)Season\s+([0-9]{1,2})\s?Disc\s+([[0-9]]{1,2})</expression> </RegExp> </GetSeason> <!-- input: $1=complete file uri --> <!-- returns: Disc #--> <GetDisc dest="3"> <RegExp input="$$1" output="\3" dest="3"> <expression>.*[/\\](.*)Season\s+([0-9]{1,2})\s?Disc\s+([[0-9]]{1,2})</expression> </RegExp> </GetDisc> </scraper> GetShowName GetSeason GetDisc GetEpisode GetAiredDate GetAiringId At a minimum you need to implement GetShowName, GetSeason and GetEpisode. GetShowName is the Series Name. Typcially when I'm creating scrapers, I tend to use Java and create a single regex pattern for that contains groups for Show,Season,Episode, and then when I put them into a regex scraper, I then change the output attribute to select the group that I want. ie, in the sample I posted here, the regex expression is exactly the same, but the output attribute selects either group 1,2,3. A regex for what you want, may look something like... Code:
.*[/\\]([^/\\]+)[/\\]([0-9]+)[/\\]([0-9]+)\.avi If you build the scraper, I can include it in future bmt builds.
__________________
Batch Metadata Tools (User Guides) - SageTV App (Android) - SageTV Plex Channel - My Other Android Apps - sagex-api wrappers - Google+ - Phoenix Renamer Downloads SageTV V9 | Android MiniClient |
#5
|
|||
|
|||
Thanks sean I will look at doing this and appreciate the examples regex is not a strong point for me
Also haven't used bmt in a long time and just wanted to say downloaded painfully the other day from the plugin manager and v4.0 is working very well nice job |
Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) | |
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
Regex, pulling internet pages, dev environment | bluenote | SageTV Studio | 4 | 01-28-2010 03:03 PM |
RegEx for Favorites? | matterw | SageTV Software | 2 | 01-23-2010 11:47 PM |
Regex in Favorites??? | zoundz | SageTV Software | 0 | 10-20-2008 10:56 AM |
SageTV - lost my favorite shows/series and recorded shows | seaverd | SageTV Software | 4 | 09-20-2007 05:56 AM |