SageTV Community  

Go Back   SageTV Community > SageTV Development and Customizations > SageTV Customizations

Notices

SageTV Customizations This forums is for discussing and sharing user-created modifications for the SageTV application created by using the SageTV Studio or through the use of external plugins. Use this forum to discuss customizations for SageTV version 6 and earlier, or for the SageTV3 UI.

Reply
 
Thread Tools Search this Thread Display Modes
  #1  
Old 01-04-2009, 11:16 PM
evilpenguin's Avatar
evilpenguin evilpenguin is offline
SageTVaholic
 
Join Date: Aug 2003
Location: Seattle, WA
Posts: 3,696
Arrow Utility: mediaScraper - metadata made easy!

Release History:
What it is:
mediaScrapper is my answer XBMC's excellent, but very confusing, scraping engine and you can use it to track down all the metadata and fanart for any TV/Movies you may have ripped/bought/downloaded/whatever.

Usage Instructions: See 2nd post

How to use metadata files:

* To make SageMC use the .my files, go into SageMC Properties -> Enhancments -> Use .my Files -> Enabled.
* To make the default STV use .properties files, read this thread.


Submitting Issues:

If you have any issue I'll need to see the EXACT PATH/FILE name that is giving you trouble and/or (preferably) the scraper.log file that gets generated next to the .exe after every run.

Example Outputs:

.properties file for default STV:
Code:
MediaType=TV
Title=Wonderfalls 1x05 - Crime Dog
MediaTitle=Wonderfalls
Actor=Caroline Dhavernas;Tracie Thoms;Tyron Leitso;Diana Scarwid;Lee Pace;Katie Finneran;William Sadler;
ActorRoles=Jaye Tyler;Mahandra;Eric;Karen Tyler;Aaron Tyler;Sharon Tyler;Darrin Tyler;
Guest=Audrey Wasilewski;Bill Lake;Kimberly Scott;
Director=Allan Kroeker;
Writer=Krista Vernoff;
Genres=Drama;
Description=When Jaye's brother sees her talking to inanimate objects, he begins to question her state of mind; the animals help Jaye reunite her family with the housekeeper.
Rated=
UserRating=6.0
ReleaseDate=2004-07-23
MediaProviderDataID=theTVDB:78845
SeasonNumber=1
EpisodeNumber=5
EpisodeTitle=Crime Dog
.my file for SageMC:
Code:
Title=Burn Notice
overview=A spy, Michael Weston, receives a burn notice for an unstated reason, effectively firing him. He has spent the previous decade working for the government in Eastern Europe and returns to his hometown of Miami to get his life in order. Michael will stop at nothing to find out why. Shut out from his normal contacts, but still driven to right wrongs, Michael needs to stay under the radar in order to stay in the game.
TVOriginalAiringDate=2007-07-26
actors=Jeffrey Donovan, Gabrielle Anwar, Bruce Campbell, Paul Gutrecht, Guri Weinberg, Audrey Landers, Scott Michael Campbell, Joel Swetow, Hannia Guillen, Jessica Baldwin, Rangel Hernandez Martinez,
TVEpisode=Family Business
TVOverview=Michael infiltrates a family of gunrunners who are pressuring an airport supervisor and his pregnant wife. The FBI begin to put pressure on Sam to gather more information on Michael.
TVDuration=60 minutes
TVGenre=Action and Adventure
TVChannelName=USA
List of Non-Working names that I know about and intend to Fix:

Last edited by evilpenguin; 04-09-2009 at 01:49 AM.
Reply With Quote
  #2  
Old 01-04-2009, 11:16 PM
evilpenguin's Avatar
evilpenguin evilpenguin is offline
SageTVaholic
 
Join Date: Aug 2003
Location: Seattle, WA
Posts: 3,696
Supported Naming Conventions:
MediaScaper works by looking at your file names and attempting to pull out all of the information it needs to track down the metadata. Chances are if mediaScraper can't find the metadata for your video then the file name is too confusion for it to figure out. Below are the supported naming conventions that will work

