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
  #1  
Old 08-23-2011, 02:25 PM
drewg drewg is offline
Sage Icon
 
Join Date: Aug 2007
Location: Richmond, VA
Posts: 1,042
I screwed up the file names, is there hope?

I have a TV series where I screwed up the file names when I ripped them. I have the totally wrong SxEx and wrong series title. However, I do have the correct episode titles. Is there a way to make BMT automatically replace the series name with the correct one, and search just on the titles, and not SxEx?

For example, I have Pink_Panther_Cartoons-S01E11-The_Pink_Tail_Fly.avi
I want BMT to search TVDB for "Pink Panther" (seriesid=71554) "The Pink Tail Fly"

If I force BMT to search like this manually, I get the metatdata I want. However, I'd like to automate it, since there are 125 or so episodes. I've read about the MediaTitles.xml file, and I tried this feeble attempt:
Code:
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE titles>

<titles>
  <match>
    <regex>[\\/]Pink_Panther_Cartoons/Pink_Panther</regex>
    <metadata type="TV" name="tvdb">71554</metadata>
  </match>
</titles>
When I try this, I see this in the log:

Code:
2011-08-23 16:10:23,476 - ERROR; /var/media/videos/pink_panther/Pink_Panther_Cartoons-S01E10-Pink_Ice.avi; Pink_Panther_Cartoons-S01E10-Pink_Ice; 2474892; Search Failed for SearchQuery [type=TV, fields={FILE: /var/media/videos/pink_panther/Pink_Panther
_Cartoons-S01E10-Pink_Ice.avi,SEASON: 01,DISC: ,RAW_TITLE: Pink Panther Cartoons,CLEAN_TITLE: Pink Panther Cartoons,EPISODE_DA
TE: 2011-08-23,QUERY: Pink Panther Cartoons,EPISODE: 10,}, hints=Hints [hints={update_fanart: true,update_metadata: true,scan_
missing_metadata: true,scan_subfolders: true,import_tv_as_recording: false,refresh: false,}]]
Thanks,

Drew
__________________
Server HW: AMD Ryzen Threadripper 2990WX 32-Core
Server SW: FreeBSD-current, ZFS, linux-oracle-jdk1.8.0, sagetv-server_9.2.2_amd64
Tuner HW: HDHR
Client: Nvidia Shield (HD300, HD100 in storage)
Reply With Quote
  #2  
Old 08-23-2011, 03:17 PM
wrems's Avatar
wrems wrems is offline
Sage Icon
 
Join Date: Feb 2007
Location: Marietta, GA
Posts: 1,332
Not that I want you to go and trash it further but you can use a little naming trick to have BMT search by the titles you have in your filenames.

In the manual you'll see that adding a dash dash will do a fuzzy lookup by title:

Series -- EpisodeTitle

This is used to match TV shows, in the event that you do not know the specific Season and Episode values, but you do know the Episode Title. The Series and

Episode must be separated by 2 dashes.
Examples
House -- Random Episode.avi
Lie to Me -- Pilot.avi

So you could process your filenames with another renaming tool to take out the SxxExx info and replace it with -- and let it fly with BMT. Maybe have to tweak a few but it could be better than the alternative. Otherwise if your sxxexx are consistently off some renames will allow you to do some regex arguments to change it...
Reply With Quote
  #3  
Old 08-24-2011, 06:34 AM
drewg drewg is offline
Sage Icon
 
Join Date: Aug 2007
Location: Richmond, VA
Posts: 1,042
Quote:
Originally Posted by wrems View Post
Not that I want you to go and trash it further but you can use a little naming trick to have BMT search by the titles you have in your filenames.
Ah, thanks. For some reason, I missed that in the manual. I will try this!
It is not possible to screw it up further

Drew
__________________
Server HW: AMD Ryzen Threadripper 2990WX 32-Core
Server SW: FreeBSD-current, ZFS, linux-oracle-jdk1.8.0, sagetv-server_9.2.2_amd64
Tuner HW: HDHR
Client: Nvidia Shield (HD300, HD100 in storage)
Reply With Quote
  #4  
Old 08-24-2011, 09:27 AM
drewg drewg is offline
Sage Icon
 
Join Date: Aug 2007
Location: Richmond, VA
Posts: 1,042
Quote:
Originally Posted by wrems View Post
Episode must be separated by 2 dashes.
Examples
House -- Random Episode.avi
Lie to Me -- Pilot.avi
OK, so I have a simple sed script I'll use to generate the new names. Before I do it, can you confirm that the new name is what BMT will like?

