|
Batch Metadata Tools This forums is for discussing the user-created Batch Metadata Tools for SageTV. |
|
Thread Tools | Search this Thread | Display Modes |
#1
|
||||
|
||||
Help! Get seasons & episode data from filename??
Hi guys
I have a fairly simple problem, which seems to be very difficult to solve! Hoping someone can help me out. 1. I'm running SageTV + Phoenix + BMT. Latest versions for everything. 2. I live in Australia & grab my EPG data from OzTivo and use LM Gestion's importer to get it into SageTV. 3. It appears that OzTivo includes the Season & Episode info in the show title. So my shows are title as follows: "TheBigBangTheory-Season3Episode10TheGorillaExperiment-13916457-0.mpg" 4. I have verified the above using BMT - season & episode fields are left blank and the show title is "Season 3 - Episode 10 - The Gorilla Experiment" So my problem is simple. How do I parse the season & episode info from the title into the season & episode fields in SageTV/BMT to enable accurate grouping by season? So far I've tried: 1. Renaming files to the format "showTitle-s01e01-episodeTitle.mpg". I don't like this approach & would like to avoid using it. 2. MediaTitles.xml - as far as I can tell there is no way to accomplish the above using XML? 3. Changing the way SageTV names its recordings - cant do it as far as I can tell. Is there anything I can do at all? Thanks for your help in advance. |
#2
|
||||
|
||||
Quote:
If you feel confident, you can try your hand at creating a scraper... they are located in the STVs/Phoenix/scrapers/xbmc/tvfilenames/ directory.
__________________
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:
1. What is the best way to learn how to write a scraper? I've mastered VFS so I can learn this as well, but what is a good guide? The BMT manual? 2. How do I "activate" a scraper once I have written one? Is that in the user guide? What is the naming convention for the file, etc? Cheers |
#4
|
||||
|
||||
I haven't tested this, but the following scraper should work, or at least be a good starting point.
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-Season00Episode00" 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([0-9]+)Episode([[0-9]+)</expression> </RegExp> </GetShowName> <!-- input: $1=complete file uri --> <!-- returns: Season #--> <GetSeason dest="3"> <RegExp input="$$1" output="\2" dest="3"> <expression>.*[/\\](.*)-Season([0-9]+)Episode([[0-9]+)</expression> </RegExp> </GetSeason> <!-- input: $1=complete file uri --> <!-- returns: Disc #--> <GetEpisode dest="3"> <RegExp input="$$1" output="\3" dest="3"> <expression>.*[/\\](.*)-Season([0-9]+)Episode([[0-9]+)</expression> </RegExp> </GetEpisode> </scraper>
__________________
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
|
||||
|
||||
Quote:
Thanks. |
#6
|
||||
|
||||
Actually, one more question stuckless....
Reading the userguide again, you have the following scraper already defined: "Series S##E## This is used to match TV shows in the format “SeriesName S##E##.ext” Examples House s01e01.avi House - S01E01 - Episode Title.avi Lie to Me s02e03.avi Lie to Me - s01e01 - Pilot Episode.avi" My files are named almost as per the second example (bolded) above. So if I just go in & amend that scraper to change "S" to "Season" and "E" to "Episode" - would that work?? |
#7
|
||||
|
||||
It should work... (I say should, becuase I'm not 100% sure)
__________________
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 |
#8
|
||||
|
||||
Ok, we're getting there...
The scraper in your other post did not work. However, I did manage to change the season & episode format to "S01E01". So now my filenames look like this: TheBigBangTheory-S2E09TheWhiteAsparagusTriangulation-13920147-0.mpg However, the default scraper included with BMT (Title-s00e00.xml) does not seem to work... I still don't get any season or episode details populated into BMT when the file is in the new format. S/E fields are blank. Any ideas on what am I doing wrong? Thanks. |
#9
|
|||
|
|||
This may be a dead thread, but if you are still looking for this, there is an option in:
Sage/Setup/Detailed Setup/Customize" "Include Season and Episode Numbers in Filenames" Turn this on and optionally make sure "Include Episode Names in Filenames" Is also turned on! Win!
__________________
Capture Server: Sage 9 - i7 16gb 256gb SSD Windows 10 32bit 3 x Colossus with 3 Rogers HD STBs - Firewire Blasting via FWproxy, EXE Tuner NAS: Win 7 - Dual Xeon, 48gb, 9TB Raid 6 Array w/ Comskip running in DirMon Clients: HD300 Have hardware like mine and need help? Just PM me |
Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) | |
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
How do you like to rip bluray tv seasons? | medwynd | Sage My Movies | 38 | 05-10-2011 09:59 AM |
TV View seperates some seasons? | jusjoken | Batch Metadata Tools | 1 | 11-11-2010 06:38 PM |
Season/Episode in filename | svalmorri | SageMC Custom Interface | 6 | 09-24-2009 09:42 PM |
More than 9 seasons? | bigo93bronco | SageTV Software | 2 | 09-23-2009 08:17 PM |
Episode data - recording error; need suggestions | Surtr | SageTV Software | 7 | 07-30-2008 01:58 AM |