Television: Requires Show Title and Season/Episode Number
Code:
Show Title (S##E##|#x##|###) randomJunk.avi
BaseFolder\Show Title\(S##E##|#x##|###) randomJunk.avi
BaseFolder\Show Title\Season #\(S##E##|#x##|###) randomJunk.avi
Movies: Requires Movie Title
Code:
Movie Title.avi
Movie Title (YEAR).avi
Movie Title (YEAR).randomJunk.avi

NOTE: This will not work on shows in Sage Recording format (ShowTitle-EpisodeName-#####-#.mpg)!!!



Basic Usage:

For general usage all you need to do is drag and drop videos and/or folders containing videos onto mediaScraper.exe and, by default, it will download the metadata and fanart and place them right next to the original videos.

TV:
Code:
TV\Scrubs\Scrubs 2x01 - My Overkill.avi
TV\Scrubs\Scrubs 2x01 - My Overkill.avi.properties (metadata)
TV\Scrubs\background.jpg (Fanart)
TV\Scrubs\folder.jpg (Thumbnail/Poster)
TV\Scrubs\banner.jpg (Banner)
Movies:
Code:
Movies\300.avi
Movies\300.avi.properties (metadata)
Movies\300_background.jpg (Fanart)
Movies\300.jpg (Thumbnail/Poster)
Movies (VIDEO_TS Folder):
Code:
Movies\300\VIDEO_TS
Movies\300.properties (metadata)
Movies\300\background.jpg (Fanart)
Movies\300\folder.jpg  (Thumbnail/Poster)

folder.override:

There will be times when mediaScraper just won't be able to find a match for your file. Common problems include
  • Actual show name contains illegal window characters. ex: Terminator: The Sarah Conner Chronicles.
  • Name conflicts with other TV shows. ex: The Office (US) vs. The Office (UK) or Battlestar Gallactica (2003) vs. Battlestar Gallactica.
In these cases, rather than going through and renaming every file to get it to match you can create a folder.override file next to the original video(s) that is just a text file that contains the exact show title that theTVDB or IMDB is expecting for every show in that folder.

Example:
Lets say that you try and run this file through mediaScraper:
Code:
TV\Terminator The Sarah Connor Chronicles\Terminator The Sarah Connor Chronicles 1x01.avi
It would decide that its a TV show with...
Code:
Show Title = Terminator The Sarah Connor Chronicles
Season = 1
Episode = 1
Which looks all good, but when you search for it on theTVDB it returns 0 matches.

With a little manual investigating you'll find that theTVDB will only recognize the title if it contains the ':'.
Code:
Series Title = Terminator: The Sarah Conner Chronicles
However, you can't use a ':' in a Windows file name. This is where folder.override come in.

To fix this you'd create a folder.override in the folder with all the episodes.
Code:
TV\Terminator The Sarah Connor Chronicles\Terminator The Sarah Connor Chronicles 1x01.avi
TV\Terminator The Sarah Connor Chronicles\folder.override
and use notepad to make its contents be the exact show title that theTVDB or IMDB is expecting....
Code:
Terminator: The Sarah Connor Chronicles
Then next time mediaScraper gets a video from that folder, it'll see the folder.override file and instead of trying to figure out the Show Title, it will just read it out of that file and use that to search.

You can also place a folder.override it in the parent directory if you want it to apply to all folders directly above it.
Code:
TV\Terminator The Sarah Connor Chronicles\Season 1\Terminator The Sarah Connor Chronicles 1x01.avi
TV\Terminator The Sarah Connor Chronicles\folder.override
In addition, mostly for movies, you can create a whatEverYourFileNameIs.override so that it applies to only one file.
Code:
The Dark Knight.avi
The Dark Knight.override
mediaScraper.skip:

If you have a folder full of videos you know have no metadata (ex. home movies, clips, etc.) then you can place a file named mediaScraper.skip in the folder and then mediaScaper will ignore it and all its sub folders.
Code:
TV\Home Movies\mediaScraper.skip
Advanced Usage:

MediaScraper reads all of its options out of defaults.txt which is right next to mediaScraper.exe and it is just a list of command line switches that will always be used.

These are the default options:
Code:
/genPropertyFile /downloadFanArt /baseFolder "TV"
In addition you can also add any of the below, available, switches to further customize the output.

Available Switches:
  • /genPropertyFile - Generate a .properties file.
  • /genMyFile - Generate a .my file, contains extra data for SageMC
  • /genInfoFile - Generate a .info file. These don't do anything useful, they are just a dump of all of the available metadata, some of which, doesn't fit into the .my or .properties files.
  • /downloadFanArt - Download fanart/thumbnails/banners if available.
  • /baseFolder "C:\Example\Folder Name" - If you keep all your TV organized in a common base folder you can specify it here to help with scraping accuracy
  • /organizeFiles - If the mediaScraper is able to find metadata for your file it can also rename your file to match. (Will not work with VIDEO_TS folders)
    Code:
    Scrubs.201.lol.hdtv.avi -> Scrubs 2x01 - My Overkill.avi
    Code:
    The.Dark.Knight.2008.DVDrip.xor.aiv -> The Dark Knight (2008).avi
  • /tvSE - This will have mediaScraper use the TV naming format S02E01 rather than 2x01. This will apply to both organizing and metadata files.
  • /organizeBaseFolder "D:\Videos" - If you specify a base folder when you have /organizeFiles set this will move the videos into a folder structure as well.
    Code:
    Scrubs.201.lol.hdtv.avi -> D:\Videos\TV\Scrubs\Season 2\Scrubs 2x01 - My Overkill.avi
    Code:
    The.Dark.Knight.2008.DVDrip.xor.aiv -> D:\Videos\Movies\The Dark Knight (2008).avi
  • /4digitTV - Allow TV shows that don't use a separator between the season/episode (S07E22 -> 722) to be 4 digits long (S11E22 -> 1122). By default this is disabled to prevent a conflict with movies that have the year in the file name (2008 season/episode vs 2008 year).
  • /updateInfo - Normally mediaScraper will ignore videos that already have existing properties files. You can set this to have it run anyway.
  • (NEW) /useOriginalName - Use this if you want to use your original file name in the .properties files rather than the official name scraped from the show info.
  • (NEW) /genXMLFile - Generate an XML file that can be imported in to SageTV web server
  • (NEW) /userName "User" - User name for logging onto a SageTV web server
  • (NEW) /password "Password" - Password for logging onto a SageTV web server
  • (NEW) /sageTVServer "localhost:8080" - Host name and port number of web server
  • (NEW) /addToSageDB - When used with /genXMLFile and web server settings will automatically add a show to Sage's DB using the web servers XML import function. You can use this to have your imported TV show up with your recorded TV.

/addToSageDB:
If you pair this switch with /userName, /password, /sageTVServer, and /genXMLFile then mediaScraper will pack the metadata into a SageTV Webserver XML file and use an experimental feature that will add trick Sage into treating the show as if it were a SageTV Recording. I've been playing around with it and it seems to be working rock solid, but I make no guarantees that this won't blow out your entire wiz.bin: Use at your own risk!

Last edited by evilpenguin; 03-03-2009 at 01:40 PM.
Reply With Quote
  #3  
Old 01-05-2009, 03:52 AM
mickp's Avatar
mickp mickp is offline
Sage Aficionado
 
Join Date: Oct 2006
Posts: 468
Ooooh. If Mike or Dirk support this for fan art I might just give the feature a go.

Downloading now. Thanks E.P.

Mick.
Reply With Quote
  #4  
Old 01-05-2009, 04:28 AM
mickp's Avatar
mickp mickp is offline
Sage Aficionado
 
Join Date: Oct 2006
Posts: 468
Initial ignorant impression #1

Hey E.P.

Just gave it a burl on a few files

Filenames that didn't work;

Code:
"c:\shares\movies\Atlantis\Season 3\Stargate.Atlantis.S03E01.WS.DSR.XviD-DIMENSION.avi"

"c:\shares\movies\Atlantis\Season 3\Stargate.Atlantis.S03E01.avi"
Filename that did work;

Code:
"c:\shares\movies\Atlantis\Season 3\Stargate Atlantis S03E01.avi"
Unfortunately I'm utter rubbish at regex so can't be of much help with detailed suggestions .

Can I suggest replacing the (.) period with a space and also if a postitive result/hit hasn't yet been found try removing the last word of the file (assuming . replaced with space) and giving the search another go. Then removing another, and another?

I realise that I could rename the files so that they work but it would be nice to have it just work with typical download file names.

I'll go have more of a play now

Mick.

Edit: Also, would it be possible to not create the metadata files if no result was found?

Last edited by mickp; 01-05-2009 at 04:32 AM.
Reply With Quote
  #5  
Old 01-05-2009, 04:52 AM
evilpenguin's Avatar
evilpenguin evilpenguin is offline
SageTVaholic
 
Join Date: Aug 2003
Location: Seattle, WA
Posts: 3,696
Yeah, good catch, looks like the '.' in the series name is causing some trouble. I'll that (and a whole bunch of other bugs I found ) all sorted out tomorrow.
Reply With Quote
  #6  
Old 01-05-2009, 05:04 AM
mickp's Avatar
mickp mickp is offline
Sage Aficionado
 
Join Date: Oct 2006
Posts: 468
Cool. Thanks.

Mick.
Reply With Quote
  #7  
Old 02-10-2009, 08:48 AM
popechild popechild is offline
Sage Expert
 
Join Date: May 2006
Posts: 725
Just had a thought for a nice addition to future downloads. What do you think about putting a text file in the folder that has all of the usage instructions from your 2nd post in it? I can "scrape" it myself for now, but knowing that it'll update with each version... I just realized that I keep having to come back to this thread whenever I use the scraper to remember what the different switch options are. Just a thought.
Reply With Quote
  #8  
Old 02-10-2009, 09:06 AM
popechild popechild is offline
Sage Expert
 
Join Date: May 2006
Posts: 725
Sorry, one more from me. I'm playing around with the XML import to sage DB feature and it's very cool. I have a couple of questions about how it works though.

1) I get a little lock icon next to the imported shows in my Recorded TV list. It doesn't seem to prevent me from deleting the episodes - does anyone know what this means? I've never seen it on anything before.

2) Does anyone know how Sage handles these in terms of freeing up space? I have these imported episodes stored on a different drive, so I'm hoping Sage doesn't delete them when it's trying to clear out room for new shows. Anybody know whether Sage takes these into consideration when calculating available space or whether it might delete them thinking that would free up space? That's the only thing that kind of scares me.

3) Finally, I've got 5 episodes of one show (Damages) all in the same folder. All run through the scraper great and all the properties file and FanArt stuff is generated. However, when I use the options to do the XML import into Sage's DB, it's only importing 2 of the 5. (The one other show I have tried it on has 4 episodes, and all of them imported properly.) Can you think of a reason why only 2 of the 5 would get imported into Sage's DB when all 5 are recognized and properly scraped?

