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 12-24-2014, 01:11 PM
bigo93bronco's Avatar
bigo93bronco bigo93bronco is offline
Sage Aficionado
 
Join Date: Dec 2008
Posts: 317
Using BMT to move imports to recordings?

I have started over with a new wiz.bin and my existing recordings are stuck in the imported videos folder. I am trying to use BMT to import them as recordings after advanced video recovery failed. I have tried using the batch operations and tagging the check box for "sagetv recording?" on individual files, without success. What do I need to do to get these moved over?
__________________
Windows 10 X64 ASUS Z270 TUF2 MOBO
Intel I5 Kaby Lake @3.3 Corsair H65 AIO water cooler
16GB GSkill DRR4 10 SATA hotswap bays in 4U RM case
Redundant power supply, dual UPS's, etc
Samsung EVO 850 SSD X2 OS drives
WD 4TB Purple drive for recordings, various other drives for archives
Tuners are a work in progress
Reply With Quote
  #2  
Old 12-28-2014, 02:33 PM
wayner wayner is offline
SageTVaholic
 
Join Date: Jan 2008
Location: Toronto, ON
Posts: 7,491
Quote:
Originally Posted by bigo93bronco View Post
I have started over with a new wiz.bin and my existing recordings are stuck in the imported videos folder. I am trying to use BMT to import them as recordings after advanced video recovery failed. I have tried using the batch operations and tagging the check box for "sagetv recording?" on individual files, without success. What do I need to do to get these moved over?
What UI are you using? Sometimes there is a filter settings for Include Imported TV recordings or something like that.
__________________
New Server - Sage9 on unRAID 2xHD-PVR, HDHR for OTA
Old Server - Sage7 on Win7Pro-i660CPU with 4.6TB, HD-PVR, HDHR OTA, HVR-1850 OTA
Clients - 2xHD-300, 8xHD-200 Extenders, Client+2xPlaceshifter and a WHS which acts as a backup Sage server
Reply With Quote
  #3  
Old 12-28-2014, 11:47 PM
adone36 adone36 is offline
Sage Advanced User
 
Join Date: Nov 2007
Posts: 142
Titles should be in tv format and settings set to import tv formatted videos into Recordings.
Reply With Quote
  #4  
Old 06-13-2015, 07:49 PM
MilkmanCDN's Avatar
MilkmanCDN MilkmanCDN is offline
Sage Advanced User
 
Join Date: Oct 2005
Posts: 88
Hey Guys,

Maybe this question has been answered elsewhere, but I cant find it. I'm looking for a way to automatically import tv shows, using BMT, into the recordings in SageTV.

Would someone be able to point me in the right direction?
Reply With Quote
  #5  
Old 06-14-2015, 12:32 AM
adone36 adone36 is offline
Sage Advanced User
 
Join Date: Nov 2007
Posts: 142
Quote:
Originally Posted by MilkmanCDN View Post
Hey Guys,

Maybe this question has been answered elsewhere, but I cant find it. I'm looking for a way to automatically import tv shows, using BMT, into the recordings in SageTV.

Would someone be able to point me in the right direction?

See my answer above. That's all that is necessary. If the title is formatted correctly, it will be in your recordings after the next scan.
Reply With Quote
  #6  
Old 06-14-2015, 04:17 AM
stuckless's Avatar
stuckless stuckless is offline
SageTVaholic
 
