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 06-27-2010, 04:21 PM
tmiranda's Avatar
tmiranda tmiranda is offline
SageTVaholic
 
Join Date: Jul 2005
Location: Central Florida, USA
Posts: 5,851
Quote:
Originally Posted by Fuzzy View Post
How trivial? I've looked through the Sage7 API's, and nothing stood out that made it any easier. There's the MoveTVFileOutOfLibrary API call, but that won't work on imported media. Is there something else that has to be done to 'trick' sage into making the show a TV file? If so, any pointers? I know this is possible, as it works in both the web interface, and older BMT versions.

I realize your reluctance to doing this in BMT, and that's fine, I'll work something out, but it seems you've at least got some idea of the tasks that need to be performed.
Fuzzy,

I believe you need to:

1. AddMediaFile() This makes the MediaFile into an Object that Sage can understand.

2. AddAiring() This creates all of the airing information.

3. AddAiringDetailed() This connects the MediaFile to the Airing.

If the MediaFile is already imported into the sage database as an "imported video" I think you need to remove it first. There is a really good post by neilm that explains it all, search for "AddMediaFile" in the Studio forums.

Tom
__________________

Sage Server: 8th gen Intel based system w/32GB RAM running Ubuntu Linux, HDHomeRun Prime with cable card for recording. Runs headless. Accessed via RD when necessary. Four HD-300 Extenders.
Reply With Quote
  #22  
Old 06-27-2010, 04:31 PM
Fuzzy's Avatar
Fuzzy Fuzzy is offline
SageTVaholic
 
Join Date: Sep 2005
Location: Jurupa Valley, CA
Posts: 9,957
Yeah, I'm aware of that method of removing the old stuff, and making a new Show/Airing/MediaFile set... I thought Slugger was implying that there was a newer, simpler 'trivial' method to move imports to recordings in v7, and I was unable to find anything new.
__________________
Buy Fuzzy a beer! (Fuzzy likes beer)

unRAID Server: i7-6700, 32GB RAM, Dual 128GB SSD cache and 13TB pool, with SageTVv9, openDCT, Logitech Media Server and Plex Media Server each in Dockers.
Sources: HRHR Prime with Charter CableCard. HDHR-US for OTA.
Primary Client: HD-300 through XBoxOne in Living Room, Samsung HLT-6189S
Other Clients: Mi Box in Master Bedroom, HD-200 in kids room
Reply With Quote
  #23  
Old 06-27-2010, 05:12 PM
stuckless's Avatar
stuckless stuckless is offline
SageTVaholic
 
Join Date: Oct 2007
Location: London, Ontario, Canada
Posts: 9,713
Quote:
Originally Posted by Fuzzy View Post
Yeah, I'm aware of that method of removing the old stuff, and making a new Show/Airing/MediaFile set... I thought Slugger was implying that there was a newer, simpler 'trivial' method to move imports to recordings in v7, and I was unable to find anything new.
In Sage7, can you call, SetMediaFileMetadata(mediaFile, "ExternalID", newId) where newId is an ID that starts with SH, or EP.

for example a typical mediafile will have a MF##### id, so if you create a new id that starts wtih EP####, and then call SetMediaFileMetadata on the mediafile, with that new id, then it will be a "recording"

Unfortunately, there is no easy way to change it back. ie, if you decide that you no longer want a video in the recordings area, then changing the external id has no effect. You need to remove the video, and then re-add it.

I'll add support for chaning the external id in the new build of bmt web ui.
Reply With Quote
  #24  
Old 06-27-2010, 05:22 PM
Fuzzy's Avatar
Fuzzy Fuzzy is offline
SageTVaholic
 
Join Date: Sep 2005
Location: Jurupa Valley, CA
Posts: 9,957
Quote:
Originally Posted by stuckless View Post
In Sage7, can you call, SetMediaFileMetadata(mediaFile, "ExternalID", newId) where newId is an ID that starts with SH, or EP.

for example a typical mediafile will have a MF##### id, so if you create a new id that starts wtih EP####, and then call SetMediaFileMetadata on the mediafile, with that new id, then it will be a "recording"

Unfortunately, there is no easy way to change it back. ie, if you decide that you no longer want a video in the recordings area, then changing the external id has no effect. You need to remove the video, and then re-add it.

I'll add support for chaning the external id in the new build of bmt web ui.
Ahh.. yeah, that IS a lot easier.. I had figured all that would need to be changed would be the ExternalID, but didn't realize the SetMediaFileMetadata call was capable of changing that.
__________________
Buy Fuzzy a beer! (Fuzzy likes beer)

