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
  #261  
Old 01-04-2009, 11:59 PM
S_M_E S_M_E is offline
Sage Fanatic
 
Join Date: Dec 2007
Posts: 908
Quote:
Originally Posted by stuckless View Post
backdropsOnly only works if there is existing metadata for a file. It uses the Title as the search and not the filename. --backdropsOnly was added because I already have metadata properties for all my movies, and I wanted to way to just update the backdrops without have to research for the movies. So, to clarify, --backdropsOnly does not use the filename, it uses the movie Title from an existing movie properties file.

where --backdropsOnly is passed, pretty much all other command line properties are ignored. So using --auto=false with --backdropsOnly doesn't work. Mainly because backdropsOnly is a simple non interactive process that fetches backdrops for movies if it can find an exact match title.
I had metadata for it but it didn't grab any image. I tried renaming the metadata and it just grabbed the metadata, still nothing more.

auto=false did work but it didn't grab an image:
java -jar MetadataTool.jar --recurse --prompt=true --auto=false --provider=themoviedb.com --backdropsOnly --setProperty=/imdb/forcedIMDBImageSize:1920 "\\Abit\videos\Movies\
Unleashed (2005).avi"
Batch MetaData Tools (1.12)


Search Results: Unleashed 2005
00 (*) - Danny the Dog [2005-05-13]
01 (-) - Ginger Snaps: Unleashed [2004-01-30]
02 (-) - Scooby Doo 2: Monsters Unleashed [2004-03-20]
LEGEND: ? Unknown; * Exact Match; - Partial Match; + Popular Match;

