SageTV Community  

Go Back   SageTV Community > SageTV Development and Customizations > SageTV v7 Customizations > Phoenix
Forum Rules FAQs Community Downloads Today's Posts Search

Notices

Phoenix This forum is for discussing the user-created Phoenix custom interface for SageTV.

Reply
 
Thread Tools Search this Thread Display Modes
  #1  
Old 07-22-2011, 11:07 AM
sflamm sflamm is offline
Sage Icon
 
Join Date: Mar 2009
Posts: 1,653
problem with thetvdb.com meta data

Tried to pull the meta data for a couple TV series show:

Tom & Jerry
Mickey Mouse's Clubhouse

"thetvdb" has all the fanart (I went to the site and check), but for some reason BMT/Phoenix is not downloading. I even went to BMT web UI and navigated to the series manually and asked it to find meta data - it found the entries but did not bring down the fanart.

How do I fix?
Reply With Quote
  #2  
Old 07-22-2011, 12:34 PM
stuckless's Avatar
stuckless stuckless is offline
SageTVaholic
 
Join Date: Oct 2007
Location: London, Ontario, Canada
Posts: 9,713
Quote:
Originally Posted by sflamm View Post
Tried to pull the meta data for a couple TV series show:

Tom & Jerry
Mickey Mouse's Clubhouse

"thetvdb" has all the fanart (I went to the site and check), but for some reason BMT/Phoenix is not downloading. I even went to BMT web UI and navigated to the series manually and asked it to find meta data - it found the entries but did not bring down the fanart.

How do I fix?
I'll try to take a look at this over the weekend. But are you sure it didn't download any fanart? Also, fanart downloads in the background, and takes longer to download than just the metadata. So while you don't see it immediately, check the central fanart dir, for you tv/movies and see if the central fanart folder in there has any images or not.
Reply With Quote
  #3  
Old 07-22-2011, 12:57 PM
graywolf's Avatar
graywolf graywolf is offline
Sage Icon
 
Join Date: Oct 2009
Location: NC
Posts: 1,389
Also a couple "simple" questions.

When you were on the BMT web UI for the show(s), when you click on the FanArt tab, do you see anything?

Also, in your BMT configuration, is FanArt enabled?
And does it have the proper Central FanArt location?

Its the simple things that bite you.
Reply With Quote
  #4  
Old 07-22-2011, 12:59 PM
sflamm sflamm is offline
Sage Icon
 
Join Date: Mar 2009
Posts: 1,653
Correct - I always check the central fanart directory. The directory was empty for those shows...

Also, it seems to take a while for the fanart that is there to show up in the UI. Is there a way of forcing SageTV to update immediately to the latest downloaded fanart?
Reply With Quote
  #5  
Old 07-22-2011, 01:02 PM
sflamm sflamm is offline
Sage Icon
 
Join Date: Mar 2009
Posts: 1,653
Quote:
When you were on the BMT web UI for the show(s), when you click on the FanArt tab, do you see anything?

Also, in your BMT configuration, is FanArt enabled?
And does it have the proper Central FanArt location?
Yes - I always try to use BMT web UI to verify (and manually check the central fanart directory). In BMT under "Fanart" in the subtabs "Metadata" and "Fanart" only the "Metadata was populated though sparsely - and no "Fanart" was populated. Clicking on the "TheTVDB" link you can see there is fanart present to be downloaded.
Reply With Quote
  #6  
Old 07-23-2011, 07:43 AM
stuckless's Avatar
stuckless stuckless is offline
SageTVaholic
 
Join Date: Oct 2007
Location: London, Ontario, Canada
Posts: 9,713
Quote:
Originally Posted by sflamm View Post
Tried to pull the meta data for a couple TV series show:

Tom & Jerry
Mickey Mouse's Clubhouse

"thetvdb" has all the fanart (I went to the site and check), but for some reason BMT/Phoenix is not downloading. I even went to BMT web UI and navigated to the series manually and asked it to find meta data - it found the entries but did not bring down the fanart.

How do I fix?
The first thing I do, when someone tells me that BMT is broken because it can't find a show, is I go to the TVDB site and I enter their search title exactly and see what it returns. In your case, both shows are not listed under the titles that you provided.

This is a very common scenario and shows the weakness in the TVDB search engine. ie, searching for "Mickey Mouse's Clubhouse" returns no results, which also means that BMT will get no results as well. Searching for "Mickey Mouse Clubhouse" on the other hand returns an exact match. If you search for your title in tvdb as is, you'll see why BMT is failing.

Now, try "Tom & Jerry". Same issue, it doesn't exist (at least not for english). Now try "Tom and Jerry" and you'll see that you get an exact match.