unRAID Server: i7-6700, 32GB RAM, Dual 128GB SSD cache and 13TB pool, with SageTVv9, openDCT, Logitech Media Server and Plex Media Server each in Dockers.
Sources: HRHR Prime with Charter CableCard. HDHR-US for OTA.
Primary Client: HD-300 through XBoxOne in Living Room, Samsung HLT-6189S
Other Clients: Mi Box in Master Bedroom, HD-200 in kids room
Reply With Quote
  #25  
Old 06-27-2010, 05:44 PM
stuckless's Avatar
stuckless stuckless is offline
SageTVaholic
 
Join Date: Oct 2007
Location: London, Ontario, Canada
Posts: 9,713
Quote:
Originally Posted by Fuzzy View Post
Ahh.. yeah, that IS a lot easier.. I had figured all that would need to be changed would be the ExternalID, but didn't realize the SetMediaFileMetadata call was capable of changing that.
That's new in Sage7. In bmt 4.1+, it uses SetMediaFileMetadata to set all of the metadata. No more property files, and touching the mediafiles hack... or calling AddAiring/AddShow, etc. It's a lot easier
Reply With Quote
  #26  
Old 06-27-2010, 06:19 PM
stuckless's Avatar
stuckless stuckless is offline
SageTVaholic
 
Join Date: Oct 2007
Location: London, Ontario, Canada
Posts: 9,713
Quote:
Originally Posted by damian.flynn View Post
I have been using metabrowser to tag my tv and movies for the last few years, and they are now launching a new version, which currently has no TV and no support for the sage .properties files or the new API to embed the tags.

So - its time to dump this tool and move over to the new generation. I have all my media on a large multi TB disk array (single Drive/UNC).

The format i have been using is along the lines:

For TV
\Video\TV\Series Name\Season 0X\Series Name - S0X-E0X - Title.MKV

For Movies
\Video\Movies\Movie Name (Year)\Random File Name.MKV

All the new media is dropped in
\Drop box

Here the file name could be the name of the Movie, or the TV Series with Season/Episode information, and the utility then Moved the file to the correct destination. I have .properties files, episode image, banners and fanart currently, but dont mind deleting it all.

So - my question - as a DUMMY to BMT, is there a start guide.
I have not even installed the tool yet, so high level is fine, and Ill do a full document and post it for everyone else that decides to adopt this engine.

cheers
Damian
Damian, there have been a number of people that have written quick start / user guides for bmt over the last couple of years. Unfortunately, things change so fast, that the documents written a year ago are no longer current enough to be useful. I'd certainly appreciate any help in the documentation department.

If you are using Sage7, then Sage7 introduced a new Plugin system that makes it much easier to install 3rd party addons. If you do have Sage7 installed and you want to take a look at bmt, you can install the Metadata Tools Web UI plugin, which will install all the other dependenices. Once it's installed, you can access the MetadataTools web ui, using http://yourserver:8080/bmt/. Unfortunately, I haven't even updated the wiki for 4.1 and Sage7

As for your mediafiles, the TV files should parse/update fine, but the movie format, where the title is the directory, is not directly supported. But, bmt uses a "scraper" system where new formats can be added, provided someone wants to take the time to create a Regex/Xml scraper file. I can try help if needed.
Reply With Quote
  #27  
Old 06-28-2010, 03:15 AM
damian.flynn damian.flynn is offline
Sage Advanced User
 
Join Date: Nov 2007
Posts: 82
Ok, - I have Sage7 up and running, so ill move all my tv series to a folder which is not 'seen' by sage, just leaving the empty top levels in place.

Ill add the 4.2 build and start from there.

Ill begin with TV series - if i drop a pile of these in one drop folder - eg the top level folder, or a folder not directly added to sage will bmt moe these into there correct homes?

Are there some flags, settings, properties i should be working with as a default. consider this a green field.
__________________
Blog: www.damianflynn.com

SageTV: v7.20 RC on Dell PE860, 8Gb RAM, Win7 x64; Recordings: 2Tb SATA. Collection: 12Tb DAS
DVB Logic - DVBLink 3.1 Tuners sourcing 2 x TBS 6980 Dual DVB-S2 (Astra 28, Astra 19, Hotbird, Thor) serving Clients 3 x HD300, 2 x HD200, 1 x HD100
Reply With Quote
  #28  
Old 06-28-2010, 03:48 AM
davidk21770 davidk21770 is offline
Sage Expert
 
Join Date: Mar 2006
Location: Maryland
Posts: 514
Request -- allow overriding of preserve metadata on the Web UI page with the show info. Right now, I believe that I have to go to configuration, change the setting, reload the show, edit the info and save, then go back and re-enable preserve metadata. This would be much easier if there was a checkbox on the show's page that allowed a one-time override of the setting.
__________________
HDHomeRun x2
Cable Box via Hauppauge HD PVR and USB-UIRT
2 SageTV's HD300

