SageTV Community  

Go Back   SageTV Community > SageTV Development and Customizations > SageTV v7 Customizations > Batch Metadata Tools
Forum Rules FAQs Community Downloads Today's Posts Search

Notices

Batch Metadata Tools This forums is for discussing the user-created Batch Metadata Tools for SageTV.

Reply
 
Thread Tools Search this Thread Display Modes
  #21  
Old 01-21-2011, 03:40 PM
VikingCrown's Avatar
VikingCrown VikingCrown is offline
Sage Aficionado
 
Join Date: Jun 2006
Posts: 269
Quote:
Originally Posted by stuckless View Post
for your needs, all you really need is a simply properties file (or user record) that maps CurrentTitle=DesiredTitle. Again, you can probably do this using the MediaTitles.xml but a simple properties file might work better. I do something like this now for the ratings. I use a properties file (which is like a map) and I set the rating something like
rating=ratings.getProperty(CurrentRating,CurrentRating)
This way, rating will either be CurrentRating or a value the properties file.
Stuckless,

could you provide a little more info here? This sounds easier than using the MediaTitles.xml which i can't seem to make work for similar titles, Castle, V, Parenthood . . .

Here is my mediatitles.xml:
Code:
<titles>
	<!--
	A Match can contain a regex that will be used to match against the path.  If it matches, then it will
	then set the fields, title, year, or id, into the search query.
	-->
	
	<match>
		<regex>[\\/]V[\\/]</regex>
		<metadata type="tv" name="tvdb">94971</metadata>
	</match>

</titles>
Here is the error:
2011-01-21 16:30:22,388 - ERROR; E:\V-LaidBare-1084643-0.mpg; V; 1093887; Failed while parsing series: MediaSearchResult [extraArgs={CLEAN_TITLE: V,YEAR: 0,EPISODE_TITLE: Laid Bare,RAW_TITLE: V,EPISODE_DATE: 2011-01-18,}, id=76354, imdbId=null, metadata=null, providerId=tvdb, score=1.0, title=V, type=TV, url=76354, year=1983]

I'm happy to try and make the mediatitles.xml work, but if a simple properties file will do the trick, i'm all for it.
Reply With Quote
  #22  
Old 01-21-2011, 04:00 PM
razrsharpe razrsharpe is offline
Sage Icon
 
Join Date: Sep 2008
Location: Boston, MA
Posts: 2,111
stuckless and i were talking about development and how to get the UI to not display years in the title of shows like Castle and Parenthood so this really isn't applicable to your situation.... And my problem went away with bmt 4.9.7 which fixed a bug that was allowing the automatic processor to update items that were already filled in even though preserve metadata was checked.

But... on to your problem with the mediatitles.xml file. To get the mediatitles.xml file to work you need to understand that the regex portion of the match is a full path filename matcher...

Sage recordings all have a similar format [PATH\ShowName-EpisodeTitle-XXXXXX-X]