There is nothing BMT can do if the search criteria returns no results. Some people have suggested that I hammer the TVDB with all sorts of extra searches, replacing & 'and' or replacing 'and' with '&' until I get a match (and then add keep building the list of special cases), but I don't intend to abuse a free site like with unneccessary hits when the simplest solution has always been to ensure that your shows are named correctly to ensure a better hit. And if you can't rename the shows physically, then you can use the MediaTitles.xml to add a matcher that will make the search title correct for the lookup.

I hope this explains your issue... and the fix.
Reply With Quote
  #7  
Old 07-23-2011, 11:32 PM
sflamm sflamm is offline
Sage Icon
 
Join Date: Mar 2009
Posts: 1,653
Thanks for looking into it so quickly.

Unfortunately when it comes to the naming of TV shows there is little control we have - as SageTV determines it from the guide meta data. So it is important fir BMT to look at variants with apostrophes and ampersands ...

File system names don't like special characters - hence 'bugs life' without an apostrophe. You mentioned there is some sort of 'matcher' that can be used - how does that work ? And can it be set up globally?

It seems that if I manually correct BMT on an episode of a TV series it would be good for it to remember and apply the correction to all future series recordings - make sense?

What do you recommend we do?
Reply With Quote
  #8  
Old 07-24-2011, 06:23 AM
graywolf's Avatar
graywolf graywolf is offline
Sage Icon
 
Join Date: Oct 2009
Location: NC
Posts: 1,389
The "matcher" would be MediaTitles.xml which you put in your SageTV\SageTV\userdata\Phoenix\scrapers directory

I have my shows in different directories so I have my regex matching on the directory name and not the file name. I.E. .../Hawaii Five-0 (2010)/.... would use tvdb ShowID 164541 and .../Hawaii Five-0 (1968)/... would use tvdb ShowID 71223

When you update the MediaTitles.xml file, you need to either restart Sage or in BMT => Configure => Refresh Configurations => Refresh MediaTitles.xml


A sample would be:

Code:
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE titles>

<titles>
  <match>
    <regex>[\\/]Hawaii Five-0 (2010)[\\/]</regex>
    <metadata type="TV" name="tvdb">164541</metadata>
  </match>
  <match>
    <regex>[\\/]Hawaii Five-0 (1968)[\\/]</regex>
    <metadata type="TV" name="tvdb">71223</metadata>
  </match>
  <match>
    <regex>[\\/]Stargate SG1[\\/]</regex>
    <metadata type="TV" name="tvdb">72449</metadata>
  </match>
  <match>
    <regex>[\\/]Stargate Universe[\\/]</regex>
    <metadata type="TV" name="tvdb">83237</metadata>
  </match>
</titles>
Hope that helps you out.
Reply With Quote
  #9  
Old 07-24-2011, 09:33 AM
sflamm sflamm is offline
Sage Icon
 
Join Date: Mar 2009
Posts: 1,653
Thanks for the example.

How do you get your TV shows to record to separate directories automatically in SageTV?
Reply With Quote
  #10  
Old 07-24-2011, 09:42 AM
graywolf's Avatar
graywolf graywolf is offline
Sage Icon
 
Join Date: Oct 2009
Location: NC
Posts: 1,389
For where they get recorded to? I don't.

But I do use SJQ to move them from local machine to my NAS.
Also, the MediaTitles works for my rips which is my main purpose.

The below is my test script for moving the files which I have based on RecordingStop. Test Arg is the Base location. It'll create the folder, then move it to that folder.

It puts Movies into a Movie Folder, otherwise the Folder is the Show Name. If it is something that has Seasons, it'll put it in Season folders under the Show folder.


Code:
/*
   Pretest if MediaFile is currently being Watched 
*/

//def  SJQ4_METADATA = ["SJQ4_ID":"2849349","SJQ4_PATH":"c:\\SageRecordings","SJQ4_LAST_SEGMENT":"AmericasNewsHeadquarters-0.mpg"];
//def SJQ4_ARGS = ["\\\\Tower\\SageTV\\br"];

import com.google.code.sagetvaddons.groovy.api.MediaFileHelpers ;
import org.apache.commons.io.FileUtils ;

String ParentPath = SJQ4_ARGS[0] 
String id   = SJQ4_METADATA.get("SJQ4_ID");
Object mf = MediaFileAPI.GetMediaFileForID(id.toInteger());

String FileName = SJQ4_METADATA.get("SJQ4_LAST_SEGMENT");
String FilePath = SJQ4_METADATA.get("SJQ4_PATH");
String ShowTitle=ShowAPI.GetShowTitle(mf);
String ShowSeasonDir ;
String OutputPath ;
int ShowSeasonNum=ShowAPI.GetShowSeasonNumber(mf);

println ( "Test Started");

if ( AiringAPI.IsNotManualOrFavorite(mf) ) {
    println("${FileName} is not a Favorite or Manual Recording - skipped")
    return 2
}
    
if( MediaFileHelpers.isBeingViewed(FileName) ) {
    println("${FileName} is being viewed; Return task to queue!")
    return 1
} 