Join Date: Oct 2007
Location: London, Ontario, Canada
Posts: 9,713
Enabling the "Import TV as REcording" option in BMT should be enough. That being said, if these are in sagetv default airing format "House-TimeForChang-000123201.ts" and you no longer have the .properties, then finding matches may be challenging. (That's why I never recommend turning of the generation of .properties, since it acts as a Wiz.bin backup for metedata).

YOu can try to do them one at a time in BMT, by checking the "Sage Recording" option in the metadata screen and see if that changes anything.
Reply With Quote
  #7  
Old 06-14-2015, 09:48 AM
MilkmanCDN's Avatar
MilkmanCDN MilkmanCDN is offline
Sage Advanced User
 
Join Date: Oct 2005
Posts: 88
Thanks for the responses. What exactly is "TV Format" Would someone provide a sample as to how these files should be named?
Reply With Quote
  #8  
Old 06-14-2015, 10:11 PM
adone36 adone36 is offline
Sage Advanced User
 
Join Date: Nov 2007
Posts: 142
Stitches - s01e01 - Pilot.mkv or Stitches - s01e01.mkv
Reply With Quote
  #9  
Old 06-23-2015, 05:36 PM
MilkmanCDN's Avatar
MilkmanCDN MilkmanCDN is offline
Sage Advanced User
 
Join Date: Oct 2005
Posts: 88
Thanks to all! I've managed to get it working on most of the shows, though some remain elusive. For example:

The Flash (2014) - S01E10.mkv

This filename does not import into recordings.

Any thoughts?
Reply With Quote
  #10  
Old 06-24-2015, 11:33 AM
Skirge01's Avatar
Skirge01 Skirge01 is offline
SageTVaholic
 
Join Date: Jun 2007
Location: New Jersey
Posts: 2,599
Quote:
Originally Posted by MilkmanCDN View Post
Thanks to all! I've managed to get it working on most of the shows, though some remain elusive. For example:

The Flash (2014) - S01E10.mkv

This filename does not import into recordings.

Any thoughts?
Sadly, BMT can't handle years in TV shows on its own. You would need to manually add a matcher, however, BMT also has a bug with adding parenthesis through the BMT UI. So, you actually need to open up the MediaTitles.xml, which is located here: C:\Program Files\SageTV\SageTV\userdata\Phoenix\scrapers

Then, you would need to add the following to that file:

Code:
  <match>
    <regex>[\\/]The Flash \(2014\)[\\/]</regex>
    <metadata type="TV" name="tvdb">279121</metadata>
  </match>
If you try to add the matcher via the UI, BMT doesn't add the required backslashes before the parenthesis.
__________________
Server: XP, SuperMicro X9SAE-V, i7 3770T, Thermalright Archon SB-E, 32GB Corsair DDR3, 2 x IBM M1015, Corsair HX1000W PSU, CoolerMaster CM Storm Stryker case
Storage: 2 x Addonics 5-in-3 3.5" bays, 1 x Addonics 4-in-1 2.5" bay, 24TB
Client: Windows 7 64-bit, Foxconn G9657MA-8EKRS2H, Core2Duo E6600, Zalman CNPS7500, 2GB Corsair, 320GB, HIS ATI 4650, Antec Fusion
Tuners: 2 x HD-PVR (HTTP tuning), 2 x HDHR, USB-UIRT
Software: SageTV 7
Reply With Quote
  #11  
Old 08-20-2015, 05:59 AM
MilkmanCDN's Avatar
MilkmanCDN MilkmanCDN is offline
Sage Advanced User
 
Join Date: Oct 2005
Posts: 88
Thanks for the response. I tried adding a matcher as you suggested, but it didn't seem to import properly. What do the '/' symbols do? Are they used to comment out a piece of the title (the year in this case) to make it easier for BMT to match?

If so, why would I comment out the leading bracket, but not the trailing? Shouldn't it be something like this?


Code:
<match>
    <regex>[\\/]The Flash \(2014)\[\\/]</regex>
    <metadata type="TV" name="tvdb">279121</metadata>
</match>

Last edited by MilkmanCDN; 08-20-2015 at 06:01 AM.
Reply With Quote
  #12  
Old 08-20-2015, 06:23 AM
stuckless's Avatar
stuckless stuckless is offline
SageTVaholic
 
Join Date: Oct 2007
Location: London, Ontario, Canada
Posts: 9,713
Quote:
Originally Posted by MilkmanCDN View Post
Thanks for the response. I tried adding a matcher as you suggested, but it didn't seem to import properly. What do the '/' symbols do? Are they used to comment out a piece of the title (the year in this case) to make it easier for BMT to match?

If so, why would I comment out the leading bracket, but not the trailing? Shouldn't it be something like this?


Code:
<match>
    <regex>[\\/]The Flash \(2014)\[\\/]</regex>
    <metadata type="TV" name="tvdb">279121</metadata>
</match>

So, in a regular expression \ is an escape character, that basically means the next charact that follows the \ is the literal character that I want to match on.

so, if you have a Windows path, like,
Code:
\Vidoes\TV\The Flash (2014)\s01e01.ts
What we want to say, in a regular expression is treat everything in a directory, "The Flash (2014)" as being tvdb id 279121. So the mather will get the entire path with the directory separators, and it will then try to match it. One problem is that brackets () are another regex command, so they need to be escaped. so (2014) is \(2014\) (you are missing that trailing one.

The other problem, is that on windows the directory separator is \ which as I said, is a special character in regex, so if want to match on a directory "\The Flash (2014)\" then we need to escape the \, so they become, "\\The Flash (2014)\\", and we also need to ecape the brackets, so it becomes "\\The Flash \(2014\)\\". That will match "\The Flash (2014)\" in any Windows environment. If all we care about is windows, then you are done.

Now, not everyone runs Windows (like myself), and on Linux and Mac, the directory separator is a forward slash, so, on linux the path would be something like

Code:
/Videos/TV/The Flash (2014)/s01e01.ts
So, in a reqular expression, you are provide a group of characters to match on using the square brackets []. so, [\\/] means match ANY of \ or /. Now, we have a regular expression that works on Windows, Mac, and Linux, and the full expression would be...

Code:
[\\/]The Flash \(2014\)[\\/]
Which translated to english, reads something like this...

Match a directory separator, either \ or /, followed by the text, The Flash , followed by a literal open bracket, followed by the numbers 2014, followed by the literal close bracket, followed by another directory separator, either \ or /.

This maybe more of an explanation than you wanted, but that's what all symboloy is doing here.

So, please note, in your regex [\\/]The Flash \(2014)\[\\/] you are missing the \ in front of the ending bracket, and it has a very different meaning, in fact, as is, it would not be a valid regex.
Reply With Quote
  #13  
Old 08-24-2015, 08:33 AM
MilkmanCDN's Avatar
MilkmanCDN MilkmanCDN is offline
Sage Advanced User
 
Join Date: Oct 2005
Posts: 88
Got it! Thanks.

One last question. If there are sub-directories (such as for seasons), will the matcher catch all the episodes within that sub-directory?
Reply With Quote
  #14  
Old 08-24-2015, 09:30 AM
stuckless's Avatar
stuckless stuckless is offline
SageTVaholic
 
Join Date: Oct 2007
Location: London, Ontario, Canada
Posts: 9,713
Quote:
Originally Posted by MilkmanCDN View Post
Got it! Thanks.

One last question. If there are sub-directories (such as for seasons), will the matcher catch all the episodes within that sub-directory?
Yes it will, basically it's matching on any part of the directory in which the file resides. So if the actual file is somewhere deeper in a Season folder, it will still match.
Reply With Quote
  #15  
Old 08-28-2015, 07:06 AM
wayner wayner is offline
SageTVaholic
 
Join Date: Jan 2008
Location: Toronto, ON
Posts: 7,491
Quote:
Originally Posted by stuckless View Post
So, in a reqular expression, you are provide a group of characters to match on using the square brackets []. so, [\\/] means match ANY of \ or /. Now, we have a regular expression that works on Windows, Mac, and Linux, and the full expression would be...

Code:
[\\/]The Flash \(2014\)[\\/]
Which translated to english, reads something like this...

Match a directory separator, either \ or /, followed by the text, The Flash , followed by a literal open bracket, followed by the numbers 2014, followed by the literal close bracket, followed by another directory separator, either \ or /.

This maybe more of an explanation than you wanted, but that's what all symboloy is doing here.

So, please note, in your regex [\\/]The Flash \(2014)\[\\/] you are missing the \ in front of the ending bracket, and it has a very different meaning, in fact, as is, it would not be a valid regex.
Oy vey - regex and Maxwell's Equations are two things that I will go to my grave without understanding...
__________________
New Server - Sage9 on unRAID 2xHD-PVR, HDHR for OTA
Old Server - Sage7 on Win7Pro-i660CPU with 4.6TB, HD-PVR, HDHR OTA, HVR-1850 OTA
Clients - 2xHD-300, 8xHD-200 Extenders, Client+2xPlaceshifter and a WHS which acts as a backup Sage server
Reply With Quote
  #16  
Old 11-24-2015, 07:29 PM
MilkmanCDN's Avatar
MilkmanCDN MilkmanCDN is offline
Sage Advanced User
 
Join Date: Oct 2005
Posts: 88
Hey Guys,

Still having troubles with this. I've managed to get some of the recordings imported; however, all of the most recent imports are being tagged as 'videos'. BMT doesn't seem to be automatically tagging the shows.

Thoughts?

Is it still the same show, The Flash? When you view it in BMT does it have any metadata

It seems to be all shows now. When I view them in BMT, they don't have metadata. I do have a lot of video files (1000's) and I wonder if this could be a cause for concern.

Last edited by MilkmanCDN; 11-25-2015 at 05:41 PM.
Reply With Quote
  #17  
Old 12-01-2015, 01:59 PM
MilkmanCDN's Avatar
MilkmanCDN MilkmanCDN is offline
Sage Advanced User
 
Join Date: Oct 2005
Posts: 88
Hello all,

Strangely a server reboot seems to have fixed the problem. Shows are now importing properly again.

Thanks.
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
Imports not recognized as recordings Slugger Batch Metadata Tools 2 11-05-2013 10:56 AM
Move recordings heffneil SageTV Software 25 04-14-2011 12:43 PM
TV Recordings in Import Directories are: Imports/Recordings Setting jorton SageTV Beta Test Software 4 09-04-2010 11:08 AM
Newbie - Move recordings successful, but not all moved recordings recognized echang2 SageTV Software 2 05-13-2010 10:13 PM
New FAQ for moving recordings, imports, recording dirs, etc. Opus4 SageTV Software 0 02-15-2008 03:26 PM


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


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