|
| Author |
Message |
JonMikelV
Joined: 22 Feb 2008 Posts: 40
|
Posted: Sun Feb 24, 2008 10:22 pm Post subject: Default SeriesID when no SeriesID in Metadata |
|
|
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 |
|
 |
krkeegan Site Admin

Joined: 04 Jan 2008 Posts: 412 Location: Los Angeles, CA
|
Posted: Sun Feb 24, 2008 10:40 pm Post subject: |
|
|
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 |
|
 |
edtee
Joined: 08 Feb 2008 Posts: 19
|
|
| Back to top |
|
 |
JonMikelV
Joined: 22 Feb 2008 Posts: 40
|
Posted: Mon Feb 25, 2008 5:51 am Post subject: |
|
|
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 |
|
 |
JonMikelV
Joined: 22 Feb 2008 Posts: 40
|
Posted: Mon Feb 25, 2008 6:00 am Post subject: |
|
|
| 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 |
|
 |
krkeegan Site Admin

Joined: 04 Jan 2008 Posts: 412 Location: Los Angeles, CA
|
Posted: Mon Feb 25, 2008 9:21 am Post subject: |
|
|
| 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 |
|
 |
TreborPugly
Joined: 04 Jan 2008 Posts: 52
|
Posted: Mon Feb 25, 2008 2:37 pm Post subject: |
|
|
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?"  |
|
| Back to top |
|
 |
JonMikelV
Joined: 22 Feb 2008 Posts: 40
|
|
| Back to top |
|
 |
reneg
Joined: 04 Jan 2008 Posts: 40
|
Posted: Mon Feb 25, 2008 4:53 pm Post subject: |
|
|
| 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 |
|
 |
ebf
Joined: 21 Mar 2008 Posts: 47
|
Posted: Sun Mar 23, 2008 2:12 pm Post subject: |
|
|
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 |
|
 |
JonMikelV
Joined: 22 Feb 2008 Posts: 40
|
Posted: Thu Mar 27, 2008 8:50 pm Post subject: |
|
|
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. 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 |
|
 |
ebf
Joined: 21 Mar 2008 Posts: 47
|
Posted: Fri Mar 28, 2008 6:37 am Post subject: |
|
|
| 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 |
|
 |
krkeegan Site Admin

Joined: 04 Jan 2008 Posts: 412 Location: Los Angeles, CA
|
Posted: Fri Mar 28, 2008 8:12 am Post subject: |
|
|
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 |
|
 |
ebf
Joined: 21 Mar 2008 Posts: 47
|
Posted: Fri Mar 28, 2008 8:47 am Post subject: |
|
|
| 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 |
|
 |
|