if ( (FilePath.toUpperCase()) =~ "\\\\TOWER" ) {
        println("bypass since ${FilePath} is on TOWER")
        return 2
}

if ( ShowSeasonNum == 0 ) {
     ShowSeasonDir = "" ;
} else {
     ShowSeasonDir = "\\Season " + ShowSeasonNum ;
}

if ( ShowAPI.GetShowCategory(mf).equals ("Movie") ) {
        println("This is a Movie ");
        OutputPath = ParentPath + "\\Movies" ;
} else {
        println("This is a TV show") ;
        OutputPath = ParentPath + "\\" + ShowTitle + ShowSeasonDir ; 
}

OutputPath = (OutputPath =~ /[?!*^&#$%@:;]/).replaceAll(" ") ;
println ("Modified OutputPath = ${OutputPath} ");
OutputFile = OutputPath + FileName;
File dest   = new File(OutputPath);

FileUtils.forceMkdir(dest);

Tools.setExeArgs("\"${OutputPath}\"")

println ("Would Start EXE with argument ${OutputPath}");

println ( "Test Ended");

return 0
Reply With Quote
  #11  
Old 07-24-2011, 10:06 AM
sflamm sflamm is offline
Sage Icon
 
Join Date: Mar 2009
Posts: 1,653
My SageTV server is co-located with my Win2003R2 based NAS and
I use ShowAnalyzer (with profiles) for commercials so no normal need for SJQ.

Not sure there would be much advantage anyway since you still need a separate regex for each folder - right? (that is the manual part of the process)

The issue I experienced with BMT was for TV shows and Movies ripped not matching because of apostrophes and ampersands. This is so common there has to be a better solution that manual intervention continuously.

It seems that BMT really needs to do this for us - as it needs to look up the matches and evaluated the certain of the match before choosing.

If BMT won't do that then the MediaTitle XML should be extended to allow for some level of conditional logic so that we can script decision logic for each regex - which would be nice because it would allow custom decision logic by show.
Reply With Quote
  #12  
Old 07-24-2011, 12:01 PM
sflamm sflamm is offline
Sage Icon
 
Join Date: Mar 2009
Posts: 1,653
The match tag should at least be augmented to support 2-levels with regex expressions that allow string substitution (as normal)

<match> regex1
<match> regex2
<metadata>
</>
</>
</>

The idea is the regex1 can substitute for a series title
followed by the second regex search:

Daffy Duck Adventures 1960 (input)

Becomes:

Daffy Ducks Adventure's (following 1st regex)

Which becomes:

Daffy Ducks Adventures with ID 74474 (following 2nd regex)

The general form is:

</ match. (substitute at series level)
</ match /> (match and apply meta data season 1)
</ match /> (match and apply meta data season 2)
</>
Reply With Quote
  #13  
Old 07-24-2011, 06:34 PM
bialio's Avatar
bialio bialio is offline
SageTVaholic
 
Join Date: May 2007
Location: Frisco, TX
Posts: 3,445
Quote:
The issue I experienced with BMT was for TV shows and Movies ripped not matching because of apostrophes and ampersands. This is so common there has to be a better solution that manual intervention continuously.
I don't think it's a very common occurrence for anyone who has been using BMT long term to have to continuously intervene - I know that I have maybe spent 30 minutes or so total tweaking MediaTitles.xml over the last 3 years, most of that up front to find the shows it was 'failing' on.

btl.
__________________
PHOENIX 3 is here!
Server : Linux V9, Clients : Win10 and Nvidia Shield Android Miniclient
Reply With Quote
  #14  
Old 07-24-2011, 07: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 sflamm View Post
The match tag should at least be augmented to support 2-levels with regex expressions that allow string substitution (as normal)
A few notes...

1. MediaTitle.xml is meant to be a simple way to match titles to a given metadata provider id.... and as it is, it's more complicated than most would prefer, so I'm a little reluctant to start augmenting it.

2. If you need that much flexibility over your titles, you can probably do it using the filename scrapers. The scrapers are based on the Xmbc scraper engine are regex based.

3. You can add a matcher for a tv show right from bmt web ui (Add Matcher)

4. I have 1 entry in my MediaTitles.xml... other people have more, but really, I don't think people spend that much time adding entries here.
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
Limit size of Meta Data? Biggen Batch Metadata Tools 3 03-24-2011 09:55 AM
How to get Meta Data with WHS? richs SageTV v7 Customizations 1 11-28-2010 06:08 AM
How to refresh meta data? bits SageMC Custom Interface 3 12-26-2009 11:11 PM
Meta Data and Searching kranzel SageTV Customizations 2 10-28-2008 06:20 AM
How to add meta-data for home movies? Shield SageTV Software 1 10-01-2007 11:56 AM


All times are GMT -6. The time now is 01:33 PM.


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