SageTV Community  

Go Back   SageTV Community > SageTV Customizations > SageTV v7 Customizations > Batch Metadata Tools

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

Reply
 
Thread Tools Search this Thread Display Modes
  #1  
Old 03-09-2012, 10:16 PM
mgpaulus mgpaulus is offline
Sage User
 
Join Date: Mar 2011
Location: Colorado Springs, CO
Posts: 49
LibraryImporter wiping out MetaData

I have a Sagetv system doing recordings to local drives. Next to that machine, I have a mythtv box doing recordings also. The mythtv box is sharing it's drives via SMB/CIFS over to the sagetv box, and that seems to work ok.

As part of my mythtv processing, it builds up a .properties file for each recording. I have a pretty simple groovy script to create the .properties file.

My issue is that when LibraryImporter runs, it is wiping out the existing metadata (for instance, the Original Airing Date, the episode and the season, at the very least). Has anyone seen this, or have any ideas what might be causing the metadata wipeout?

Here is an example .properties file:
$ cat 7777_20120309175500.mpg.properties
# Created by mkSagetvProperties.groovy
# inFilename = 7777_20120309175500.mpg
Description=Savage Oppress searches for his missing kin, Darth Maul who is now a
shadow of his former self.
Title=Star Wars: The Clone Wars
ExternalID=EP010873610101
Stereo=True
EpisodeName=Brothers
MediaType=TV

