SageTV Community  

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

Notices

SageTV Customizations This forums is for discussing and sharing user-created modifications for the SageTV application created by using the SageTV Studio or through the use of external plugins. Use this forum to discuss customizations for SageTV version 6 and earlier, or for the SageTV3 UI.

Reply
 
Thread Tools Search this Thread Display Modes
  #1  
Old 06-21-2007, 09:05 AM
roxy99 roxy99 is offline
Sage Expert
 
Join Date: Mar 2006
Posts: 516
Utility: automatic .my file generator

I've got a working utility that when run will scan all video directories for new avi or mpg files which do not have corresponding .my files. The utility then automatically screen scrapes from the TV.com website to generate .my files.

The only requirement is that the file name must be of the format: TVTitleName-EpisodeName.avi (.mpg)

The reason for that is that the utlity uses this info to try to match with TV.Com title and episode headings.

I'm still working out some bugs before I submit the utlity. Also I want to at the same time make a .properties generator. I need your help though.

Some questions:
  1. Can someone post a working .properties text file?
  2. Does the .properties file need to be in the SageTV directory or in the video directory where the .avi is situated?
  3. Is there 1 .properties file for each .avi file or is the .properties file like a single central configuration file for all of the .avi? If the former, then my utility will work the same way as for .my files in generating a 1-to-1 .properties file per .avi. If the latter then I'll need to modify the utility to append to the .properties central file for each new .avi file.
__________________
http://www.hydranterouge.com

Last edited by roxy99; 06-21-2007 at 09:10 AM.
Reply With Quote
  #2  
Old 06-21-2007, 09:17 AM
Opus4's Avatar
Opus4 Opus4 is offline
Administrator
 
Join Date: Sep 2003
Location: NJ
Posts: 19,624
Quote:
Originally Posted by roxy99 View Post
Can someone post a working .properties text file?
The currently valid properties are listed here. Each property must be on a single line, just like sage.properties. That post also shows a file naming example.

Quote:
Does the .properties file need to be in the SageTV directory or in the video directory where the .avi is situated?
It goes in the same place where the media file is located.

Quote:
Is there 1 .properties file for each .avi file or is the .properties file like a single central configuration file for all of the .avi?
Each media file has its own properties file, as described in the above post.

BTW: Properties files are read when media is imported, or re-imported. If the timestamp of the media file is changed, then it will be re-imported during the next library scan & the metadata properties will be read. (i.e.: you can't change just the timestamp on the properties file for an already-imported file because that won't refresh the metadata for that file.)

- Andy
__________________
SageTV Open Source v9 is available.
- Read the SageTV FAQ. Older PDF User's Guides mostly still apply: SageTV V7.0 & SageTV Studio v7.1.
- Hauppauge remote help: 1) Basics/Extending it 2) Replace it 3) Use it w/o needing focus
- HD Extenders: A) FAQs B) URC MX-700 remote setup
Note: This is a users' forum; see the Rules. For official tech support fill out a Support Request.
Reply With Quote
  #3  
Old 06-21-2007, 09:26 AM
roxy99 roxy99 is offline
Sage Expert
 
Join Date: Mar 2006
Posts: 516
Quote:
Originally Posted by Opus4 View Post
BTW: Properties files are read when media is imported, or re-imported. If the timestamp of the media file is changed, then it will be re-imported during the next library scan & the metadata properties will be read. (i.e.: you can't change just the timestamp on the properties file for an already-imported file because that won't refresh the metadata for that file.)

- Andy
Thank you Andy that's exactly what I needed to know. So logistacally my utlity can run in the same manner. I only need to make some syntactical modifications to make a .properties format file in syncronicity with the .my file.

So basically the user will have to manually re-import the video library in order to refresh the metadata. If an .avi file has already been imported once to the video library (with the refresh media content option), then by simply inserting a new .properties file into the directory will then the refresh media option automtically update the metadata?

I may have a problem with these property headings.
Quote:
Actor
Lead\ Actor
Supporting\ Actor
Actress
Lead\ Actress
Supporting\ Actress
TV.com has a list of actors for instance. What if there are 2 lead actors? Can they both go under the header Lead\ Actor?
Can I put the a list of many actors on the line for Supporting\ Actor? Will this break the search functionality?


Thanks
__________________
http://www.hydranterouge.com

Last edited by roxy99; 06-21-2007 at 09:36 AM.
Reply With Quote
  #4  
Old 06-21-2007, 09:45 AM
Opus4's Avatar
Opus4 Opus4 is offline
Administrator
 
