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
  #181  
Old 03-11-2010, 10:14 PM
stuckless's Avatar
stuckless stuckless is offline
SageTVaholic
 
Join Date: Oct 2007
Location: London, Ontario, Canada
Posts: 9,713
Basically, from my perspective, i'd grab the series info (which i'm doing now), and I'd use the year from the series info (which should be the same no matter the season), if it exists, otherwise, it would work as it does now, and not include the year. I'll do some testing.
Reply With Quote
  #182  
Old 03-12-2010, 04:03 PM
newpath newpath is offline
Sage User
 
Join Date: Aug 2008
Posts: 31
@stuckless - Sean, you're right about the tvdb name actually being "Battlestar Galactica (2003)". I tried the same method with "The Prisoner" by renaming my episodes to "The Prisoner (2009)" only to find out that it also worked because the tvdb name was "The Prisoner (2009)". Soooo...I just got lucky and my suggestion to use the modifed names in the MediaTitles.xml file is probably moot. Therefore, I'm interested to know the working status of the MediaTitles.xml approach.
Reply With Quote
  #183  
Old 03-12-2010, 06:13 PM
stuckless's Avatar
stuckless stuckless is offline
SageTVaholic
 
Join Date: Oct 2007
Location: London, Ontario, Canada
Posts: 9,713
@newpath - could you email me your MediaTitles.xml, and a few filenames, that you are having issues with. I'll test them here and see the results. From that, i can then hopefully get a better handle on what's the issue. My time this weekend is pretty tight (I have some other dev committments), but I'll try to take a look at this as well. In my limited testing, the MediaTitles.xml was working, so having your filenames and MediaTitles.xml is important.

Thanks,
Reply With Quote
  #184  
Old 03-15-2010, 02:41 AM
JREkiwi's Avatar
JREkiwi JREkiwi is offline
Sage Icon
 
Join Date: Jan 2005
Location: Auckland, New Zealand
Posts: 2,132
Sean, is there a way to stop BMT from overwriting the Episode field when doing a metadata update on imported videos which are not being imported as SageTV Recordings?

The Episode field usually contains the imported video filename and it is the field that videos are sorted on.

BMT is replacing the Episode field with the same value as EpisodeTitle, which means all my videos are being displayed out of order.

thanks,
John
Reply With Quote
  #185  
Old 03-15-2010, 07:40 AM
razrsharpe razrsharpe is offline
Sage Icon
 
Join Date: Sep 2008
Location: Boston, MA
Posts: 2,111
on 3.x (havent tried 4.x out yet) you could change the Media Title mask. There were 2 different masks... one for when importing tv to the recording db and one for when not... my guess is its still there....
__________________
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
  #186  
Old 03-15-2010, 08:30 AM
stuckless's Avatar
stuckless stuckless is offline
SageTVaholic
 
Join Date: Oct 2007
Location: London, Ontario, Canada
Posts: 9,713
Quote:
Originally Posted by JREkiwi View Post
Sean, is there a way to stop BMT from overwriting the Episode field when doing a metadata update on imported videos which are not being imported as SageTV Recordings?

The Episode field usually contains the imported video filename and it is the field that videos are sorted on.

BMT is replacing the Episode field with the same value as EpisodeTitle, which means all my videos are being displayed out of order.

thanks,
John
John, the only way to really stop this is to uncheck "Update Wiz.bin". BMT call AddShow(), and it defines Episode as being "the episode name for this Show (for music this should be the song title)".

It could be that for some reason sagetv stores the filename in the Episode fields, but then I question, where is the actual episode title stored?

A Show contains the following fields...
Code:
    Title - the title of the Show (for music this should be album name)
    IsFirstRun - true if this Show is a first run, false otherwise (this parameter has no effect anymore since Airings determine first/rerun status)
    Episode - the episode name for this Show (for music this should be the song title)
    Description - the description of the Show
    Duration - the duration of the Show, not necessary and can be zero; this is only used for indicating differences between Airing duration and the actual content duration
    Category - the category of the Show (should be genre for music)
    SubCategory - the subcategory of the Show
    PeopleList - a list of all of the people in the Show, the roles of the people should correspond to the RolesListForPeopleList argument
    RolesListForPeopleList - a list of the roles for the people in the Show, this should correspond to the PeopleList argument
    Rated - the rating for the Show see GetShowRated()
    ExpandedRatingsList - the expanded ratings list for the show, see GetShowExpandedRatings()
    Year - the year of the Show
    ParentalRating - the parental rating for the Show (this is no longer used since Airing contains the parental rating)
    MiscList - miscellaneous metadata for the Show
    ExternalID - the global ID which should be used to uniquely identify this Show
    Language - the language for the Show
    OriginalAirDate - the original airing date of the Show