Last edited by popechild; 02-10-2009 at 09:30 AM.
Reply With Quote
  #9  
Old 02-10-2009, 11:12 AM
evilpenguin's Avatar
evilpenguin evilpenguin is offline
SageTVaholic
 
Join Date: Aug 2003
Location: Seattle, WA
Posts: 3,696
Quote:
Originally Posted by matt91 View Post
When I run the tool on:
R:\tv\Crusoe-Hour12TheTraveler-9484598-0.mpg
Oh shoot, I half-way fixed that and forgot to finish it. I'll try and have something out for that in the next few days.

Quote:
Originally Posted by popechild View Post
I'm still unable with the newest version to figure out how to run it on my tv shows ripped as VIDEO_TS folders. It keeps coming back with crazy results that aren't accurate. I'm sure I'm just doing something wrong.
I'll need to see scraper.log files for all the problems your having.
Reply With Quote
  #10  
Old 02-18-2009, 06:16 PM
Homebuilder Homebuilder is offline
Sage Advanced User
 
Join Date: Sep 2005
Posts: 180
divx files versus avi

Hi,
just downloaded and it seems to work great..except... Itworks when a file has the extension avi, but not .divx... I rename the file to avi and it works.

Anyway to make this recognize a divx file?
Reply With Quote
  #11  
