|
| Author |
Message |
krkeegan Site Admin

Joined: 04 Jan 2008 Posts: 458 Location: Los Angeles, CA
|
Posted: Tue Feb 19, 2008 7:50 pm Post subject: Show total items in folders and Capture Date in List |
|
|
I added a total_items function which will replace the (0) after folder names with the proper count of files in that folder.
With a video.ext file present this will display the total expected playable items.
Without a video.ext file this will display the number of cached files in that folder. If other files have been downloaded but the folder has not been loaded since the download they will not appear in this count until they are cached(when the folder is loaded).
I noticed a glitch in TiVo. It appears that folder names of a certain length will be properly truncated with the ... suffix but for some reason does not show the item count attribute. While other folders of an even longer length will show everything properly. Odd, but it is not a bug in pyTivo.
The windows installer has also been updated with all my recent changes.
More info here
Edit: Sorry I mispoke, the differences have nothing to do with precache but with the video.ext file.
Edit2: I also just added the capture date to the list. It is discussed below.
Last edited by krkeegan on Wed Feb 20, 2008 2:15 am; edited 1 time in total |
|
| Back to top |
|
 |
rfryar
Joined: 10 Feb 2008 Posts: 36
|
Posted: Wed Feb 20, 2008 12:11 am Post subject: |
|
|
Glad you were able to add this so fast. One more update I would like to suggest is to use file system date instead of today's date in the file listing screens. I have done this in my plug-in. Here is the basic idea.
You are already grabbing this date and using it in Original Air date I beleive.
originalAirDate = datetime.fromtimestamp(os.stat(full_path).st_ctime)
Now just convert it to the format listed below, then you can get the capture date format that TiVo wants:
#RECORDED_AT="20:00:00"
#RECORDED_ON="2007/11/15"
captureDate = hex(int(time.mktime(time.strptime("%s %s" % (recordedOn, recordedAt), "%Y/%m/%d %H:%M:%S"))))
Now pass this captureDate into the container template in the item details:
<CaptureDate>$video.captureDate</CaptureDate>
Now you will get the actual dates listed in the show list screen.
Rick |
|
| Back to top |
|
 |
krkeegan Site Admin

Joined: 04 Jan 2008 Posts: 458 Location: Los Angeles, CA
|
Posted: Wed Feb 20, 2008 2:20 am Post subject: |
|
|
| rfryar wrote: | <CaptureDate>$video.captureDate</CaptureDate>
Now you will get the actual dates listed in the show list screen.
Rick |
Very cool. I simplified your code a bit but basically just patched it in. I like how it looks. It definitely makes the shares seem more like normal TiVo files.
However, I don't know what the correct date to use in this field would really be. And I am sure we will get some discussion of other people's opinions.
Part of me thinks that for the most part it is pretty useless because it doesn't have a year associated with it on the screen. I have a lot of tv shows from over ten years ago and the month and day is a pretty useless piece of info without the year. But it is nice for shows that you may have just added to your files.
I can see the argument for using the originalAirDate, however even TiVo doesnt use this in this manner.
I don't know what do other people think. |
|
| Back to top |
|
 |
rfryar
Joined: 10 Feb 2008 Posts: 36
|
Posted: Wed Feb 20, 2008 3:49 am Post subject: |
|
|
Yes I am not sure why the TiVo does not use the year and it does get confusing. But at least in your code you can control how it sorts when the option is sorted by date. So at least you can sort old to new in this manner.
I suggest the file date since it is easy to modify to set to whatever the owner wants and you do not need to inspect the .txt metadata to reference it. But that is just my opinion and I agree that if we ask 100 people we will probably get 100 different answers.
But hey, at least we have that option available now.
What confuses me is why on the details screen does the original Air date not show up correctly or seem not to use the metadata passed to it? Or do they for you? On my plugin I pass a original air date but the TiVo shows todays date.. I have double and triple checked the XML and it seems the same as the XML I get from querying my TiVo directly.
Rick |
|
| Back to top |
|
 |
krkeegan Site Admin