BTW... unchecking Update Wiz.bin will still populate the Season/Episode info in the custom metadata fields (which is required for fanart), but it will not use the AddShow() api to directly update the wiz.bin.

Quote:
Originally Posted by razrsharpe View Post
on 3.x (havent tried 4.x out yet) you could change the Media Title mask. There were 2 different masks... one for when importing tv to the recording db and one for when not... my guess is its still there....
I don't think BMT allows masks on the Episode title (I could be wrong). I think it only allows masks on the Title field.
Reply With Quote
  #187  
Old 03-15-2010, 08:35 AM
razrsharpe razrsharpe is offline
Sage Icon
 
Join Date: Sep 2008
Location: Boston, MA
Posts: 2,111
Quote:
Originally Posted by stuckless View Post
I don't think BMT allows masks on the Episode title (I could be wrong). I think it only allows masks on the Title field.
No I think you are right... I was getting all the different Titles confused ...

but... i think for sorting imported videos the Sage video library sorts by the MediaTitle field... which i think is the title field that you allow a mask to be set for... which should/might be what he is looking for...
__________________
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; 03-15-2010 at 12:54 PM.
Reply With Quote
  #188  
Old 03-15-2010, 12:54 PM
JREkiwi's Avatar
JREkiwi JREkiwi is offline
Sage Icon
 
Join Date: Jan 2005
Location: Auckland, New Zealand
Posts: 2,132
But if I turn off update wiz.bin I won't get any description.

I think the addshow part is handling the music field anomaly, but not catering for the imported video field anomaly. Unfortunately you need to look further up the page for the descriptions of GetShowTitle() and GetShowEpisode() to see a proper description of what is stored in those fields

Code:
Title: the title of the specified Show. For music this will correspond  to the Album name. For imported videos, this will  be the title of the file with the relative import path as it's prefix

Episode: the episode name for the specified Show. For music files, this will be  the name of the song. For imported videos, this will be the title of the  file.
John

Last edited by JREkiwi; 03-15-2010 at 12:56 PM.
Reply With Quote
  #189  
Old 03-15-2010, 01:35 PM
stuckless's Avatar
stuckless stuckless is offline
SageTVaholic
 
Join Date: Oct 2007
Location: London, Ontario, Canada
Posts: 9,713
John, I gues I'm trying to understand exactly what that would look like... so, if I have an import dir of "/Videos/" and I import "/Videos/DVDs/Terminator/VIDEO_TS", then my fields become
Title=DVDs/Terminator/VIDEO_TS/The Terminator
Episode=The Terminator

likewise, if i import, "/Videos/TV/Heroes/Season 1/Heroes S01E01.avi"
Title=TV/Heroes/Season 1/Heroes/Heroes S01E01
Episode=Heroes Episode Title

Would that be correct? If so, I can look at changing the code, I was unaware that the title was to contain the relative path of the imported file.
Reply With Quote
  #190  
Old 03-15-2010, 03:56 PM
JREkiwi's Avatar
JREkiwi JREkiwi is offline
Sage Icon
 
Join Date: Jan 2005
Location: Auckland, New Zealand
Posts: 2,132
Sean, Sorry I'm at work at the moment and can't recall the details off the top of my head. It would be easy enough to check with GetShowTitle() and GetShowEpisode() on some unadulterated imports.

I cheat when using AddShow for imported videos and just use GetShowTitle() to get the existing value of title and use that as the title value.

The episode value on imported videos i believe defaults to the filename excluding extension and that is the value the default STV uses to sort on, so in your example if I was changing it I would set it to

Episode=Heroes S01E01 Pilot

so that it still sorts nicely.

John
Reply With Quote
  #191  
Old 03-15-2010, 04:48 PM
evilpenguin's Avatar
evilpenguin evilpenguin is offline
SageTVaholic
 
Join Date: Aug 2003
Location: Seattle, WA
Posts: 3,696
Hey Sean, I remember seeing a post for how to enable support for
Code:
Show SxE - Episode.avi
Code:
Top Gear 10x02 - Crossing The Channel.avi
naming format, but I cant find it now, can you point out again?
__________________
Clients: 1xHD200 Connected to 50" TH-50PZ750U Plasma
Server : Shuttle SFF SSH55J2 w/ Win7 Home, SageTV v7, Core i3 540, 2GB RAM, 30GB SSD for OS, 1.5TB+2x1TB WDGP for Recordings, BluRay, 2xHDHR, 1xFirewire
SageTV : PlayOn, SJQ, MediaShrink, Comskip, Jetty, Web Client, BMT


