pyTivo Discussion Forum Forum Index pyTivo Discussion Forum
Answers and the development of pyTivo a TiVo transcoding server
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

Default SeriesID when no SeriesID in Metadata

 
Post new topic   Reply to topic    pyTivo Discussion Forum Forum Index -> Hacks
 View previous topic :: View next topic  
Author Message
JonMikelV



Joined: 22 Feb 2008
Posts: 40

PostPosted: Sun Feb 24, 2008 10:22 pm    Post subject: Default SeriesID when no SeriesID in Metadata Reply with quote

As I understand it, we can't "make our own" NPL folders because of how TiVo does it's NPL folders. We CAN, however, make a metadata file for our content and give it a SeriesID. Unfortunately, NPL will only group items in folders IF the TiVo has an item of that series ID in IT'S guide.

Based on that I tried using SH000001 (Paid Programming) in a metadata file assuming there will pretty much ALWAYS be paid programming in the guide. May basic assumption seems to have worked.

However, I'm lazy and can't be bothered to make metadata files for all my content SO - I hard coded my video/container.tmpl file so that line ~44 went from:
<SeriesId>$video.seriesId</SeriesId>

to:
<SeriesId>SH000001</SeriesId>

This forces ALL of my transferred content into my "Paid Programming" folder. Just what I wanted.

However - I know that won't be what everybody would want, so I'm wondering:
a) Should there be an option in the config (perhaps per-share) to specfiic a default seriesID
b) Where would I put code to process such a setting? I think it would go in the container.tmpl OR the video.py file - perhaps somewhere around line 344 or in the VideoDetails class. But I'm not really sure - having no Python or XML background I haven't quite sussed out the code enough.

Thoughts?

Thanks!

Jon-Mikel
Back to top
View user's profile Send private message
krkeegan
Site Admin


Joined: 04 Jan 2008
Posts: 412
Location: Los Angeles, CA

PostPosted: Sun Feb 24, 2008 10:40 pm    Post subject: Reply with quote

This is pretty easy just edit video.py around 311:

Find:
Code:
    def __metadata_full(self, full_path, tsn=''):
        metadata = {}
        metadata.update(self.__metadata_basic(full_path))


Add the following line:
Code:
    def __metadata_full(self, full_path, tsn=''):
        metadata = {}
        ##Add the following line##
        metadata['seriesId']= 'SH000001'
        metadata.update(self.__metadata_basic(full_path))


This will use the paid programing ID if there is nothing in the metadata file.

Additionally you can enter a series id in the default.txt file as well.
Back to top
View user's profile Send private message Visit poster's website
edtee



Joined: 08 Feb 2008
Posts: 19

PostPosted: Sun Feb 24, 2008 11:46 pm    Post subject: Reply with quote

Very cool. Thanks to both. Smile Will try this out tonight. Very Happy
Quote:
a) Should there be an option in the config (perhaps per-share) to specfiic a default seriesID
Also posting because this(seriesID per-share) would be a nice extention to this hack IMO. I have several large shares and keep the dir structure well organized. This function would be very usefull to help seperate my wife's stuff(share1) from all my anime, and my anime(share3-x) from the shows(share2) we both watch. She tends to transfer alot of shows at a time, and then often take over a week to watch them.
_________________
Love my Tivo, but I love the independent developer's software over the "official" stuff.
Back to top
View user's profile Send private message
JonMikelV



Joined: 22 Feb 2008
Posts: 40

PostPosted: Mon Feb 25, 2008 5:51 am    Post subject: Reply with quote

OK - so that code sets the default, then the .update method will override it if one exists, right?

I can't test right now but I assume if there's an empty SeriesID field in the metadata file it will overwrite the 'default' seriesID with an empty string.

Thanks for the code sample - I may actually understand some of this stuff yet!

Jon-Mikel
Back to top
View user's profile Send private message
JonMikelV



Joined: 22 Feb 2008
Posts: 40

PostPosted: Mon Feb 25, 2008 6:00 am    Post subject: Reply with quote

krkeegan wrote:
Additionally you can enter a series id in the default.txt file as well.


Woa - hang on a sec....what default.txt file? I must have missed a readme somewhere. I see where default.txt is referenced around 262 in video.py, but I don't see how it's used.

Am I safe to assume it's a standard metatdata formatted file that will set folder level defaults that are overwritten by individual metadata files (or the hack above)?

Thanks again for all the hand-holding...I feel like I should know better!

Jon-Mikel
Back to top
View user's profile Send private message
krkeegan
Site Admin


Joined: 04 Jan 2008
Posts: 412
Location: Los Angeles, CA

PostPosted: Mon Feb 25, 2008 9:21 am    Post subject: Reply with quote

It really isn't your fault. There are a lot of "undocumented" features that are only discussed in the forum. At some point I need to start working on the wiki more.
Back to top
View user's profile Send private message Visit poster's website
TreborPugly



Joined: 04 Jan 2008
Posts: 52

PostPosted: Mon Feb 25, 2008 2:37 pm    Post subject: Reply with quote

You can also do a search on your Tivo for a show name that resembles the name you'd like to have for the folder, and then use that. I did this to be able to have some of my transfered files show up in the Kid Zone. I found a show callled "Kid Space", and I use that show ID in a default.txt file for any folder that has stuff I'm happy for my kids to see. Then it shows up grouped in the NPL under Kid Space, and I've added the show Kid Space to my Kid Zone.