the regex that you provided for V will match against a folder that is V (ie ..\TVShows\V\V - s01e2.avi)
( [\\/] means folder separator in regex... or that's what stuckless is using it as here).

Using the format for the sage recording filename aboe you would need this to match it
Code:
    <match>
        <regex>[\\/]Castle-.*</regex>
        <title>Castle</title>
        <year>2009</year>
        <metadata type="tv" name="tvdb">83462</metadata>
    </match>
notice the .* in the regex... that means any character (.) any number of times(*).

Attached is my mediatitles.xml file that has some of the other shows you mentioned...
Attached Files
File Type: txt MediaTitles.xml.txt (1.1 KB, 145 views)
__________________
Server 2003 r2 32bit, SageTV9 (finally!)
2x Dual HDHR (OTA), 1x HD-PVR (Comcast), 1x HDHR-3CC via SageDCT (Comcast)
2x HD300, 1x SageClient (Win10 Test/Development)
Check out TVExplorer

Last edited by razrsharpe; 01-21-2011 at 04:33 PM.
Reply With Quote
  #23  
Old 01-21-2011, 04:29 PM
VikingCrown's Avatar
VikingCrown VikingCrown is offline
Sage Aficionado
 
Join Date: Jun 2006
Posts: 269
Thanks Razr,

I was able to get Castle to work with your MediaTitles.xml file, however i can't seem to make V work. Here are all the combinations I tried:

Code:
	<match>
		<regex>[\\/]V-.*[\\/]</regex>
		<title>V (2009)</title>
		<metadata type="tv" name="tvdb">94971</metadata>

	</match>

	<match>
		<regex>[\\/]V-.*[\\/]</regex>
		<title>V</title>
		<year>2009</year>
		<metadata type="tv" name="tvdb">94971</metadata>

	</match>


	<match>
		<regex>[\\/]V-.*[\\/]</regex>
		<metadata type="tv" name="tvdb">94971</metadata>

	</match>
thoughts?
Reply With Quote
  #24  
Old 01-21-2011, 04:32 PM
razrsharpe razrsharpe is offline
Sage Icon
 
Join Date: Sep 2008
Location: Boston, MA
Posts: 2,111
you need
Code:
    <match>
        <regex>[\\/]V-.*</regex>
        <title>V</title>
        <year>2009</year>
        <metadata type="tv" name="tvdb">94971</metadata>

    </match>
you need to remove that last [\\/] in the regex
__________________
Server 2003 r2 32bit, SageTV9 (finally!)
2x Dual HDHR (OTA), 1x HD-PVR (Comcast), 1x HDHR-3CC via SageDCT (Comcast)
2x HD300, 1x SageClient (Win10 Test/Development)
Check out TVExplorer
Reply With Quote
  #25  
Old 01-21-2011, 04:34 PM
bialio's Avatar
bialio bialio is offline
SageTVaholic
 
Join Date: May 2007
Location: Frisco, TX
Posts: 3,445
Code:
	<match>
		<regex>[\\/]V-</regex>
		<metadata type="tv" name="tvdb">94971</metadata>
	</match>
This is what I use and it seems to work.
btl.
__________________
PHOENIX 3 is here!
Server : Linux V9, Clients : Win10 and Nvidia Shield Android Miniclient
Reply With Quote
  #26  
Old 01-21-2011, 04:36 PM
razrsharpe razrsharpe is offline
Sage Icon
 
Join Date: Sep 2008
Location: Boston, MA
Posts: 2,111
i guess technically you don't need the .* part...
__________________
Server 2003 r2 32bit, SageTV9 (finally!)
2x Dual HDHR (OTA), 1x HD-PVR (Comcast), 1x HDHR-3CC via SageDCT (Comcast)
2x HD300, 1x SageClient (Win10 Test/Development)
Check out TVExplorer
Reply With Quote
  #27  
Old 01-21-2011, 04:39 PM
bialio's Avatar
bialio bialio is offline
SageTVaholic
 
Join Date: May 2007
Location: Frisco, TX
Posts: 3,445
Yeah, and interestingly I don't think I really need this entry in mine - I put it in the other day when I was adding some others, but my V episodes have always found their meta-data even before I put this entry into MediaTitles.xml.

btl.
__________________
PHOENIX 3 is here!
Server : Linux V9, Clients : Win10 and Nvidia Shield Android Miniclient
Reply With Quote
  #28  
Old 01-21-2011, 09:47 PM
stuckless's Avatar
stuckless stuckless is offline
SageTVaholic
 
Join Date: Oct 2007
Location: London, Ontario, Canada
Posts: 9,713
Quote:
Originally Posted by razrsharpe View Post
i guess technically you don't need the .* part...
That's correct. BMT basically uses a contains search on the file path.
Reply With Quote
  #29  
Old 01-22-2011, 07:57 AM
VikingCrown's Avatar
VikingCrown VikingCrown is offline
Sage Aficionado
 
Join Date: Jun 2006
Posts: 269
Quote:
Originally Posted by razrsharpe View Post
you need to remove that last [\\/] in the regex

thanks!

not sure where that extra [\\/] came from, but it works perfectly!
Reply With Quote
Reply


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
A few hints needed for MediaTitles.xml davidk21770 Batch Metadata Tools 47 07-26-2016 11:00 AM
MediaTitles.xml failed, how do I see what went wrong? davidk21770 Batch Metadata Tools 5 09-28-2010 11:47 AM
Quick MediaTitles.xml question davidk21770 Batch Metadata Tools 3 09-24-2010 01:48 PM
Problem with MediaTitles.xml cmaloney Batch Metadata Tools 12 08-17-2010 07:44 PM
read-write xml files perry59 SageTV Studio 3 11-12-2007 06:53 PM


All times are GMT -6. The time now is 03:46 AM.


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2023, vBulletin Solutions Inc.
Copyright 2003-2005 SageTV, LLC. All rights reserved.