Having a problem? Don't forget to include a log! (Instructions for: PlayOn For SageTV v1.5, MediaShrink)
Reply With Quote
  #192  
Old 03-15-2010, 06:33 PM
stuckless's Avatar
stuckless stuckless is offline
SageTVaholic
 
Join Date: Oct 2007
Location: London, Ontario, Canada
Posts: 9,713
@evilpenguin - not sure what perspective you are looking at... so i'll cover both

1. To add support for parsing tv filenames, the scrapers are in scrapers/xbmc/tvfilenames. You modify an exsiting scraper, or add a new one to cover the filename patterns that you want. There is already a scraper for Title-00x00.xml that should include the filenames that you listed. But, maybe the scraper is broken in your case.

2. If you want to name your titles in the format, "Show SxE Episode", then you can look at the title masks (just search for mask in the configuration ui).

If it's neither of those options, then let me know.
Reply With Quote
  #193  
Old 03-15-2010, 06:45 PM
evilpenguin's Avatar
evilpenguin evilpenguin is offline
SageTVaholic
 
Join Date: Aug 2003
Location: Seattle, WA
Posts: 3,696
Quote:
Originally Posted by stuckless View Post
@evilpenguin - not sure what perspective you are looking at... so i'll cover both

1. To add support for parsing tv filenames, the scrapers are in scrapers/xbmc/tvfilenames. You modify an exsiting scraper, or add a new one to cover the filename patterns that you want. There is already a scraper for Title-00x00.xml that should include the filenames that you listed. But, maybe the scraper is broken in your case.

2. If you want to name your titles in the format, "Show SxE Episode", then you can look at the title masks (just search for mask in the configuration ui).

If it's neither of those options, then let me know.
Yep I'm talking about the first one and it looks like it was failing one me...
Code:
Processing: Top Gear 10x01 - The Best Driving Roads In Europe.avi
Searching for: Top Gear 1


Search Results: Top Gear 1