Code:
% echo Pink_Panther_Cartoons-S01E11-The_Pink_Tail_Fly.avi | sed -e 's|_Cartoons\-S01E[0-9]*|\-|g'
Pink_Panther--The_Pink_Tail_Fly.avi
Or do I need it insert spaces (or _) around the double dashes (--)

Thanks,

Drew
__________________
Server HW: AMD Ryzen Threadripper 2990WX 32-Core
Server SW: FreeBSD-current, ZFS, linux-oracle-jdk1.8.0, sagetv-server_9.2.2_amd64
Tuner HW: HDHR
Client: Nvidia Shield (HD300, HD100 in storage)
Reply With Quote
  #5  
Old 08-24-2011, 09:33 AM
stuckless's Avatar
stuckless stuckless is offline
SageTVaholic
 
Join Date: Oct 2007
Location: London, Ontario, Canada
Posts: 9,713
Quote:
Originally Posted by drewg View Post
OK, so I have a simple sed script I'll use to generate the new names. Before I do it, can you confirm that the new name is what BMT will like?

Code:
% echo Pink_Panther_Cartoons-S01E11-The_Pink_Tail_Fly.avi | sed -e 's|_Cartoons\-S01E[0-9]*|\-|g'
Pink_Panther--The_Pink_Tail_Fly.avi
Or do I need it insert spaces (or _) around the double dashes (--)

Thanks,

Drew

I would put spaces around the -- so that it's "Series -- Episode Name", and also, unless you have a perference for it, I'd drop the underscores the use spaces, so it would be "Pink Panther -- The Pink Tall Fly.avi"... I think BMT MAY remove the underscores, but I'm not 100% sure.
Reply With Quote
  #6  
Old 08-24-2011, 11:21 AM
drewg drewg is offline
Sage Icon
 
Join Date: Aug 2007
Location: Richmond, VA
Posts: 1,042
Quote:
Originally Posted by stuckless View Post
I would put spaces around the -- so that it's "Series -- Episode Name", and also, unless you have a perference for it, I'd drop the underscores the use spaces, so it would be "Pink Panther -- The Pink Tall Fly.avi"... I think BMT MAY remove the underscores, but I'm not 100% sure.
Blech. I'm a *nix guy, so I despise spaces in filenames. But I'll do it like you say

Thanks!

Drew
__________________
Server HW: AMD Ryzen Threadripper 2990WX 32-Core
Server SW: FreeBSD-current, ZFS, linux-oracle-jdk1.8.0, sagetv-server_9.2.2_amd64
Tuner HW: HDHR
Client: Nvidia Shield (HD300, HD100 in storage)
Reply With Quote
  #7  
Old 08-24-2011, 11:26 AM
stuckless's Avatar
stuckless stuckless is offline
SageTVaholic
 
Join Date: Oct 2007
Location: London, Ontario, Canada
Posts: 9,713
Quote:
Originally Posted by drewg View Post
Blech. I'm a *nix guy, so I despise spaces in filenames. But I'll do it like you say

Thanks!

Drew
That's oK, I'm a unix guy as well
Reply With Quote
  #8  
Old 08-24-2011, 02:43 PM
drewg drewg is offline
Sage Icon
 
Join Date: Aug 2007
Location: Richmond, VA
Posts: 1,042
Quote:
Originally Posted by stuckless View Post
That's oK, I'm a unix guy as well
BTW, thanks a million. That worked!

Drew
__________________
Server HW: AMD Ryzen Threadripper 2990WX 32-Core
Server SW: FreeBSD-current, ZFS, linux-oracle-jdk1.8.0, sagetv-server_9.2.2_amd64
Tuner HW: HDHR
Client: Nvidia Shield (HD300, HD100 in storage)
Reply With Quote
  #9  
Old 08-24-2011, 06:04 PM
stuckless's Avatar
stuckless stuckless is offline
SageTVaholic
 
Join Date: Oct 2007
Location: London, Ontario, Canada
Posts: 9,713
Quote:
Originally Posted by drewg View Post
BTW, thanks a million. That worked!

Drew
Glad it worked.
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
Recorded file names with Unicode lenkost SageTV Software 1 11-30-2008 12:17 AM
UTF-16 File Names throwing playback exception on mp3 PAF SageTV Beta Test Software 3 08-14-2008 02:43 PM
Adding More Details to File Names of Recordings Slugger SageTV Studio 2 04-13-2007 07:42 PM
Change TV Recording File Names & Other questions? rdb4133 SageTV Software 3 11-05-2005 12:34 AM


All times are GMT -6. The time now is 07:19 PM.


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