Old 06-13-2009, 10:53 AM
freedml freedml is offline
Sage Expert
 
Join Date: May 2008
Posts: 549
Getting stuck?

mediascraper seems to be getting stuck here. can someone tell me why:

- Remaining Commands (3): (/get ******AiringInfoXML /user "%%userName%%" /pa
ssword "%%password%%" /realm "SageTV Web Interface")
+ Command : /get ******AiringInfoXML /user "Sage" /password "******" /real
m "SageTV Web Interface"
- Adding Credientials: Sage@localhost:8080(SageTV Web Interface)
- Adding Credientials: Sage@localhost:8080(SageTV Web Interface)
+ Requesting WebAddress: http://localhost:8080/******/DetailedInfo?AiringI
d=1309749&xml=yes
- Attempt #1 - Attempt #2 - Attempt #3 - Attempt #4
- Attempt #5 Failure: 500 Internal server error
+ Sleeping for 10 seconds as to not throttle website
Reply With Quote
  #12  
Old 06-13-2009, 11:24 AM
freedml freedml is offline
Sage Expert
 
Join Date: May 2008
Posts: 549
Maybe a password problem? Webserver installs with a default 4 character password, but mediascraper seems to assume a 6 character password.
Reply With Quote
  #13  
Old 06-13-2009, 12:36 PM
rmac321 rmac321 is offline
Sage Advanced User
 