[h=help, q=quit, n=next (default), ##=use result ##, TITLE=Search TITLE]
>
Fortunately, I had the regex to fix it laying around in my dev folder

It covers both SXXEXX and SxE as well as handing some common naming conventions that I found caused problems.

Title-00x00.xml:
Code:
<scraper name="title-00x00" content="filename" thumb="thumb.png">
	<!-- 	input: 		$1=complete file uri -->
	<!-- 	returns: 	show name -->
	<GetShowName dest="3">
		<RegExp input="$$1" output="\1" dest="3">
			<expression>.*[/\\](.+)[ ]?[\-\. ]{1}[ \[\.]?S?([0-9]{1,2})[ \.\-]?[xE]([0-9]{2})[^pi0-9]</expression>
		</RegExp>
	</GetShowName>

	<!-- 	input: 		$1=complete file uri -->
	<!-- 	returns: 	Season #-->
	<GetSeason dest="3">
		<RegExp input="$$1" output="\2" dest="3">
			<expression>.*[/\\](.+)[ ]?[\-\. ]{1}[ \[\.]?S?([0-9]{1,2})[ \.\-]?[xE]([0-9]{2})[^pi0-9]</expression>
		</RegExp>
	</GetSeason>

	<!-- 	input: 		$1=complete file uri -->
	<!-- 	returns: 	Episode #-->
	<GetEpisode dest="3">
		<RegExp input="$$1" output="\3" dest="3">
			<expression>.*[/\\](.+)[ ]?[\-\. ]{1}[ \[\.]?S?([0-9]{1,2})[ \.\-]?[xE]([0-9]{2})[^pi0-9]</expression>
		</RegExp>
	</GetEpisode>
</scraper>
__________________
Clients: 1xHD200 Connected to 50" TH-50PZ750U Plasma
Server : Shuttle SFF SSH55J2 w/ Win7 Home, SageTV v7, Core i3 540, 2GB RAM, 30GB SSD for OS, 1.5TB+2x1TB WDGP for Recordings, BluRay, 2xHDHR, 1xFirewire
SageTV : PlayOn, SJQ, MediaShrink, Comskip, Jetty, Web Client, BMT


Having a problem? Don't forget to include a log! (Instructions for: PlayOn For SageTV v1.5, MediaShrink)

Last edited by evilpenguin; 03-15-2010 at 07:03 PM.
Reply With Quote
  #194  
Old 03-15-2010, 06:58 PM
stuckless's Avatar
stuckless stuckless is offline
SageTVaholic
 
Join Date: Oct 2007
Location: London, Ontario, Canada
Posts: 9,713
wow... that really does make my head hurt.. i started to work my way through it... but then I just up

btw... i took update to my scraper and checked it in... so that'll be in the next build. thx.
Reply With Quote
  #195  
Old 03-15-2010, 10:03 PM
JREkiwi's Avatar
JREkiwi JREkiwi is offline
Sage Icon
 
Join Date: Jan 2005
Location: Auckland, New Zealand
Posts: 2,132
Just for the record
Quote:
Originally Posted by stuckless View Post
... so, if I have an import dir of "/Videos/" and I import "/Videos/DVDs/Terminator/VIDEO_TS", then my fields become
Title=DVDs/Terminator/VIDEO_TS/The Terminator
Episode=The Terminator
import "/Videos/DVDs/Terminator/VIDEO_TS"
Title=DVDs/Terminator
Episode=Terminator

import "/Videos/DVDs/Terminator"
Title=DVDs/Terminator
Episode=Terminator
Quote:
Originally Posted by stuckless View Post
likewise, if i import, "/Videos/TV/Heroes/Season 1/Heroes S01E01.avi"
Title=TV/Heroes/Season 1/Heroes/Heroes S01E01
Episode=Heroes Episode Title
Title=TV/Heroes/Season 1/Heroes S01E01
Episode=Heroes S01E01

The only use I see in the Episode field on imported videos is that it is the value that is used for sorting, so if my filenames are constructed so that they are sorted correctly then there's no need to change the Episode field.

John
Reply With Quote
  #196  
Old 03-16-2010, 06:12 AM
stuckless's Avatar
stuckless stuckless is offline
SageTVaholic
 
Join Date: Oct 2007
Location: London, Ontario, Canada
Posts: 9,713
Thanks John, I was inpecting some files last night as well.. to better understand how sagetv uses those 2 fields.

I hope that I can resolve some of these things for the next build.

Thanks,
Sean.
Reply With Quote
  #197  
Old 03-16-2010, 05:53 PM
toricred's Avatar
toricred toricred is offline
Sage Icon
 
Join Date: Jan 2006
Location: Northern New Mexico
Posts: 1,729
So I had a problem with my Sage server last night, but I didn't loose any of my recordings. When I go into TV Explorer I see all my recordings and imports, but I don't see the season or episode information for anything recorded prior to the problem. That shouldn't be a problem since I can go to the BMT web page and get it started looking for the metadata. Oops, most of my recordings aren't shown in either imported videos or recordings. I'm not sure why BMT is missing them. I could manually get the metadata from within Sage, but there's close to 1,000 recordings so I'd rather not do that.

Things I've tried so far:

1. Full reindex both from BMT's GUI and with the property in Sage.
2. Refresh imports.
3. Added my recordings folder to the imports folder.

I'm not sure what to try next. Any suggestions would be greatly appreciated.
Reply With Quote
  #198  
Old 03-16-2010, 06:22 PM
stuckless's Avatar
stuckless stuckless is offline
SageTVaholic
 
Join Date: Oct 2007
Location: London, Ontario, Canada
Posts: 9,713
@toricred - you want to browse the collection in bmt, where it's showing missing recordings, etc, and then create a support zip for me with just the log files. Maybe there are some errors in there for some shows, and that's why they are not showing up.
Reply With Quote
  #199  
Old 03-16-2010, 07:47 PM
toricred's Avatar
toricred toricred is offline
Sage Icon
 
Join Date: Jan 2006
Location: Northern New Mexico
Posts: 1,729
The zip file has been sent.
Reply With Quote
  #200  
Old 03-17-2010, 08:37 PM
toricred's Avatar
toricred toricred is offline
Sage Icon
 
Join Date: Jan 2006
Location: Northern New Mexico
Posts: 1,729
OK, so it's working to a degree after running the advanced video recovery process to update the paths to the files even though they never changed. The problem now seems to be that the automatic plugin is not working. How long after a recording starts should it take to go get the metadata?
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
Batch Metadata Tools new releases subscription thread stuckless Customization Announcements 18 02-17-2010 09:27 PM
Is there a way of doing Metadata WITHOUT BMT plnewton SageTV Customizations 12 08-17-2009 06:53 PM
BMT Metadata Provider List? cowboyway SageMC Custom Interface 1 08-12-2009 05:54 AM
Metadata Tools (Donations) stuckless SageTV Customizations 4 06-26-2009 05:54 AM


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


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