Intel Core 2 Quad Q9650 @4025 MHz, 8G G.Skill Performance
DFI Lanparty DK X48-T2RS Plus; SilverStone Decathlon DA1000 (died - back to an ancient enermax)
eVGA 7900 GT KO RoHS -- Zalman VP900CU Cooling
Synology NAS 22TB
Reply With Quote
  #29  
Old 06-28-2010, 04:44 AM
damian.flynn damian.flynn is offline
Sage Advanced User
 
Join Date: Nov 2007
Posts: 82
Ok,

So i started, but there is a lot of questions now
This is the WIP - http://diginerve.blogspot.com/2010/0...-sagetv-7.html

1) Apparently I MUST have the file name formated correctly - is there any support for file renaming, after the parser figures the file name is partially correct, so to reformat the name correctly?

2) I dont see an ability for the tool to 'Move' the file to the correct folder, If i dump all the files in the same folder, eg a drop box, it would be pretty neat to have the parser fix the file name up and move it to the correctly formated folder name

3) I though .properties files are gone, or not needed - why are they been created. Can these be marked as Hidden on the file system if they are needed?

4) An error is generated in the system message to say 'Failed to get metadata' but it does not mention the file it was working on.

5) there is no progress indicator to show the stats of the process. all we get is a title message 'Sage it looking for new media'

6) the layout of the views is all messed up, many movies have no art showing, some have the art streched over the width of the page etc. refreshing the window just sends us back to the defalt view of the page, and returning to the view (eg videos) still has the same rendering issues (note the art is in the pheonix folder when manually checked)
__________________
Blog: www.damianflynn.com

SageTV: v7.20 RC on Dell PE860, 8Gb RAM, Win7 x64; Recordings: 2Tb SATA. Collection: 12Tb DAS
DVB Logic - DVBLink 3.1 Tuners sourcing 2 x TBS 6980 Dual DVB-S2 (Astra 28, Astra 19, Hotbird, Thor) serving Clients 3 x HD300, 2 x HD200, 1 x HD100

Last edited by damian.flynn; 06-28-2010 at 05:20 AM.
Reply With Quote
  #30  
Old 06-28-2010, 11:28 AM
stuckless's Avatar
stuckless stuckless is offline
SageTVaholic
 
Join Date: Oct 2007
Location: London, Ontario, Canada
Posts: 9,713
Quote:
Originally Posted by damian.flynn View Post
Ok,

So i started, but there is a lot of questions now
This is the WIP - http://diginerve.blogspot.com/2010/0...-sagetv-7.html

1) Apparently I MUST have the file name formated correctly - is there any support for file renaming, after the parser figures the file name is partially correct, so to reformat the name correctly?
BMT doesn't require that you have a rigid format... but you will get better results, with the more information that you have in your filenames.

For example, bmt can lookup shows like House-EpisodeTitle.avi, but you'll get better results if you use House-S##E##.avi, since looking up based on season and episode is more reliable. Also, if your filenames are like, "LieToMe" instead of "Lie to Me", then the latter will probably yield a better hit, since it's a cleaner title.

For movies, the same is true. FindingNemo.avi might get a result, but "Finding Nemo.avi" will work for sure. Also, if you include the year in the title, then you will increase the odds of getting a better hit. For example, "King Kong (1933).avi" will provide a better hit than just "King Kong.avi". But you can have other words in your title that will get ignored, for example, "King Kong (1933) DVDRip.avi" will work as well, since I strip out certain keywords, like DVDRip.

Quote:
2) I dont see an ability for the tool to 'Move' the file to the correct folder, If i dump all the files in the same folder, eg a drop box, it would be pretty neat to have the parser fix the file name up and move it to the correctly formated folder name
That is correct. bmt is not a mover/renamer tool. It could certainly do that, but it's not my radar. (too many other things)

Quote:
3) I though .properties files are gone, or not needed - why are they been created. Can these be marked as Hidden on the file system if they are needed?
SageTV will create .properties if you have the property, update_external_properties_files_on_metadata_changes, set to true. This can configured via the webui, Configure -> SageTV -> Metadata Settings -> Update .properties when changed setting.

Quote:
4) An error is generated in the system message to say 'Failed to get metadata' but it does not mention the file it was working on.
That sounds like a 4.0 message. In 4.1+ it should be an info message, and the body of the message should dumpt the query that was being performed.

Quote:
5) there is no progress indicator to show the stats of the process. all we get is a title message 'Sage it looking for new media'
When you refresh sagetv media, it simply sends a message to sagetv to tell it to look for new items. That's a SageTV function, and there isn't any progress indication, other than a true/fase that a refresh is in progress.

