|
Batch Metadata Tools This forums is for discussing the user-created Batch Metadata Tools for SageTV. |
|
Thread Tools | Search this Thread | Display Modes |
#1
|
|||
|
|||
File Renaming and Rescanning...
So, I went down the MediaTitles.xml route and spun out a few hours without much success... Here's an example:
I tried these variants... <file><regex>[\\/]Magnum</regex> <file><regex>[\\/]Magnum.-</regex> <file><regex>[\\/]Magnum*</regex> on this rule... <match> <file><regex>[\\/]Magnum</regex> <title>Magnum, P.I. </title> <metadata type="tv" name="tvdb"74380</metadata> </match> and this file: /mnt/samba/Videos/Magnum.P.I.S01.DVDRip.XViD-uDF/magnum.p.i.0116.dvdrip.xvid-udf.avi Didn't having any success getting the metadata picked using this method, so I went at it from a batch file renaming approach... thinking that if I can get the files / folders named with the proper syntax I can solve the challenge from that angle... So I named the above file, to this: "Magnum PI - S01E16 - Dvdrip Xvid-udf.Avi" but, as evidenced in the BMT details for this file, SageTV wants to keep it named the original name: "magnum.p.i.0116.dvdrip.xvid-udf.avi" instead of picking up the new renamed file name (above) that is now displayed in file manager. Oddly, the file will still play in SageTV even though it has a completely different name now... which seems indicative that SageTV is tracking the file with some other identifier... Anywho, I'd really appreciate some advice here.. I've spent about 5 hours here trying to put together an automated process that will prevent downstream tedium... unfortunately, it's slow going and fruitless... I prefer the MediaTitles.xml route since an effective script there is less time consuming than the file renaming, but either of those is immensely better than manually going through that effort of individually going through each one and "update metadata".. changing them from movie to TV, retyping the title properly, searching.. tell me it needs a season and episode and so on and so... (btw, if it's not clear these are imported, not recorded) Any assistance/direction would be greatly appreciated... delirious, jbmia Last edited by jbmia; 03-09-2011 at 06:58 AM. Reason: grammar correction |
#2
|
||||
|
||||
Quote:
try this... Code:
<match> <regex>[\\/]Magnum</regex> <title>Magnum, P.I. </title> <metadata type="tv" name="tvdb">74380</metadata> </match> I also recently updated the MediaTitles section of the user guide, to include a complete example. BTW, when editing Xml files, it would be beneficial to use an Xml validating editor. YOu issues seem to come from the fact that your xml entry wasn't valid xml. I don't know of any Xml editors for windows, but perhaps people could suggest one. Sean.
__________________
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 Last edited by stuckless; 03-09-2011 at 08:21 AM. |
#3
|
|||
|
|||
Thanks for the help!
I changed my rule to this: HTML Code:
<titles> <!-- A Match can contain a regex that will be used to match against the path$ then set the fields, title, year, or id, into the search query. --> <match> <regex>[\\/]Tom.*</regex> <title>Tom and Jerry</title> <year>1940</year> <metadata type="tv" name="tvdb">72860</metadata> </match> <match> <regex>[\\/]Magnum</regex> <title>Magnum, P.I. </title> <metadata type="tv" name="tvdb">74380</metadata> </match> </titles> HTML Code:
/mnt/samba/Videos/Magnum.P.I.S01/magnum.p.i.0110.dvdrip.xvid-udf.avi The first rule, for Tom & Jerry, doesn't seem to work either.. I'm having a hard time understanding how to write these regex arguments so the files are properly picked up and evaluated... Another quick question: I've deleted some video files from my share... deleted them from a file manager, not from within SageTV. The challenge I'm having is, they've dissappeared from SageTV, but they're not flushing out of the BTM database... They still show when I run a search from within BMT... What do I need to do to flush these old entries from BMT? Thanks again. jbmia Last edited by jbmia; 03-09-2011 at 09:37 AM. |
#4
|
||||
|
||||
Quote:
BMT does not have it's own database. It querries its information from the sagetv database on the fly. If you have deleted them from sagetv, then you'll need to tell sagetv to refresh it's library to reflect the missing files. (You can use the "refresh" action on the bmt web ui toolbar)
__________________
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 |
#5
|
|||
|
|||
LOL... I should know that.. I'm typing this from within Ubuntu right now.. I'll give the MediaTitles.xml a whirl with that in mind...
I think I've got something wrong with the database reads... "refresh library" is not updating anything.. my understanding is that it only checks for "new" files anyway... but regardless, it's not updating in BMT.. For example, I have this file listed in BMT, but it doesn't exist any longer in the actual folder and the folder is no longer defined in the SageTV media import directories.. and I've already run a rescan: "/mnt/samba/Videos/Magnum.P.I.S01.DVDRip.XViD-uDF/magnum.p.i.0102.dvdrip.xvid-udf.avi" What am I doing wrong? jbmia |
#6
|
||||
|
||||
Quote:
__________________
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 |
#7
|
|||
|
|||
So.. I'm running the linux version on Amahi... the process I've followed is:
- remove the imported shares -- /mnt/samba/videos -- /mnt/samba/movies - stop the sage server (/opt/sagetv/server/stopsage) - deleted the files in the shares... - restart the sagetv server - readd the imported shares Yet, BMT still shows the files when I do a search, even though the files no longer appear in SageTV... to be more specific.. I'm doing a "search" for "magnum" and the files I've deleted from the share are still displaying... I even deleted the wiz.bin file (took a backup) and the files still show in BMT... So, the data is DEFINITELY being stored somewhere... Given that, what do you think?? jbmia |
#8
|
||||
|
||||
Quote:
I add/remove sources all the time on my dev setup, and I've never seen this issue.
__________________
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
|
|||
|
|||
Wow.. as crazy as that sounded, that's appears to be have been the issue... I'm using Google Chrome (Ubuntu)... I flushed the cache and it cleared out the old data that was confusing things.. Wouldn't have expected for the browser to pull up local cache data when I'm running a search on a folder on a completely different machine.. Go figure.
The file renaming appears to be working and the tips you provided on MediaTitles.xml paid off.. Many thanks for your assistance! Also, I may have overlooked something, but is there some documentation you'd recommend I study that provides more details on the syntax for the MediaTitles.xml rules? Thanks again for helping me through this! jbmia |
#10
|
||||
|
||||
Quote:
__________________
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 |
#11
|
|||
|
|||
Stuckless, since BMT seems to have an issue with caching (something I've hit in the past as well) have you looked at any server side instructions to prevent browsers from caching?
Something as simple as Code:
<META http-equiv="Pragma" content="no-cache"> Just curious if it's something you have looked into. |
#12
|
||||
|
||||
Quote:
__________________
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
|
|||
|
|||
Ahh XHR and GWT. Never walked that path so I have no idea if they pay any attention to the meta tags. It may or may not (more likely not) prevent caching. Isn't IE that thing you use to download Firefox on a fresh install?
|
#14
|
||||
|
||||
No, I use the synaptic package manager for that... I've never seen IE on a fresh install
__________________
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 |
#15
|
||||
|
||||
OK. Not seeing the error.
C:\SageTV\SageTV\userdata\Phoenix\scrapers\MediaTitles.xml Code:
<titles> <match> <regex>[\\/]DoctorWho-.*[\\/]</regex> <metadata type="tv" name="tvdb">78804</metadata> </match> </titles> Attached are the log files. They keep wanting to use the 1963 series, not the 2005 series which I am trying to point to in the MediaTitles.xml Last edited by graywolf; 03-13-2011 at 07:54 AM. |
#16
|
||||
|
||||
Quote:
If you are just trying to get it to match the title this would work: <match> <regex>[\\/]DoctorWho </regex> <title>Doctor Who</title> </match> This would fix the title. If you are trying to correct for a particular year of Doctor Who you would use this: <match> <regex>[\\/]DrWho-.*</regex> <title>Dr. Who</title> <year>2009</year> <metadata type="tv" name="tvdb">78804</metadata> </match> I think. Gerry
__________________
Big Gerr _______ Server - WHS 2011: Sage 7.1.9 - 1 x HD Prime and 2 x HDHomeRun - Intel Atom D525 1.6 GHz, Acer Easystore, RAM 4 GB, 4 x 2TB hotswap drives, 1 x 2TB USB ext Clients: 2 x PC Clients, 1 x HD300, 2 x HD-200, 1 x HD-100 DEV Client: Win 7 Ultimate 64 bit - AMD 64 x2 6000+, Gigabyte GA-MA790GP-DS4H MB, RAM 4GB, HD OS:500GB, DATA:1 x 500GB, Pace RGN STB. Last edited by gplasky; 03-13-2011 at 09:01 AM. |
#17
|
||||
|
||||
Still NO JOY.
C:\SageTV\SageTV\userdata\Phoenix\scrapers\MediaTitles.xml
Code:
<titles> <match> <regex>[\\/]DoctorWho[\\/]</regex> <title>Doctor Who (2005)</title> <year>2005</year> <metadata type="tv" name="tvdb">78804</metadata> </match> </titles> DoubleChecked case sensitivity, the ID from thetvdb for Doctor Who (2005) which is 78804. The ID for the original Doctor Who from 1963 is 76107. One of the file path/names is: \\TOWER\Specials\999-Testing\DoctorWho-TheEleventhHour-1455755-0.mpg getting the following from the Code:
2011-03-13 12:08:23,358 [Timer-8] INFO sagex.phoenix.metadata.search.TVScraperManager - Scraper title-sageRecording created a query: SearchQuery [type=TV, fields={EPISODE_TITLE: The Eleventh Hour,RAW_TITLE: Doctor Who,}, hints=Hints [hints={update_fanart: true,update_metadata: true,scan_missing_metadata: true,scan_subfolders: true,known_recording: false,import_tv_as_recording: true,auto: true,}]] for file SageMediaFile [sageId=24266, sageObject=MediaFile[id=24266 A[24269,24267,"DoctorWho-TheEleventhHour-1455755-0",0@1005.16:07,71] mask=V host=Graywolf-laptop encodedBy= format=MPEG2-PS 1:11:58 1048 kbps [#0 Video[MPEG2-Video 29.97003 fps 720x480 4:3 interlaced id=e0]#1 Audio[MP2 48000 Hz 2 channels 384 kbps MAIN idx=1 id=c0]] \\TOWER\Specials\999-Testing\DoctorWho-TheEleventhHour-1455755-0.mpg, Seg0[Tue 10/5 16:07:20.210-Tue 10/5 17:19:19.000]]] with hints Hints [hints={update_metadata: true,update_fanart: true,scan_missing_metadata: true,known_recording: false,scan_subfolders: true,import_tv_as_recording: true,auto: true,}] 2011-03-13 12:08:23,362 [Timer-8] INFO sagex.phoenix.metadata.search.SearchQueryFactory - Created Search Query: SearchQuery [type=TV, fields={EPISODE_DATE: 2010-10-05,FILE: \\TOWER\Specials\999-Testing\DoctorWho-TheEleventhHour-1455755-0.mpg,CLEAN_TITLE: Doctor Who,EPISODE_TITLE: The Eleventh Hour,RAW_TITLE: Doctor Who,}, hints=Hints [hints={update_fanart: true,update_metadata: true,scan_missing_metadata: true,scan_subfolders: true,known_recording: false,import_tv_as_recording: true,auto: true,}]] 2011-03-13 12:08:23,362 [Timer-8] INFO sagex.phoenix.metadata.MetadataManager - search(): tvdb; SearchQuery [type=TV, fields={EPISODE_DATE: 2010-10-05,FILE: \\TOWER\Specials\999-Testing\DoctorWho-TheEleventhHour-1455755-0.mpg,CLEAN_TITLE: Doctor Who,EPISODE_TITLE: The Eleventh Hour,RAW_TITLE: Doctor Who,}, hints=Hints [hints={update_fanart: true,update_metadata: true,scan_missing_metadata: true,scan_subfolders: true,known_recording: false,import_tv_as_recording: true,auto: true,}]] 2011-03-13 12:08:23,363 [Timer-8] INFO sagex.phoenix.metadata.MetadataManager - Searching: Doctor Who using TVDBMetadataProvider[MetadataProviderInfo [id=tvdb, fanartId=null, mediaTypes=[TV], name=thetvdb.com]] 2011-03-13 12:08:23,368 [Timer-8] INFO sagex.phoenix.metadata.provider.tvdb.TVDBSearchParser - TVDB Search: http://www.thetvdb.com/api/GetSeries.php?seriesname=Doctor+Who 2011-03-13 12:08:23,369 [Timer-8] INFO sagex.phoenix.util.url.CachedUrlFactory - Caching URL Factory in use. 2011-03-13 12:08:23,681 [Timer-8] WARN sagex.phoenix.metadata.search.MetadataSearchUtil - The year was not passed in the query: SearchQuery [type=TV, fields={QUERY: Doctor Who,EPISODE_DATE: 2010-10-05,FILE: \\TOWER\Specials\999-Testing\DoctorWho-TheEleventhHour-1455755-0.mpg,CLEAN_TITLE: Doctor Who,EPISODE_TITLE: The Eleventh Hour,RAW_TITLE: Doctor Who,}, hints=Hints [hints={update_fanart: true,update_metadata: true,scan_missing_metadata: true,scan_subfolders: true,known_recording: false,import_tv_as_recording: true,auto: true,}]] we are returning the first good result. Consider adding the year to the query for better matches. 2011-03-13 12:08:23,681 [Timer-8] INFO sagex.phoenix.metadata.MetadataManager - Fetching Metadata for MediaSearchResult [extraArgs={CLEAN_TITLE: Doctor Who,EPISODE_TITLE: The Eleventh Hour,RAW_TITLE: Doctor Who,FILE: \\TOWER\Specials\999-Testing\DoctorWho-TheEleventhHour-1455755-0.mpg,EPISODE_DATE: 2010-10-05,}, id=76107, imdbId=null, metadata=null, providerId=tvdb, score=1.0, title=Doctor Who, type=TV, url=76107, year=1963] 2011-03-13 12:08:23,691 [Timer-8] INFO sagex.phoenix.metadata.provider.tvdb.TVDBSeriesParser - TVDB Series: http://www.thetvdb.com/api/5645B594A3F32D27/series/76107/en.xml 2011-03-13 12:08:23,848 [Timer-8] INFO sagex.phoenix.metadata.provider.tvdb.TVDBSeriesParser - TVDB Actors: http://www.thetvdb.com/api/5645B594A3F32D27/series/76107/actors.xml 2011-03-13 12:08:24,314 [Timer-8] INFO sagex.phoenix.metadata.provider.tvdb.TVDBItemParser - TVDB date: http://thetvdb.com/api/GetEpisodeByAirDate.php?apikey=5645B594A3F32D27&seriesid=76107&airdate=2010-10-05 2011-03-13 12:08:24,551 [Timer-8] WARN sagex.phoenix.metadata.provider.tvdb.TVDBItemParser - Can't do lookup by season/epsidoe for season: null; episode: null 2011-03-13 12:08:24,551 [Timer-8] INFO sagex.phoenix.metadata.provider.tvdb.TVDBItemParser - TVDB Title: http://www.thetvdb.com/api/5645B594A3F32D27/series/76107/all/en.xml 2011-03-13 12:08:39,526 [Timer-8] INFO sagex.phoenix.metadata.provider.tvdb.TVDBItemParser - Unable to match a direct title for: The Eleventh Hour 2011-03-13 12:08:39,528 [Timer-8] WARN phoenix.log - ERROR; \\TOWER\Specials\999-Testing\DoctorWho-TheEleventhHour-1455755-0.mpg; DoctorWho-TheEleventhHour-1455755-0; 24266; Failed while parsing series: MediaSearchResult [extraArgs={CLEAN_TITLE: Doctor Who,EPISODE_TITLE: The Eleventh Hour,RAW_TITLE: Doctor Who,FILE: \\TOWER\Specials\999-Testing\DoctorWho-TheEleventhHour-1455755-0.mpg,EPISODE_DATE: 2010-10-05,}, id=76107, imdbId=null, metadata=null, providerId=tvdb, score=1.0, title=Doctor Who, type=TV, url=76107, year=1963] MetadataException [] at sagex.phoenix.metadata.provider.tvdb.TVDBItemParser.getMetadata(TVDBItemParser.java:118) at sagex.phoenix.metadata.provider.tvdb.TVDBMetadataProvider.getMetaData(TVDBMetadataProvider.java:33) at sagex.phoenix.metadata.MetadataManager.getMetdata(MetadataManager.java:317) at sagex.phoenix.metadata.MetadataManager.getMetdata(MetadataManager.java:381) at sagex.phoenix.metadata.MetadataManager.automaticUpdate(MetadataManager.java:473) at sagex.phoenix.metadata.MetadataManager.automaticUpdate(MetadataManager.java:443) at sagex.phoenix.plugin.PhoenixPlugin.updateMetadata(PhoenixPlugin.java:175) at sagex.phoenix.plugin.PhoenixPlugin.mediaFileImported(PhoenixPlugin.java:148) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source) at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) at java.lang.reflect.Method.invoke(Unknown Source) at sagex.plugin.AbstractPlugin$1.run(AbstractPlugin.java:254) at java.util.TimerThread.mainLoop(Unknown Source) at java.util.TimerThread.run(Unknown Source) Caused by: java.lang.Exception: Cannot process TV without a valid season/episod; Result: MediaSearchResult [extraArgs={CLEAN_TITLE: Doctor Who,EPISODE_TITLE: The Eleventh Hour,RAW_TITLE: Doctor Who,FILE: \\TOWER\Specials\999-Testing\DoctorWho-TheEleventhHour-1455755-0.mpg,EPISODE_DATE: 2010-10-05,}, id=76107, imdbId=null, metadata=null, providerId=tvdb, score=1.0, title=Doctor Who, type=TV, url=76107, year=1963] at sagex.phoenix.metadata.provider.tvdb.TVDBItemParser.getMetadata(TVDBItemParser.java:99) ... 14 more Code:
2011-03-13 12:08:23,348 - AUTO; MEDIA; \\TOWER\Specials\999-Testing\DoctorWho-TheEleventhHour-1455755-0.mpg; DoctorWho-TheEleventhHour-1455755-0; 24266 2011-03-13 12:08:39,527 - ERROR; \\TOWER\Specials\999-Testing\DoctorWho-TheEleventhHour-1455755-0.mpg; DoctorWho-TheEleventhHour-1455755-0; 24266; Failed while parsing series: MediaSearchResult [extraArgs={CLEAN_TITLE: Doctor Who,EPISODE_TITLE: The Eleventh Hour,RAW_TITLE: Doctor Who,FILE: \\TOWER\Specials\999-Testing\DoctorWho-TheEleventhHour-1455755-0.mpg,EPISODE_DATE: 2010-10-05,}, id=76107, imdbId=null, metadata=null, providerId=tvdb, score=1.0, title=Doctor Who, type=TV, url=76107, year=1963] |
#18
|
||||
|
||||
Not sure what I did different, but it is working now.
<match> <regex>[\\/]DoctorWho-.*</regex> <title>Doctor Who (2005)</title> <year>2005</year> <metadata type="tv" name="tvdb">78804</metadata> </match> Really liking the results in my testing. Great Job. |
#19
|
||||
|
||||
You got rid of the trailing directory separator ([\\/]) which now finds all files that are Doctor Who instead of all Directories that are Doctor Who ( as per Gerry's note)
__________________
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 |
#20
|
||||
|
||||
D'oh. At least I'll learn from this and at least won't make that same mistake.
|
Tags |
bmt, metadata, rename |
Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) | |
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
Rescanning Media Content question | jchisholm | SageTV Beta Test Software | 0 | 09-10-2010 05:49 AM |
HVR-2250 is rescanning the second tuner nessary? | blueroom | Hardware Support | 4 | 06-08-2009 04:19 PM |
renaming recordings | stevech | SageTV Software | 4 | 04-03-2006 11:45 AM |
Rescanning import folders doesn't work | Wheemer | SageTV Beta Test Software | 19 | 08-14-2005 01:11 AM |
Renaming Files | Cabalsan | SageTV Customizations | 2 | 05-16-2004 10:25 PM |