[q=quit, n=next (default), ##=use result ##, TITLE=Search TITLE]
> 00
Updated: Danny the Dog (Unleashed (2005).avi)


MetaData Stats...
Processed: 1; Updated: 1 (1 manual), Skipped: 0; Errors: 0.

Is the "backdrop" the same thing as the cover that the imdb provider grabs? I thought it was a different image.

Quote:
It should do that now already. Most of my movies have dates in the filename and I don't have an issue. Or maybe I'm not understanding the issue?
I tried it without the auto=false and it failed to find a match. I assumed it was picky about the filename because you said it was.

Quote:
This should prompt and it will only download a backdrops, if one exists in themoviedb.com database.

Perhaps you can paste some of your movie titles that you are having issues with, and the commandlines that you are using. I can then test them using the --offline switch.
java -jar MetadataTool.jar --recurse --prompt=true --provider=themoviedb.com --backdropsOnly --setProperty=/imdb/forcedIMDBImageSize:1920 \\Abit\videos\Movies\
(skipped everything grabbed no image)

java -jar MetadataTool.jar --recurse --update --prompt=true --provider=themoviedb.com --backdropsOnly --setProperty=/imdb/forcedIMDBImageSize:1920 \\Abit\videos\Movies\
(updated some of the metadata, some failed "IMDB getting URL:http://www.imdb.comhttp://www.imdb.com/title/tt0080339/combinedcombined", grabbed no image)

java -jar MetadataTool.jar --recurse --prompt=true --provider=themoviedb.com --backdropsOnly --setProperty=/imdb/forcedIMDBImageSize:1920 "\\Abit\videos\Movies\Unleashed (2005).avi"
(skipped file, grabbed no image)

java -jar MetadataTool.jar --recurse --prompt=true --provider=themoviedb.com --update --backdropsOnly --setProperty=/imdb/forcedIMDBImageSize:1920 "\\Abit\videos\Movies\Unleashed (2005).avi"
(failed with existing metadata, "Error: null" - updated without metadata, grabbed no image)

*shrug*

Last edited by S_M_E; 01-05-2009 at 12:06 AM.
Reply With Quote
  #262  
Old 01-05-2009, 12:07 AM
megamojo's Avatar
megamojo megamojo is offline
Sage Advanced User
 
Join Date: Apr 2006
Posts: 179
Quote:
Originally Posted by stuckless View Post
FYI... if I do another screen scraper, it will probably be for tv.com... I have alot of TV shows that need metadata
It's already been done, and quite well before tv.com changed their site and broke the scraping. Maybe you could work with roxy99 and fix the scraping? I very much miss having that plugin.
Reply With Quote
  #263  
Old 01-05-2009, 06:31 AM
stuckless's Avatar
stuckless stuckless is offline
SageTVaholic
 
Join Date: Oct 2007
Location: London, Ontario, Canada
Posts: 9,713
Quote:
It's already been done, and quite well before tv.com changed their site and broke the scraping. Maybe you could work with roxy99 and fix the scraping? I very much miss having that plugin.
Unfortunately, I'm part of a very small minority that doesn't use windows, so there's no real incentive for me to get this working But I'm sure the project owner will fix it soon it enough.
Reply With Quote
  #264  
Old 01-05-2009, 06:46 AM
stuckless's Avatar
stuckless stuckless is offline
SageTVaholic
 
Join Date: Oct 2007
Location: London, Ontario, Canada
Posts: 9,713
SME,

You don't appear to be running the latest, based on your output, you are running 1.12, which doesn't have support for backdrops/fanart.

Did you install over an older install? If so, check the libs directory of where you installed BMT and make sure that you do not have similar jars with different versions in there.
Reply With Quote
  #265  
Old 01-05-2009, 07:02 AM
mrdrbdt mrdrbdt is offline
Sage User
 
Join Date: Jul 2007
Posts: 59
Quote:
Originally Posted by stuckless View Post
--auto is back. You can set it to false, and it will prompt for every file.
Sweet!

Thanks!
Reply With Quote
  #266  
Old 01-05-2009, 09:01 AM
S_M_E S_M_E is offline
Sage Fanatic
 
Join Date: Dec 2007
Posts: 908
Quote:
Originally Posted by stuckless View Post
SME,

You don't appear to be running the latest, based on your output, you are running 1.12, which doesn't have support for backdrops/fanart.

Did you install over an older install? If so, check the libs directory of where you installed BMT and make sure that you do not have similar jars with different versions in there.

I did install over the older version and that does seem to be the issue. I'll delete the lib dir and start over.

Thanks...


EDIT:
It's working as I edit but it is skipping a lot of files.

Example:
Skipping Backdrop for: file:////Abit/videos/Movies/Terminator%20Collection/Terminator%202%20Judgment%20Day%20(1991).avi
Perhaps it doesn't like colons in the names? From the properties file: Terminator 2\: Judgment Day (1991)

Last edited by S_M_E; 01-05-2009 at 09:12 AM.
Reply With Quote
  #267  
Old 01-06-2009, 10:06 AM
stuckless's Avatar
stuckless stuckless is offline
SageTVaholic
 
Join Date: Oct 2007
Location: London, Ontario, Canada
Posts: 9,713
Quote:
Skipping Backdrop for: file:////Abit/videos/Movies/Terminator%20Collection/Terminator%202%20Judgment%20Day%20(1991).avi
Perhaps it doesn't like colons in the names? From the properties file: Terminator 2\: Judgment Day (1991)
The problem is that the search results comming back, is not marking terminator 2 as an exact match, so the tool won't select it.
Reply With Quote
  #268  
Old 01-06-2009, 10:23 AM
S_M_E S_M_E is offline
Sage Fanatic
 
Join Date: Dec 2007
Posts: 908
Quote:
Originally Posted by stuckless View Post
The problem is that the search results comming back, is not marking terminator 2 as an exact match, so the tool won't select it.
So nothing can be done, other than manually fetching the backdrop for every file that fails?
Reply With Quote
  #269  
Old 01-06-2009, 11:53 AM
stuckless's Avatar
stuckless stuckless is offline
SageTVaholic
 
Join Date: Oct 2007
Location: London, Ontario, Canada
Posts: 9,713
Quote:
So nothing can be done, other than manually fetching the backdrop for every file that fails?
Their's always something that can be done I'll put it on a list of things to look at when I get time. I may add a "tolerance" setting that may help in this case. Or I could add code that will manually check the titles and find a match that way.... Currently I'm involved in something else, so this won't be a quick change.
Reply With Quote
  #270  
Old 01-06-2009, 12:13 PM
S_M_E S_M_E is offline
Sage Fanatic
 
Join Date: Dec 2007
Posts: 908
No rush, just checking what the options were...
Reply With Quote
  #271  
Old 01-06-2009, 02:41 PM
babgvant babgvant is offline
Sage Icon
 
Join Date: Jul 2008
Location: London
Posts: 1,834
I installed an earlier version of the MetadataUpdaterPlugin (mediafile_metadata_parser_plugins=org.jdna.sage.MetadataUpdaterPlugin) in sage and it was working, but after pulling down the latest and importing a video file it didn't seem to do anything (the metadata for the file did not get written).

What can I do to try to debug it (I didn't see anything in the sage log)?
__________________
babgvant.com | @babgvant | Missing Remote
Reply With Quote
  #272  
Old 01-06-2009, 04:16 PM
S_M_E S_M_E is offline
Sage Fanatic
 
Join Date: Dec 2007
Posts: 908
Here's another example of how imdb and themoviedb both get it wrong:

"Kung Fu Hustle" is the name of the movie in the US but imdb calls it "Kung fu"
http://www.imdb.com/title/tt0373074/
but themoviedb pulls down backdrop art for "Kung fu Panda"

Once I get these straightened out I'll try making them read-only, hopefully that will prevent overwriting them if I ever do an --update.
Reply With Quote
  #273  
Old 01-06-2009, 05:47 PM
stuckless's Avatar
stuckless stuckless is offline
SageTVaholic
 
Join Date: Oct 2007
Location: London, Ontario, Canada
Posts: 9,713
Quote:
Once I get these straightened out I'll try making them read-only, hopefully that will prevent overwriting them if I ever do an --update.
Actually, backdrops and posters (thumbnails) should never be overwritten unless --forceThumbnail or --forceBackdrop is passed.
Reply With Quote
  #274  
Old 01-06-2009, 05:51 PM
stuckless's Avatar
stuckless stuckless is offline
SageTVaholic
 
Join Date: Oct 2007
Location: London, Ontario, Canada
Posts: 9,713
First, check the JARs directory and make sure that there isn't 2 metadata-updater-nnn.jar files. If there are, then remove the one with the loweset #.

Next, I think, based on your jetty stuff you sent me earlier, that Jetty redirecting the log to you JETTY_HOME/logs/yyyy_mm_dd.stderrout.log. Check in there for any messages.


Quote:
Originally Posted by babgvant View Post
I installed an earlier version of the MetadataUpdaterPlugin (mediafile_metadata_parser_plugins=org.jdna.sage.MetadataUpdaterPlugin) in sage and it was working, but after pulling down the latest and importing a video file it didn't seem to do anything (the metadata for the file did not get written).

What can I do to try to debug it (I didn't see anything in the sage log)?
Reply With Quote
  #275  
Old 01-06-2009, 09:35 PM
mp328 mp328 is offline
Sage Advanced User
 
Join Date: Dec 2006
Posts: 122
im having a problem after updating to the new version myself, i did do like u said, copy the new files over and delete the 1.13 file that was in there from before and it wont work anymore

i see the note of "unknown source" but not sure what it all means...

and the line with the plugin is still in the properties file, like i said it worked perfectly fine with 1.13 and after moving the new jars over and deleting that one old file it stopped working now and i love this import
Attached Files
File Type: txt mailcheck.txt (9.1 KB, 270 views)
Reply With Quote
  #276  
Old 01-06-2009, 09:39 PM
S_M_E S_M_E is offline
Sage Fanatic
 
Join Date: Dec 2007
Posts: 908
Quote:
Originally Posted by stuckless View Post
Actually, backdrops and posters (thumbnails) should never be overwritten unless --forceThumbnail or --forceBackdrop is passed.
The .properties on some files sometimes get the wrong data and has to be edited, if --updated, too. Once I get everything the way I want it, for existing files, I still want to try to lock it down. Hopefully setting RO will do that. That way I'll only have to worry about new files added.
Reply With Quote
  #277  
Old 01-06-2009, 11:05 PM
babgvant babgvant is offline
Sage Icon
 
Join Date: Jul 2008
Location: London
Posts: 1,834
Quote:
Originally Posted by stuckless View Post
First, check the JARs directory and make sure that there isn't 2 metadata-updater-nnn.jar files. If there are, then remove the one with the loweset #.

Next, I think, based on your jetty stuff you sent me earlier, that Jetty redirecting the log to you JETTY_HOME/logs/yyyy_mm_dd.stderrout.log. Check in there for any messages.

removing the previous version got it running again (I see entries in the sage log), but meta data isn't getting pulled down.

Tue 1/6 22:47:35.438 [LibraryImporter@1c6407f] BatchMetadataTools; Handling File: \\server\dvd\Lock, Stock and Two Smoking Barrels\VIDEO_TS; arg:
Tue 1/6 22:47:35.488 [LibraryImporter@1c6407f] Could not automatically update: file:////server/dvd/Lock,%20Stock%20and%20Two%20Smoking%20Barrels/VIDEO_TS/

I found this reply earlier in the discussion and there aren't any exceptions could it be an issue with the logic that tries to putt the movie title from the path (is that what /media/stackingModelRegex= is)?
__________________
babgvant.com | @babgvant | Missing Remote
Reply With Quote
  #278  
Old 01-07-2009, 06:44 AM
stuckless's Avatar
stuckless stuckless is offline
SageTVaholic
 
Join Date: Oct 2007
Location: London, Ontario, Canada
Posts: 9,713
babgvant, there may be a bug in how the plugin works with DVDs. I'll have to check into it further.

As for stackingModeRegex, it's the regular expression that is used to calculate a movie stack. It's mainly used to group multi cd movies (movie-cd1, movie-cd2) as a single entry.
Reply With Quote
  #279  
Old 01-07-2009, 09:12 AM
babgvant babgvant is offline
Sage Icon
 
Join Date: Jul 2008
Location: London
Posts: 1,834
Quote:
Originally Posted by stuckless View Post
babgvant, there may be a bug in how the plugin works with DVDs. I'll have to check into it further.

As for stackingModeRegex, it's the regular expression that is used to calculate a movie stack. It's mainly used to group multi cd movies (movie-cd1, movie-cd2) as a single entry.
Thanks.

Quote:
Originally Posted by stuckless View Post

Backdrops are stored in the same directory are the movie, thumbnail, and properties. I do not have suppprt, nor will I add it, for the option to store fanart in a separate location. Since this tool runs outside of Sage, I have no idea how I would support storing metadata to another location.
Could you add a property that points to the base folder for an alternate location. Subfolders (Movies/TV/Music) will be static in the next release of SageMC, so they can be derived (I wrote an external fanart dl tool that works like this).

If you don't have time I could take a look at adding the feature to the tool if you're open to it.
__________________
babgvant.com | @babgvant | Missing Remote
Reply With Quote
  #280  
Old 01-07-2009, 09:57 AM
stuckless's Avatar
stuckless stuckless is offline
SageTVaholic
 
Join Date: Oct 2007
Location: London, Ontario, Canada
Posts: 9,713
Quote:
If you don't have time I could take a look at adding the feature to the tool if you're open to it.
The source is open, so you are free to with it as you please. You can do it and submit it back to me as a patch if you want.

If you are going to do it.... Here's the basics of what you need to know....
  • BMT uses a virtual filesystem that is URI based
  • IMediaResource is an interface and it contains getLocalBackdropUrl()
  • You would need to update getLocalBackdropUrl() in MediaFile and DVDMediaFile
  • SageVideoMetadataPersistence is what is used to write out the image files. The only thing to change here is that you'll want to ensure that the directory structure is actually created before you write the image file.

Now for the hard part. in getLocalBackdropUrl() you'll need to somehow determine what all of the sage video paths are, and then determine what the final destination directory/filename should be. In brent's blog, he made reference to the fact that some special characters need to be stripped out, when calculating the destination filename.

Good luck.
Reply With Quote
Reply


Currently Active Users Viewing This Thread: 3 (0 members and 3 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
STV Import: Read & Write Metadata files for Default STV 5/6 (v2.2.9 18/Feb./2010) JREkiwi SageTV Customizations 251 10-09-2019 11:11 AM
Automated VideoRedo (DOS batch files) grauchy SageTV Customizations 3 09-08-2011 10:01 PM
Simple utility to control multiple USB or Serial HD DirecTV STBs jchiso Hardware Support 15 02-19-2009 06:27 PM
DVB-S setup with Digiguide EPG Grabber & XMLTV importer MCE-Refugee SageTV United Kingdom 27 09-08-2008 09:10 AM
Keeping custom metadata for imports via AddShow() Opus4 SageTV Studio 9 02-20-2008 06:35 PM


All times are GMT -6. The time now is 09:58 AM.


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