I'm planning to check for other things like "Home Movies" or "Home Vidoes" or some such as a series title, for all camcorder stuff.

Isn't it fun to trick our Tivos into giving us "videos any time, our way?" Very Happy
Back to top
View user's profile Send private message
JonMikelV



Joined: 22 Feb 2008
Posts: 40

PostPosted: Mon Feb 25, 2008 3:59 pm    Post subject: Reply with quote

TreborPugly wrote:
...it shows up grouped in the NPL under Kid Space, and I've added the show Kid Space to my Kid Zone.

That's a pretty cool way to get kid & non-kid content served to a single unit. Since I don't have two networked TiVos the [_tivo_<TSN>] feature of the .conf file wouldn't help me much, but your solution should do the trick!

Now I just need a kid or two to make it worth my while to implement.... Smile

Jon-Mikel
Back to top
View user's profile Send private message
reneg



Joined: 04 Jan 2008
Posts: 41

PostPosted: Mon Feb 25, 2008 4:53 pm    Post subject: Reply with quote

Nice idea. Try SH298935 for "Home Movies". Making our home movies accessible via Tivo is on my list of things to do.
Back to top
View user's profile Send private message
ebf



Joined: 21 Mar 2008
Posts: 60

PostPosted: Sun Mar 23, 2008 2:12 pm    Post subject: Reply with quote

So, can you have a default per share? And what, if anything, can I do to create a generic default metadata file per folder? I would like to create a generic metadata file for my big Doctor Who folder, for example, so that all of them go into a single folder on my TiVo. I know I could create a properly named, but generic data, file for each video, but much like a default per share option, I would find this useful, too.

Thanks.
Back to top
View user's profile Send private message
JonMikelV



Joined: 22 Feb 2008
Posts: 40

PostPosted: Thu Mar 27, 2008 8:50 pm    Post subject: Reply with quote

By creating a "default.txt" file in each folder you define defaults for that folder. By create <showname>.txt (eg; for Dr-Who-s01e01.avi you'd make a file called Dr-Who-s01e01.avi.txt) you create info for just that one file.

Below is a sample default file I use (with many lines commented out with "#").

Some commented out stuff includes:
seriesTitle - if I leave this in everything shows up under this instead of the description or file name
title - Not much point if my files are named with the title, especially for default.txt

Note: You can't make stuff show up in the NPL under your OWN folder names, you have to use an existing show THAT'S IN YOUR PROGRAM GUIDE. I chose show SH000001 "Paid Programming" 'cause I know it will pretty much always be in my program guide and I'm not likely to record it myself. Smile So, all my stuff from this folder gets grouped under Paid Programming.

Hope this is what you were looking for - and that it helps!

Jon-Mikel

#seriesTitle : Torchwood
#title :
description : Captain Jack and the gang save the world - again.
isEpisode : true
seriesId : SH000001
#originalAirDate : 1901-01-01T06:00:00Z
#time : 1901-01-01T06:00:00Z
#episodeNumber : 1
starRating: x5
tvRating : X0
#mpaaRating:
#movieYear :
#callsign :
#displayMajorNumber :
#displayMinorNumber :
#duration :
#showingBits :
#startTime :
#stopTime :
#vProgramGenre :
#vSeriesGenre :
vActor : Barrowman|John
vActor : Myles|Eve
vActor : Gorman|Burn
vActor : Mori|Naoko
vActor : david-Lloyd|Gareth
#vGuestStar :
#vDirector :
#vExecProducer :
#vProducer :
#vWriter :
#vHost :
#vChoreographer :
Back to top
View user's profile Send private message
ebf



Joined: 21 Mar 2008
Posts: 60

PostPosted: Fri Mar 28, 2008 6:37 am    Post subject: Reply with quote

JonMikelV wrote:
By creating a "default.txt" file in each folder you define defaults for that folder. ...
yes! This is what I was hoping. Thanks much. I know the documentation is kind of light right now for pyTiVo, but is this nugget of info listed somewhere that I missed?
Back to top
View user's profile Send private message
krkeegan
Site Admin


Joined: 04 Jan 2008
Posts: 412
Location: Los Angeles, CA

PostPosted: Fri Mar 28, 2008 8:12 am    Post subject: Reply with quote

Sorry I wasn't descriptive enough a while back.

Just a note, and it doesn't just apply to this feature, if any one finds something that they feel was not documented well enough if you could correct the wiki all of us would really appreciate it. I spend anywhere from 1-2 hours a day just answering support issues, plus additional time working on the code. Sometimes going back and adding to the documentation gets left out.
Back to top
View user's profile Send private message Visit poster's website
ebf



Joined: 21 Mar 2008
Posts: 60

PostPosted: Fri Mar 28, 2008 8:47 am    Post subject: Reply with quote

krkeegan wrote:
...I spend anywhere from 1-2 hours a day just answering support issues, plus additional time working on the code. Sometimes going back and adding to the documentation gets left out.


I appreciate all the work you guys do, both on this tool and here at this site answering questions. I know about lack of documentation-- I am very bad a that for my work, too.
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    pyTivo Discussion Forum Forum Index -> Hacks All times are GMT - 8 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You cannot attach files in this forum
You cannot download files in this forum
Site is in NO WAY affiliated with TiVo Inc

Powered by phpBB © 2001, 2005 phpBB Group
phpBB SEO
[ Time: 0.5707s ][ Queries: 13 (0.4405s) ][ Debug on ]