Joined: 04 Jan 2008 Posts: 458 Location: Los Angeles, CA
|
Posted: Wed Feb 20, 2008 4:02 am Post subject: |
|
|
| rfryar wrote: | What confuses me is why on the details screen does the original Air date not show up correctly or seem not to use the metadata passed to it? | Hehe, yeah I know why that is.
If you look at the detailed info(hit the info button on the remote) you get a long list and the originalAirDate is correct in there.
The Date shown on the initial detailed info screen is always the current time. This is what is contained in the <time></time> portion of the TvBus.tmpl template.
Currently this is set to the current time because this time is used to determine where on the NPL it will appear. For example if you set it to yesterday it will appear below recordings from today, but above recordings from 2 days ago.
Having it set to the current time means it is always at the top of the list when it starts to transfer.
wmcbrine and I had a discussion about this. I think he was in favor of this being set to the file modified time. I was opposed to that idea because a lot of my file modified times are completely arbitrary. And thus that time really means nothing to me. The only other time that really makes any sense is the originalairdate time.
i still favor the current time because at least for me when I download a show onto the TiVo it is basically like I told it to record something at that exact instant and in my mind having it appear in the NPL at that spot makes the most sense.
With that said I am sure other see it differently |
|
| Back to top |
|
 |
edtee
Joined: 08 Feb 2008 Posts: 19
|
Posted: Wed Feb 20, 2008 9:04 am Post subject: |
|
|
Hi,
First off thanks to ALL the pytivo developers.
Second, sorry if this was not the best place to put this post. If so, feel free to move it to better spot. I posted here since it relates to krkeegan's latest version.
I used his installer Ver. 2008.02.19 to get folder count function described in this thread. I downloaded it for the "cool" folder count feature, and love it.
However, I did notice what may be considered a bug. I did a full uninstall of the previous version as your installer said and then installed the new version. However my service didn't properly/fully start... So after going to a command prompt in Win XP I saw an error about:
| Code: | E:\Python25\PyTivo\krkeegan>pytivo.py
Traceback (most recent call last):
File "E:\Python25\PyTivo\krkeegan\pyTivo.py", line 12, in <module>
httpd.add_container(section, settings)
File "E:\Python25\PyTivo\krkeegan\httpserver.py", line 36, in add_container
settings['content_type'] = GetPlugin(settings['type']).CONTENT_TYPE
File "E:\Python25\PyTivo\krkeegan\plugin.py", line 13, in GetPlugin
module = __import__(module_name, globals(), locals(), name)
File "E:\Python25\PyTivo\krkeegan\plugins\music\music.py", line 38, in <module
>
playlist_template = file(tpname, 'rb').read()
IOError: [Errno 2] No such file or directory: 'E:\\Python25\\PyTivo\\krkeegan\\p
lugins\\music\\templates\\m3u.tmpl' |
After reading the last line I checked and sure enough I didn't have a "m3u.tmpl" file in my \plugins\music dir. A quick trip to pytivo's git site and I grabbed one from wmcbrine's branch(another fork I've been playing with alot). Sure enough after put the file in my tree, your version worked in console and service.
So long story short I think your win installer may be missing this(m3u.tmpl) file.
I wouldn't even have noticed this, if I hadn't just decide to ditch TivoDesktop fully, for pytivo. So I needed to change my config to add "music" functions, just today. Keep up the great work, on both adding features and squashing bugs, guys. _________________ Love my Tivo, but I love the independent developer's software over the "official" stuff. |
|
| Back to top |
|
 |
krkeegan Site Admin

Joined: 04 Jan 2008 Posts: 458 Location: Los Angeles, CA
|
Posted: Wed Feb 20, 2008 6:58 pm Post subject: |
|
|
ahhh, yes that does sound like something I could have missed.
Thanks for the catch. I will fix that right now.
Edit:
==========Major Bug Fix===========
My omission in files from the windows installer was a bit more serious than just missing the m3u.tmpl. In addition I was also missing the entire photo plugin.
And it was missing the video.ext file!!
This last omission could be causing some slowness for those of you who have been using the windows installer. This goes all the way back to the first version of the installer and I recommend updating from here |
|
| Back to top |
|
 |