Quote:
6) the layout of the views is all messed up, many movies have no art showing, some have the art streched over the width of the page etc. refreshing the window just sends us back to the defalt view of the page, and returning to the view (eg videos) still has the same rendering issues (note the art is in the pheonix folder when manually checked)
I guess i'd need to see a picture of what "messed up" looks like. It could be that it's entirely correct. ie, each item does not have a fixed size. It uses a fluid layout, and each item in the view takes as much space as it needs.

The browser history is still being worked on. Since bmt is a javascript application handling refreshing/back button requires a programming effort. It's on my long list of items to work out in the web ui, but to be honest, dont' expect too much more on that front... too many projects, not enough time
Reply With Quote
  #31  
Old 06-28-2010, 01:41 PM
davidk21770 davidk21770 is offline
Sage Expert
 
Join Date: Mar 2006
Location: Maryland
Posts: 514
How do I enable the checkbox to make it a sage recording? This is greyed-out.
__________________
HDHomeRun x2
Cable Box via Hauppauge HD PVR and USB-UIRT
2 SageTV's HD300

Intel Core 2 Quad Q9650 @4025 MHz, 8G G.Skill Performance
DFI Lanparty DK X48-T2RS Plus; SilverStone Decathlon DA1000 (died - back to an ancient enermax)
eVGA 7900 GT KO RoHS -- Zalman VP900CU Cooling
Synology NAS 22TB
Reply With Quote
  #32  
Old 06-28-2010, 01:53 PM
stuckless's Avatar
stuckless stuckless is offline
SageTVaholic
 
Join Date: Oct 2007
Location: London, Ontario, Canada
Posts: 9,713
Quote:
Originally Posted by davidk21770 View Post
How do I enable the checkbox to make it a sage recording? This is greyed-out.
It's greyed out, because in this release, you can't actually use that to import a show as a recording. You can however, edit the External ID field and change the the first 2 letters to EP, and that will change the show to a recording.

Keep in mind that 4.1 required a lot of core changes to make it better fit with sagetv7, and so not all features have made it back into the UI or the Core. I'll add features over time, especially, if enough people request it.
Reply With Quote
  #33  
Old 06-28-2010, 02:06 PM
davidk21770 davidk21770 is offline
Sage Expert
 
Join Date: Mar 2006
Location: Maryland
Posts: 514
Quote:
Originally Posted by stuckless View Post
It's greyed out, because in this release, you can't actually use that to import a show as a recording. You can however, edit the External ID field and change the the first 2 letters to EP, and that will change the show to a recording.

Keep in mind that 4.1 required a lot of core changes to make it better fit with sagetv7, and so not all features have made it back into the UI or the Core. I'll add features over time, especially, if enough people request it.
Thanks. I can work with that. I need to be able to get all of our shows accessible from the same screen for my wife.
__________________
HDHomeRun x2
Cable Box via Hauppauge HD PVR and USB-UIRT
2 SageTV's HD300

Intel Core 2 Quad Q9650 @4025 MHz, 8G G.Skill Performance
DFI Lanparty DK X48-T2RS Plus; SilverStone Decathlon DA1000 (died - back to an ancient enermax)
eVGA 7900 GT KO RoHS -- Zalman VP900CU Cooling
Synology NAS 22TB
Reply With Quote
  #34  
Old 10-16-2010, 06:46 PM
tmiranda's Avatar
tmiranda tmiranda is offline
SageTVaholic
 
Join Date: Jul 2005
Location: Central Florida, USA
Posts: 5,851
Quote:
Originally Posted by stuckless View Post
That's new in Sage7. In bmt 4.1+, it uses SetMediaFileMetadata to set all of the metadata. No more property files, and touching the mediafiles hack... or calling AddAiring/AddShow, etc. It's a lot easier
I just tried this little gem and it works really well. Thanks Sean for pointing it out.
__________________

Sage Server: 8th gen Intel based system w/32GB RAM running Ubuntu Linux, HDHomeRun Prime with cable card for recording. Runs headless. Accessed via RD when necessary. Four HD-300 Extenders.
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
BMT: Read this if you don't see any BMT topics Opus4 SageTV Customizations 0 04-25-2010 09:17 PM
BMT question Hunter69 Batch Metadata Tools 13 03-27-2010 10:37 PM
Is there a way of doing Metadata WITHOUT BMT plnewton SageTV Customizations 12 08-17-2009 06:53 PM
Upgrading to v6, how to read showanalyzer files? OttoNP SageTV Customizations 8 11-18-2006 04:41 PM
forum posts not marked read when read? xlr8shun The SageTV Community 2 05-04-2004 01:49 AM


All times are GMT -6. The time now is 07:20 PM.


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