Join Date: Sep 2003
Location: NJ
Posts: 19,624
Quote:
Originally Posted by roxy99 View Post
So basically the user will have to manually re-import the video library in order to refresh the metadata. If an .avi file has already been imported once to the video library (with the refresh media content option), then by simply inserting a new .properties file into the directory will then the refresh media option automtically update the metadata?
No, this is the opposite of what I was trying to point out -- if _only_ the metadata properties file has changed for an already-imported file, then it won't get re-imported. Scanning the lib dirs only re-imports existing files if the timestamp on the media file itself has changed.

Quote:
TV.com has a list of actors for instance. What if there are 2 lead actors? Can they both go under the header Lead\ Actor?
Can I put the a list of many actors on the line for Supporting\ Actor? Will this break the search functionality?
Just separate each name in the list with a semi-colon.

- Andy
__________________
SageTV Open Source v9 is available.
- Read the SageTV FAQ. Older PDF User's Guides mostly still apply: SageTV V7.0 & SageTV Studio v7.1.
- Hauppauge remote help: 1) Basics/Extending it 2) Replace it 3) Use it w/o needing focus
- HD Extenders: A) FAQs B) URC MX-700 remote setup
Note: This is a users' forum; see the Rules. For official tech support fill out a Support Request.
Reply With Quote
  #5  
Old 06-21-2007, 09:52 AM
roxy99 roxy99 is offline
Sage Expert
 
Join Date: Mar 2006
Posts: 516
Quote:
Originally Posted by Opus4 View Post
No, this is the opposite of what I was trying to point out -- if _only_ the metadata properties file has changed for an already-imported file, then it won't get re-imported. Scanning the lib dirs only re-imports existing files if the timestamp on the media file itself has changed.
I see. Then I'll have to make a modification to the utlity to update the .avi's time stamp at the same time as the properties file is made.

Quote:
Originally Posted by Opus4 View Post
Just separate each name in the list with a semi-colon.

- Andy
That's good news.
__________________
http://www.hydranterouge.com

Last edited by roxy99; 06-21-2007 at 09:56 AM.
Reply With Quote
  #6  
Old 06-24-2007, 10:39 AM
Halstead Halstead is offline
Sage Advanced User
 
Join Date: Jul 2005
Location: Portland, Or
Posts: 183
Quote:
Originally Posted by roxy99 View Post
I've got a working utility that when run will scan all video directories for new avi or mpg files which do not have corresponding .my files. The utility then automatically screen scrapes from the TV.com website to generate .my files.

The only requirement is that the file name must be of the format: TVTitleName-EpisodeName.avi (.mpg)

The reason for that is that the utlity uses this info to try to match with TV.Com title and episode headings.
Very exciting- if you can get this working, then we'll finally have my favorite bit of functionality from my Meedio days! I for one really hope that the .properties version works out, since that will allow searching.

In terms of parsing, will you allow any wildcards in the file name? it seems like the most popular naming schemes are:
ShowTitle-S01E01.avi
Show Title - 01x01.avi
However, some folks will just use the folder structure for season #.
__________________
Halstead York

HTPC/Server: A8 3850; Win 7 Home x86 + Java 1.6.0_26; Sage 7.1.9; Driving Epson 8500 pj @ 1080p | Office: Core2Duo E8500 w/ EFI-X running OS X 10.5 & Win 7 Pro x64 (dual boot) + Java 1.6.0_20; Sage 7.0.23; Driving 30" Samsung 1900x1200 monitor
Reply With Quote
  #7  
Old 07-03-2007, 12:19 PM
roxy99 roxy99 is offline
Sage Expert
 
Join Date: Mar 2006
Posts: 516
Quote:
Originally Posted by Halstead View Post
Very exciting- if you can get this working, then we'll finally have my favorite bit of functionality from my Meedio days! I for one really hope that the .properties version works out, since that will allow searching.

In terms of parsing, will you allow any wildcards in the file name? it seems like the most popular naming schemes are:
ShowTitle-S01E01.avi
Show Title - 01x01.avi
However, some folks will just use the folder structure for season #.
I have done some work on Regex expressions to make for an intellegient name detection schema. It'll work for all common naming conventions without any kind of customization.

The roadmap is as follows:
Stage 1: Testing of the naming detection schema-- should be completed by early next week. (that's the toughest part- the my scraper is already done)
Stage 2: My file generator- I'll release by mid month July 2007 the command line utlity that will scan video library and compare to TV.com website to scrape .my files for any new video files found in library.
Stage 3: I'll make a .my --> .properties bridge utility.
__________________
http://www.hydranterouge.com
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
After Lockup - Sage Not working wolfpackmars2 SageTV Software 3 08-05-2006 10:23 PM
Sage UI disappears during playback Keith SageTV Software 17 03-03-2006 03:31 AM
How To: In-place recompression of Sage Recordings nielm SageTV Customizations 39 02-18-2006 11:32 PM
Sage crashes rfutscher SageTV Software 0 01-23-2006 04:31 PM


All times are GMT -6. The time now is 12:34 PM.


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