Join Date: Dec 2008
Posts: 194
MediaTitle Metadata field

EP,

Should MediaScraper (1.13) be producing a MediaTitle field for TV shows and putting it in the .properties file? It turns out that the problem I'm having with SageMC is due to SageMC expecting to see the MediaTitle to load FanArt for TV shows in the media import directory.

see: http://forums.freytechnologies.com/f...7&postcount=18
and: http://forums.freytechnologies.com/f...2&postcount=19

Thanks!
__________________
SageTV v9.1.10.479 on Ubuntu
(testing v9.1.10.479 on Debian and Win10)

Last edited by rmac321; 06-13-2009 at 01:41 PM. Reason: updated
Reply With Quote
  #14  
Old 06-13-2009, 07:00 PM
GollyJer's Avatar
GollyJer GollyJer is offline
Sage Aficionado
 
Join Date: Nov 2006
Posts: 318
Is /AddToSageDB working for anyone? It was working great but doesn't anymore with the 6.5.17 beta.
__________________
Currently using SageTV Media Center Server on Windows 7, SageTV Client as an HTPC on Windows 7, and an HD Theater HD200. The server controls 3 Motorola DCH-3200 cable boxes and 3 Hauppauge HD-PVRs (all Rev F1) with HD audio and changes channels via firewire WITH NO LOCKUPS. It's awesome.
4 Steps to Perfect Stutter Free Playback for SageTV
Quick Guide: How to Bitstream Audio in Windows 7
Reply With Quote
  #15  
Old 06-18-2009, 02:28 PM
rmac321 rmac321 is offline
Sage Advanced User
 
Join Date: Dec 2008
Posts: 194
MediaTitle

EP,

Sorry for the nag. Any chance you will be adding the MediaTitle field into the .properties output? I love MediaScraper and have used it to organize all my media files and FanArt, so I'd prefer to stay with it.

I know you mentioned you use BMT now, so I would certainly understand if you don't intend to do any more updates. OTOH, if you do intend to add this feature, I'll wait patiently for the next beta.

Thanks!
__________________
SageTV v9.1.10.479 on Ubuntu
(testing v9.1.10.479 on Debian and Win10)
Reply With Quote
  #16  
Old 06-21-2009, 12:44 PM
rmac321 rmac321 is offline
Sage Advanced User
 
Join Date: Dec 2008
Posts: 194
EP, did I offend?
__________________
SageTV v9.1.10.479 on Ubuntu
(testing v9.1.10.479 on Debian and Win10)
Reply With Quote
Reply

Tags
fanart, imdb, metadata, themoviedb, thetvdb


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
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
Utility: Batch Metadata Importer 3.x stuckless Batch Metadata Tools 2416 09-20-2011 08:03 PM
manually edit video metadata loomdog32 SageMC Custom Interface 8 01-04-2009 12:34 AM
Runningtime not populated in Metadata mycorona SageMC Custom Interface 2 11-30-2008 01:08 PM
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 08:48 PM.


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