edtee
Joined: 08 Feb 2008 Posts: 19
|
Posted: Wed Feb 20, 2008 9:40 pm Post subject: |
|
|
| Quote: | And it was missing the video.ext file!! | Ahh! You know, now that I think back to my first time using your installer I noticed that. I just assumed that version didn't support that function yet. At that time I had 3 different forks I was trying. Sometime I'd unzip a new build over your install which would, of course, have added that file. And since then...
I've customized my "video.ext" file. So I keep a copy of the pytivo tree structure with that key file and always overwrite after an install, so I wouldn't have caught that "bug" anyway. Sorry.
However, this behavior of mine(that made me miss that bug) does lead me to a feature request for your installer. I like how you don't over-write the config file if present. Could you setup your installer/uninstaller(don't want it removing an editted "video.ext", if I choose to keep my user changed options during an uninstall) so it treated "video.ext" the same way? This would all be up to the local user's decision, of course. Maybe the installer/uninstaller could check the file for a sign of change(date,size,etc) before even asking the question. This would limit any annoyances for people who don't edit their "video.ext ". Just an idea/wish of mine, but feel free to ignore it if you feel it's not worth the time for a small subset of users. I'd rather your put your time where you feel it's most needed or best used.
Thanks for the fast, friendly reply and all your hardwork.  _________________ Love my Tivo, but I love the independent developer's software over the "official" stuff.
Last edited by edtee on Wed Feb 20, 2008 9:46 pm; edited 1 time in total |
|
| Back to top |
|
 |
wmcbrine

Joined: 04 Jan 2008 Posts: 2010 Location: Maryland
|
Posted: Wed Feb 20, 2008 9:44 pm Post subject: |
|
|
| edtee wrote: | I've customized my "video.ext" file. |
What changes did you make? _________________ My pyTivo fork . My page |
|
| Back to top |
|
 |
edtee
Joined: 08 Feb 2008 Posts: 19
|
Posted: Wed Feb 20, 2008 9:50 pm Post subject: |
|
|
No big changes. I've just gone thru and removed many of the extentions. I was getting what I'd consider false positives for video files. I don't curretnly have access to my editted file, to compare to "full" file, and give your specific examples. _________________ Love my Tivo, but I love the independent developer's software over the "official" stuff. |
|
| Back to top |
|
 |
philhu
Joined: 04 Jan 2008 Posts: 474
|
Posted: Wed Feb 20, 2008 10:02 pm Post subject: |
|
|
| wmcbrine wrote: | | edtee wrote: | I've customized my "video.ext" file. |
What changes did you make? |
Did you add krkeegan's file count/date stuff to your kit?
Also, I vote NOT to change the date to origairdat. Origrecorddate is good though. Thats how tivo does it.
I dont want my adam-12 showing 1967! |
|
| Back to top |
|
 |
wmcbrine

Joined: 04 Jan 2008 Posts: 2010 Location: Maryland
|
Posted: Wed Feb 20, 2008 10:27 pm Post subject: |
|
|
| edtee wrote: | I don't currently have access to my editted file, to compare to "full" file, and give your specific examples. |
Please do when you can. I would like to get video.ext to a state where no one has to worry about editing it... _________________ My pyTivo fork . My page |
|
| Back to top |
|
 |
krkeegan Site Admin

Joined: 04 Jan 2008 Posts: 458 Location: Los Angeles, CA
|
Posted: Thu Feb 21, 2008 2:14 am Post subject: |
|
|
| wmcbrine wrote: | | edtee wrote: | I don't currently have access to my editted file, to compare to "full" file, and give your specific examples. |
Please do when you can. I would like to get video.ext to a state where no one has to worry about editing it... |
Agree, which is why i am not treating video.ext as a configuration file. I would like to keep the windows installer as the simplest setup possible for users who are just starting out with pyTivo.
You could try setting video.ext to read-only?? in windows that might prevent the installer from removing or copying over it? I still have to test this. |
|
| Back to top |
|
 |
windracer

Joined: 04 Jan 2008 Posts: 219 Location: St. Pete, FL
|
Posted: Fri Feb 22, 2008 3:19 am Post subject: |
|
|
This is really cool, nice work!
It's great to see something other than (0) and today's date! _________________ pyTiVo on Ubuntu 11.10 (Oneiric) |
|
| Back to top |
|
 |
krkeegan Site Admin

Joined: 04 Jan 2008 Posts: 458 Location: Los Angeles, CA
|
Posted: Fri Feb 22, 2008 3:44 am Post subject: |
|
|
Agree.
I am still taking suggestions for what is best to display in the date field. |
|
| Back to top |
|
 |
|