Am I missing a critical piece of info causing the wipe? I don't see anything much interesting in the logs:
Code:
Fri 3/9 22:03:40.272 [LibraryImporter@1fa5d7] Using internal format detector first...
Fri 3/9 22:03:40.790 [LibraryImporter@1fa5d7] AV Format:Ret:0 Program:1 Duration:5948a8718 Format:AV-INF|f=MPEG2-TS;br=5491300;[bf=vid;f=MPEG2-Video;fps=29.970030;fpsn=30000;fpsd=1001;ar=1.777778;arn=16;ard=9;w=1920;h=1080;lace=1;cs=yuv420p;main=yes;tag=1211;pid=4625;index=0;];[bf=aud;f=AC3;sr=48000;ch=6;br=448000;main=yes;lang=eng;tag=1212;pid=4626;index=1;];[bf=aud;f=AC3;sr=48000;ch=2;br=192000;
lang=spa;tag=1213;pid=4627;index=2;];(0:39:56.694'300.0)
Fri 3/9 22:03:40.791 [LibraryImporter@1fa5d7] File Format Parsed-2a \\mythtv1\tv\7777_20120309175500.mpg=MPEG2-TS 0:39:56 5491 kbps [#0 Video[MPEG2-Video 29.97003 fps 1920x1080 16:9 interlaced id=1211]#1 Audio[AC3 48000 Hz 6 channels 448 kbps MAIN idx=1 id=1212 eng]#2 Audio[AC3 48000 Hz 2 channels 192 kbps idx=2 id=1213 spa]]
Fri 3/9 22:03:40.800 [LibraryImporter@1fa5d7] File Format Parsed-2b \\mythtv1\tv\7777_20120309175500.mpg=MPEG2-TS 0:39:56 5491 kbps [#0 Video[MPEG2-Video 29.97003 fps 1920x1080 16:9 interlaced id=1211]#1 Audio[AC3 48000 Hz 6 channels 448 kbps MAIN idx=1 id=1212 eng]#2 Audio[AC3 48000 Hz 2 channels 192 kbps idx=2 id=1213 spa]{Stereo=True, MediaType=TV, Title=Star Wars: The Clone Wars, EpisodeName=Brothers, Description=Savage Oppress searches for his missing kin, Darth Maul who
 is now a shadow of his former self., ExternalID=EP010873610101}]
Fri 3/9 22:03:40.868 [LibraryImporter@1fa5d7] Added:MediaFile[id=3513170 A[3513171,3425065,"Star Wars: The Clone Wars",0@0309.17:55,39] mask=TV host=sagetv1 encodedBy= format=MPEG2-TS 0:39:56 5491 kbps [#0 Video[MPEG2-Video 29.97003 fps 1920x1080 16:9 interlaced id=1211]#1 Audio[AC3 48000 Hz 6 channels 448 kbps MAIN idx=1 id=1212 eng]#2 Audio[AC3 48000 Hz 2 channels 192 kbps idx=2 id=1213 pa]{MediaType=TV}] \\mythtv1\tv\7777_20120309175500.mpg, Seg0[Fri 3/9 17:55:04.306-Fri3/9 18:35:01.000]] num=1813
Fri 3/9 22:03:41.370 [LibraryImporter@1fa5d7] Seeker is starting the library import scan...
Reply With Quote
  #2  
Old 03-10-2012, 05:25 AM
gplasky's Avatar
gplasky gplasky is offline
SageTVaholic
 
Join Date: Jul 2003
Location: Plymouth, MI
Posts: 9,168
Is it wiping out the original airing date because you know are generating or overwriting the .properties file with one that doesn't contain that airing date? All BMT is going to do is update the metadata with what you're providing I believe. If you have are generating a .properties file from Myth have it generate all the data. If you could have Myth create a more accurate file name then you could just let Sage/BMT get the metadata.

Gerry
__________________
Big Gerr
_______
Server - WHS 2011: Sage 7.1.9 - 1 x HD Prime and 2 x HDHomeRun - Intel Atom D525 1.6 GHz, Acer Easystore, RAM 4 GB, 4 x 2TB hotswap drives, 1 x 2TB USB ext Clients: 2 x PC Clients, 1 x HD300, 2 x HD-200, 1 x HD-100 DEV Client: Win 7 Ultimate 64 bit - AMD 64 x2 6000+, Gigabyte GA-MA790GP-DS4H MB, RAM 4GB, HD OS:500GB, DATA:1 x 500GB, Pace RGN STB.
Reply With Quote
  #3  
Old 03-10-2012, 05:39 AM
stuckless's Avatar
stuckless stuckless is offline
SageTVaholic
 
Join Date: Oct 2007
Location: London, Ontario, Canada
Posts: 6,373
Maybe I'm missing something... but I'm not seeing original air date, season number or episode number in your original properties... so why do you think the importer is erasing them?
Reply With Quote
  #4  
Old 03-10-2012, 07:23 AM
mgpaulus mgpaulus is offline
Sage User
 
Join Date: Mar 2011
Location: Colorado Springs, CO
Posts: 49
Quote:
Originally Posted by stuckless View Post
Maybe I'm missing something... but I'm not seeing original air date, season number or episode number in your original properties... so why do you think the importer is erasing them?
Perhaps I wasn't completely clear.

I am having Sage and Myth record the same show. So, yes, I have two instances of the show in Sage. One in SD (mythtv) and one in HD (sage). Eventually I will bring it all down to one, but for now I am working on things, and I get 2 recordings. So, when Sage sets up to record the show, I see that it has the Original Airing Date and Season/Episode information. But, once it also imports the 2nd copy info from mythtv, That's when I see that the metadata is wiped out.

My intention with the properties file was to give just enough info to allow BMT to find and fix all the metadata. Are you saying that I am giving too much data, or not enough? I believe that mythtv does not have the season/episode data so I can't pull it out. However, I will verify that when I have a bit more time to explore the mythtv schema.
Reply With Quote
  #5  
Old 03-10-2012, 07:39 AM
stuckless's Avatar
stuckless stuckless is offline
SageTVaholic
 
Join Date: Oct 2007
Location: London, Ontario, Canada
Posts: 6,373
If both the sagetv and the mythtv show use the same episodeid, EP010873610101, then one will clobber the other.
Reply With Quote
  #6  
Old 03-10-2012, 07:41 AM
stuckless's Avatar
stuckless stuckless is offline
SageTVaholic
 
Join Date: Oct 2007
Location: London, Ontario, Canada
Posts: 6,373
And... BMT won't actually do a lookup on a file if it has a .properties (that's by design). It does this so that if someone is using an alternate source for metadata (say,SMM), then BMT doesn't keep overwriting their data. BMT skips the lookup if the file has metadata.
Reply With Quote
  #7  
Old 03-10-2012, 06:28 PM
mgpaulus mgpaulus is offline
Sage User
 
Join Date: Mar 2011
Location: Colorado Springs, CO
Posts: 49
Quote:
Originally Posted by stuckless View Post
And... BMT won't actually do a lookup on a file if it has a .properties (that's by design). It does this so that if someone is using an alternate source for metadata (say,SMM), then BMT doesn't keep overwriting their data. BMT skips the lookup if the file has metadata.
So,

I either need to transform the filename into an acceptable filename for sagetv (not the 7777_2012030905200000.ts format) which will allow BMT to do it's magic, or I need to completely populate the .properties file so that BMT doesn't need to do any magic?

I think last time I tried to create a complete .properties file, there were several properties missing (I couldn't find the tags I needed to populate), but since I converted over to a groovy script to create the .properties file, it's pretty easy to try again.
Reply With Quote
  #8  
Old 03-11-2012, 07:27 AM
stuckless's Avatar
stuckless stuckless is offline
SageTVaholic
 
Join Date: Oct 2007
Location: London, Ontario, Canada
Posts: 6,373
Quote:
Originally Posted by mgpaulus View Post
So,

I either need to transform the filename into an acceptable filename for sagetv (not the 7777_2012030905200000.ts format) which will allow BMT to do it's magic, or I need to completely populate the .properties file so that BMT doesn't need to do any magic?

I think last time I tried to create a complete .properties file, there were several properties missing (I couldn't find the tags I needed to populate), but since I converted over to a groovy script to create the .properties file, it's pretty easy to try again.
Since you are doing this in groovy (ie java), you could easily pull in sagetv apis and do a number of things...
1. Manually populate the properties using the constants form this the FieldNames.

2. Do a metadata lookup and populate the properties from the lookup (ie, what BMT does). You can see how this is done in the PhoenixRenamer (look for processMediaFile), since it does a metadata lookup for the filename to be able to rename it. The requirement is that you build a SearchQuery object (which is like a Map) then call the Phoenix MetadataManager to have to do the search. If you get a result, then pull out the properties and save them to your. properties.
Reply With Quote
Reply


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

Advanced Search
Display Modes

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
change metadata not visible from Raw Metadata JonTom Batch Metadata Tools 2 08-30-2011 03:53 PM
DVD Metadata and art Netdawg SageTV v7 Customizations 1 08-21-2011 05:33 PM
Is there a way of doing Metadata WITHOUT BMT plnewton SageTV Customizations 12 08-17-2009 06:53 PM
Clean out old metadata created by My Movies before creating new metadata for SageTV? Texas-Hansen SageTV Customizations 0 02-12-2009 09:31 AM
What Sage files should I back up before wiping HDD? chughes SageTV Software 1 08-16-2008 09:42 AM


All times are GMT -6. The time now is 03:36 PM.


Powered by vBulletin® Version 3.7.6
Copyright ©2000 - 2013, Jelsoft Enterprises Ltd.
Copyright 2003-2005 SageTV, LLC. All rights reserved.