|
Batch Metadata Tools This forums is for discussing the user-created Batch Metadata Tools for SageTV. |
|
Thread Tools | Search this Thread | Display Modes |
#1
|
|||
|
|||
Problem with MediaTitles.xml
Has anyone had success using MediaTitles.xml to force BMT to use tvdb as the lookup for tv shows given a shows name?
Here is an example of an entry in my MediaTitles.xml file: Code:
<match> <regex>[\\/]MythBusters[\\/]</regex> <metadata type="tv" name="tvdb">73388</metadata> </match> Code:
2010-08-16 20:44:39,466 - ERROR; \\fileserver\media\TV-Shows\MythBusters\YouTube Special.mpg; YouTube Special; 171457; Search Failed for SearchQuery; Type: TV; EPISODE_DATE:2010-08-16;ID:73388;RAW_TITLE:YouTube Special;FILE:\\fileserver\media\TV-Shows\MythBusters\YouTube Special.mpg;QUERY:YouTube Special;CLEAN_TITLE:YouTube Special;PROVIDER:tvdb; |
#2
|
|||
|
|||
Ahh, looks like a null pointer exception:
Code:
2010-08-16 20:44:39,466 [Thread-28] WARN sagex.phoenix.metadata.provider.tvdb.TVDBItemParser - Failed while parsing series: MediaSearchResult [extraArgs=CLEAN_TITLE: YouTube Special,ID: 73388,RAW_TITLE: YouTube Special,FILE: \\fileserver\media\TV-Shows\MythBusters\YouTube Special.mpg,PROVIDER: tvdb,EPISODE_DATE: 2010-08-16,, id=73388, imdbId=null, metadata=null, providerId=tvdb, score=1.0, title=YouTube Special, type=null, url=null, year=0] java.lang.NullPointerException at sagex.phoenix.metadata.provider.tvdb.TVDBItemParser.getMetadata(TVDBItemParser.java:76) at sagex.phoenix.metadata.provider.tvdb.TVDBMetadataProvider.getMetaData(TVDBMetadataProvider.java:27) at sagex.phoenix.metadata.search.MetadataSearchUtil.searchById(MetadataSearchUtil.java:176) at sagex.phoenix.metadata.provider.tvdb.TVDBMetadataProvider.search(TVDBMetadataProvider.java:33) at sagex.phoenix.metadata.MetadataManager.search(MetadataManager.java:355) at sagex.phoenix.metadata.MetadataManager.automaticUpdate(MetadataManager.java:556) at sagex.phoenix.metadata.MetadataManager.automaticUpdate(MetadataManager.java:526) at sagex.phoenix.metadata.AutomaticMetadataVisitor.visit(AutomaticMetadataVisitor.java:24) at sagex.phoenix.vfs.DecoratedMediaFile.accept(DecoratedMediaFile.java:48) at sagex.phoenix.vfs.DecoratedMediaFolder.accept(DecoratedMediaFolder.java:61) at sagex.phoenix.metadata.PhoenixMetadataSupport$1.run(PhoenixMetadataSupport.java:110) at sagex.phoenix.progress.ProgressTrackerManager$1.run(ProgressTrackerManager.java:48) |
#3
|
||||
|
||||
I'll investigate tonight... thx for the stack trace, that'll make it easier to find/fix.
__________________
Batch Metadata Tools (User Guides) - SageTV App (Android) - SageTV Plex Channel - My Other Android Apps - sagex-api wrappers - Google+ - Phoenix Renamer Downloads SageTV V9 | Android MiniClient |
#4
|
|||
|
|||
Hmm, looking at the source I'm even more confused. TVDBItemParser.java doesn't seem to be in the trunk anymore and yet my server is using it somehow even though I used the built-in plugin downloader inside of sagetv. TVDBItemParser.java is inside of the BMT-S6 branch but I'm assuming that it is for sagetv 6 and earlier. Any idea what could be going on? Is the 4.5 release still using TVDBItemParser.java? If so, where can I get the source so I can help fix the problem?
|
#5
|
||||
|
||||
Quote:
But, to save you some time... the NPE is comming from a line of code that should never be null So, I need to further investigate what that is happening.
__________________
Batch Metadata Tools (User Guides) - SageTV App (Android) - SageTV Plex Channel - My Other Android Apps - sagex-api wrappers - Google+ - Phoenix Renamer Downloads SageTV V9 | Android MiniClient |
#6
|
|||
|
|||
Got it fixed I had 33 TV episodes and it parses all but 11 of them correctly now. Going to see if I can get the others to process correctly.
Code:
TVDBItemParser.java Line 87 Change: String title = result.getExtra().get(SearchQuery.Field.EPISODE_TITLE.name()); to: String title = result.getExtra().get(SearchQuery.Field.RAW_TITLE.name()); Code:
MetadataSearchUtil.java Line 172 Add: res.setMediaType(query.getMediaType()); After: MediaSearchResult res = new MediaSearchResult(prov.getInfo().getId(), id, query.get(Field.RAW_TITLE), NumberUtils.toInt(query .get(Field.YEAR)), 1.0f); Last edited by cmaloney; 08-17-2010 at 06:11 PM. |
#7
|
|||
|
|||
The problem with the other 11 was that for a couple of the shows in my MediaTitles.xml file I had included a title and year as the example showed. However, including a title overrode the title that was derived from the filename. IE given the file \\Family Guy\Road to Europe.mpg : Instead of Road to Europe being the episode name, the parser was trying to use Family Guy as the episode title. Everything parses correctly now.
|
#8
|
||||
|
||||
Quote:
I noticed a few issues with the way that I had changed the code to do searches based on the IDs, and I've fixed that, so the MediaTitles.xml should work correctly (it was broken ). I've also added your second fix as well. But, your first fix, while it may work for you, is incorrect in the way that SearchQuery objects are built and used. We should try to figure out why RAW_TITLE is holding an episode title and not the series name. RAW_TITLE for a TV show would actually contain the Series title and not the episode title. EPISODE_TITLE is the only field that holds the Episode Title, and it's parsed using one of the functions from the tvfilename scrapers. title is only used in searching if there isn't a season/episode # in the query, and we need to do a fuzzy logic search based on the episode title. So, putting the Series title in the title field will most likely fail in all cases. I'll try to get a build out tonight with my latest changes. I actually had to fix several bugs in all the providers when a search by id was being used I've added new test cases for by id searching as well. If you are interested in seeing the test cases, you can view them here and here. I appreciate the in depth code fix.. it's not often I get the assistance of another java developer when debugging/troubleshooting these types of issues
__________________
Batch Metadata Tools (User Guides) - SageTV App (Android) - SageTV Plex Channel - My Other Android Apps - sagex-api wrappers - Google+ - Phoenix Renamer Downloads SageTV V9 | Android MiniClient |
#9
|
||||
|
||||
Quote:
Folder/SeriesName/EpisodeName.mpg is not actually recognized as a TV filename scraper. ie, there is no way for me to know that the folder name is the series, so what ends up happing is that the file gets processed by the movie scrapers The correct solution in your case would actually be to create a tvfilename scraper that would recognize the pattern TV/SeriesName/EpisodeName.mpg By modifying the code, and adding the MediaTitles, you are getting what you want, but unfortunately, it's not correct
__________________
Batch Metadata Tools (User Guides) - SageTV App (Android) - SageTV Plex Channel - My Other Android Apps - sagex-api wrappers - Google+ - Phoenix Renamer Downloads SageTV V9 | Android MiniClient |
#10
|
|||
|
|||
Quote:
BTW, One thing that was kind of irritating to me when I was processing the titles was that the matchScore was too high for a few of my matches causing it to fail. I had 3 shows like this today from my TiVo and I solved it by modifying the updateIfScored method to keep track of the highest scored episode and if it didn't find an exact match it would update the meta data to the best match. I know that this solution is not a perfect solution as some people might not want any false positives, but for TV shows the likelihood of this occurring should be fairly rare especially if you are specifying the series id and personally, I would rather fix the occasional mix up instead of the frequent near match that might be off by a couple of words. Maybe an option to keep the best match if a perfect one isn't found could be added? I could probably add it if there is an interest for such a feature and send you the diffs. Let me know if you want the code and I'll post it. Thanks for your responses Last edited by cmaloney; 08-17-2010 at 07:12 PM. |
#11
|
|||
|
|||
Quote:
Can I assume that the following folder/file format will work once you get the new release out... Folder/SeriesName/Season x/SeriesName SxEyy EpisodeName.mpg As this format will be recognized as a tv filename and processed by the tv scraper? k |
#12
|
||||
|
||||
Quote:
BTW, SeriesName SxEyy EpisodeName.mpg should already work, the fix that I did was allow the searcher to correctly use the id specified in the MediaTitles.xml
__________________
Batch Metadata Tools (User Guides) - SageTV App (Android) - SageTV Plex Channel - My Other Android Apps - sagex-api wrappers - Google+ - Phoenix Renamer Downloads SageTV V9 | Android MiniClient |
#13
|
|||
|
|||
Quote:
However, for some reason Heartland still is not using the correct Heartland from tvdb. It still uses 70598 rather than 82701 even with this match... Code:
<match> <regex>[\\/]Heartland</regex> <metadata type="tv" name="tvdb">82701</metadata> </match> |
Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) | |
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
Utility: BTV XML to Sage XML converter | nielm | SageTV Customizations | 4 | 01-06-2008 04:00 PM |
Stoopid newbie question - simple XML edit SageTV3.xml | pseudonym | SageTV Studio | 3 | 08-12-2007 06:44 PM |
Epgdata.xml problem | nox71 | SageTV EPG Service | 1 | 06-14-2006 06:24 PM |
Shows.xml and mpg.xml | nyplayer | SageTV Customizations | 0 | 09-01-2005 11:10 AM |
xml tv | pbennington | SageTV United Kingdom | 0 | 04-19-2004 03:45 PM |