PDA

View Full Version : PyTivo Video Manager HME App for pyhme


Pages : [1] 2 3

jbernardis
04-20-2011, 07:38 PM
This app has been discussed in another thread in this forum, but it was suggested that I start my own thread, and so I am.

There is no new version of the code, but I am reposting the link here (https://github.com/jbernardis/pytivo-video-manager).

In recent discussion, I learned that the HME does indeed support an HD interface. based on suggestions from wmcbrine, I have figured out how to do this and decided that it is not all that difficult to have a dual-personality app that will work in either SD or HD mode. I am currently working on it - give me a couple of weeks or so.

Obviously there are differences in screen geometry between HD and SD, and there is also additional screen real estate. I could simply increase the size of lists, etc - and that is indeed how I am starting. But in the HD version, I am trying to figure out if I can add additional information as well - such as the recently requested thumbnails.

I have to admit that when I answered the posts earlier this afternoon, I was not into it at all. But since getting home, firing up eclipse, and starting to work on the code, I got right back into the mood.

One question I have for now - does the HME simulator support HD? I can't find out how. I don't have an HD tivo near the computer. Every time I make a change, I have to walk across the house to try it out. It gets tiresome. If the sim supported HD, I could do a lot of debugging there. Also, the sim lets me see the safe areas of the screen (as pointed out by wmcbrine)

Thanks

wmcbrine
04-21-2011, 04:01 AM
The standard simulator doesn't do HD. There have been at least a couple of modified versions that do... but as I look at it, of the two I have here, one doesn't run, and the other is half-assed.

For my apps, I mostly just scaled everything up 50% (since 720/480 = 1.5), and then adjusted for the extra horizontal space.

lew
04-21-2011, 08:01 AM
I understand this is the developers thread but there doesn't seem to be a support thread. I'm not sure if there is an issue with the way I'm configured or if I'm doing something wrong.

I'm running pyTivo with the start on console batch file.

The error message on the pyTivo console says:

Cannont find accountId for TSN 652-0001-8037-XXXX The TSN is correct

Do I need to list the TSN in the configuration file for pyTivo? Doesn't seem to be an option to do so.

orangeboy
04-22-2011, 06:27 AM
FWIW, I use my TiVo names in place of the TSN.

config.ini:

[hmeserver]
apps=vidmgr

[tivos]
tivo1.name=TivoS4
tivo1.tsn=TivoS4

[pytivos]
pytivo1.config=\\dl380-server\pyTivo Production\pyTivo.conf
pytivo1.ip=DL380-Server
pytivo1.port=9033
pytivo1.sep=\

lew
04-22-2011, 08:55 AM
Thanks. Solved the problem.

jcthorne
04-25-2011, 06:39 AM
Just for the record in case anyone else has the problem, The TSN needs to be listed without the dashes in the config file. I had the same errors before trying that.

jbernardis
04-25-2011, 07:38 PM
I never even considered that dashes might be in the TSN.

I can easily parse them out when I read in the config.

BTW - The coding is essentially done on the HD version of the program. No real changes to the SD version except to try a bit more to stay in the TV safe zones. But the HD version will display thumbnails if you have them.

Just a bit more testing before I release it. Also, I need to make sure that I haven't broken the SD version.

jcthorne
04-26-2011, 03:57 AM
Great news! Looking forward to giving it a try.

arrarrgee
04-27-2011, 09:15 PM
could you tell me where to get the pytivo from? I mean i have been running stream baby and HME/VLC...and tried using the HME/VLC folder to copy vidmgr folder...but the following section turned out to be a bummer..help pls



[pytivos]
pytivo1.config=\\dl380-server\pyTivo Production\pyTivo.conf
pytivo1.ip=DL380-Server
pytivo1.port=9033
pytivo1.sep=\

[/CODE][/QUOTE]

lew
04-28-2011, 08:46 AM
I'm not enough of a tivo "geek" to have memorized my TSNs :).

I logged on to my account at tivo.com and used copy and paste to put the numbers in the configuration file. Tivo listed the number with dashes so I assumed that's the way tivo wanted the numbers.

I suggest you either parse out the - or update the readme file. Whatever is easier for you.

Looks like using our tivo name as our TSN works. Is there any reason why you don't just automatically do that and not even ask for our TSN?

jbernardis
04-28-2011, 09:31 PM
Tivo name works only by virtue of the fact that tivo mind obviously accepts it. I did not know that and do not process the tivo name in any way.

I have made the change to the code to parse out the - from the entered value. I'm sure there will be somebody who has a dash in the middle of their tivo name and won't like the fact that I do that. I am actually indifferent to it, and will remove this logic if that is what the concensus is here.

jbernardis
04-28-2011, 09:36 PM
A new version of the app is available at the same github location (https://github.com/jbernardis/pytivo-video-manager).

This version - 0.2 - supports HD. It still works on an SD tivo as well, but SD does not give you much in the way of new functionality.

New for HD is artwork - you can have a jpg for each file, or a single jpg for the folder/directory. Processing these images slows thing down a bit, but not unacceptably so. The jpg can be up to 320x444. This is a good aspect ratio for DVD case artwork which is why I chose it.

There are a couple of other new features too - see the README file.

jbernardis
04-28-2011, 09:38 PM
could you tell me where to get the pytivo from?

Look for a link in wmcbrine's signature up there in post number 2. He is the keeper of pytivo (at least one of the forks)

orangeboy
04-28-2011, 09:58 PM
A new version of the app is available at the same github location (https://github.com/jbernardis/pytivo-video-manager).

This version - 0.2 - supports HD. It still works on an SD tivo as well, but SD does not give you much in the way of new functionality.

New for HD is artwork - you can have a jpg for each file, or a single jpg for the folder/directory. Processing these images slows thing down a bit, but not unacceptably so. The jpg can be up to 320x444. This is a good aspect ratio for DVD case artwork which is why I chose it.

There are a couple of other new features too - see the README file.

Thank you! :up:

Edit: I like the exts= option. I'm converting my videos to mp4, so this will be a nice filter for natively accepted videos that don't need transcoding. Nice. :)

orangeboy
04-28-2011, 10:16 PM
Yessir, I like the artwork feature.
I renamed the existing jpg file from filename.jpg to filename.extension.jpg, but that's no problem.

Nice work jbernardis!

jcthorne
04-29-2011, 06:44 AM
Look forward to having some time this weekend to install this new version!

jbernardis
04-29-2011, 01:32 PM
Thank you everybody. Please let me know if you discover any issues. I tested it quite a bit, but it's impossible to catch everything.

Orangeboy:

What do you mean - did you change the code, or did you have to rename your files. I can add logic to also check for <filename>.jpg if <filename>.<extension>.jpg doesn't exist, but of course each file name check adds a bit to the processing time. wmcbrine also suggested I use the image attribute in the meta file, but I am presently not doing this.

orangeboy
04-29-2011, 02:04 PM
I just renamed the files. As far as adding logic, I don't think it's necessary. The current implementation follows meta data file naming conventions. Speaking of meta data, I did change some code though to increase the font size relating to meta data description. I bumped up from 16 (or was it 20?) to 24. It made it a little easier to read in HD mode.

Edit: What's an image attribute in the meta file? I usually go by this wiki: http://pytivo.sourceforge.net/wiki/index.php/Metadata, but didn't see "image" included.

jbernardis
04-29-2011, 03:23 PM
Yeah - I'm not too happy with the fonts as they currently exist. I wish there was a way to enumerate the fonts so that I could choose something better - who knows, maybe there is. I have some videos that have long descriptions that fill up the view with the small font I have in place now, but it's not so much the size that bothers me - I can see staircasing and other artifacts in there. It doesn't look like a nicely scalable font, and at the size I have chosen, the quality is not great.

jcthorne
04-29-2011, 05:13 PM
Just installed, updated a directory of covers to the file name and size requirements and viola!

WOW.

SUPER!

Very nice work indeed. I plan to do a bit of customizing of the design elements to fit our decor and theater theme. I already got thumbgen configured to generate the requred thumnail cover images, going to work on getting it to generate .txt files with meta data.

This is great. THANKS!

tomm1079
04-29-2011, 09:31 PM
What exactly is this program? I am trying to figure it out by reading this thread but it doesnt tell alot.

jbernardis
04-29-2011, 10:28 PM
What exactly is this program? I am trying to figure it out by reading this thread but it doesnt tell alot.

pytivo provides the ability to "push" videos to your tivo through its web interface rather than going to your tivo and "pulling" them. The advantage to pushing is that if the file is in a compatible format (basically mp4 with H.264 video encoding and either AC3 or AAC audio encoding) the file is transfered as is without transcoding. This saves considerable time and space. The problem is that pushing can only be done from your PC.

With this app, you can request pushes from the tivo interface (hence from the TV with your peanut remote control). You are presented with the same directory structure that pytivo knows about. You select which videos you want, and then request that that video be pushed to your tivo. While I was at it, I also added the ability to delete videos since pytivo doesn't have that capability natively.

innocentfreak
04-30-2011, 01:15 PM
Hmm sounds interesting. I have never set up HME though so I guess I should play with that first.

lew
04-30-2011, 10:19 PM
I'm using MetaGenerator V2. It displays a copy of the DVD cover and a picture for most TV series. Does anyone know if there is a way to save the image so it can be used with PyTivo Video Manager?

I'm not sure if MetaGenerator is open source. Doesn't look like it's been updated recently.

jbernardis
04-30-2011, 10:51 PM
I'm using MetaGenerator V2. It displays a copy of the DVD cover and a picture for most TV series. Does anyone know if there is a way to save the image so it can be used with PyTivo Video Manager?

I'm not sure if MetaGenerator is open source. Doesn't look like it's been updated recently.

Metagenerator did not do it for me - the images seemed too small.

I was able to get most of my images from amazon.com. Where they didn't adhere to the 320x444 size, I used irfanview to resize them while maintaining aspect ratio - simple.

jcthorne
05-01-2011, 06:10 AM
Try a utility called thumbgen. It will web scrape images from many sources including amazon, netflix, imdb and tvdb. It will also automaticly resize the image to your specs. It does alot more but I have not figured out how to format its metadata into pytivo compatible format yet.

innocentfreak
05-01-2011, 08:51 AM
Hmm I must have set something up wrong. It shows up on my TiVo but I am getting an error in the window.

----------------------------------------
Exception happened during processing of request from ('192.168.1.2', 54672)
Traceback (most recent call last):
File "C:\Python26\lib\SocketServer.py", line 560, in process_request_thread
self.finish_request(request, client_address)
File "C:\Python26\lib\SocketServer.py", line 322, in finish_request
self.RequestHandlerClass(request, client_address, self)
File "C:\PyHME\start.py", line 141, in __init__
client_address, server)
File "C:\Python26\lib\SocketServer.py", line 617, in __init__
self.handle()
File "C:\Python26\lib\BaseHTTPServer.py", line 329, in handle
self.handle_one_request()
File "C:\Python26\lib\BaseHTTPServer.py", line 323, in handle_one_request
method()
File "C:\PyHME\start.py", line 232, in do_GET
self._page(True)
File "C:\PyHME\start.py", line 186, in _page
appinst.mainloop()
File "C:\PyHME\hme.py", line 1139, in mainloop
while self.active and self.get_event():
File "C:\PyHME\hme.py", line 1280, in get_event
self.set_resolution(handle())
File "C:\PyHME\vidmgr\__init__.py", line 95, in handle_resolution
self.snd('bonk')
AttributeError: Vidmgr instance has no attribute 'snd'
----------------------------------------

jbernardis
05-01-2011, 02:04 PM
Hmm I must have set something up wrong. It shows up on my TiVo but I am getting an error in the window.


First of all - this is a typo. 'snd' should be 'sound' I will post that fix shortly, but you can change the line if you want to move on.

The interesting thing, though, is that you should not even be executing this line. This only executes if your optimal resolution (i.e the contents of self.resolutions[0]) does not have a horizontal resolution of 640 (SD) or 1280 (HD).

I wrote my code by reverse engineering my series 3 Tivos. I don't know what other resolutions are out there. If there is some way that you could give me the contents of this array, it would help me greatly. You could put the following print statement at the beginning of the handle_resolution routine:

print self.resolutions

you will also need some way to capture the output. If you run interactively from a command window, the output will appear in that window and you can cut and paste it here. Then maybe I could be a bit more defensive in my code - perhaps choose an alternate resolution from the array.

innocentfreak
05-01-2011, 02:20 PM
Like I said, my config maybe off so it might just be due to a bad config. I have never tried to use PyHME prior to this.

My knowledge is very limited so I will try to help as much as I can.

I am assuming you are talking about below in _init_.py in the vidmgr folder?

class Vidmgr(Application):
def handle_resolution(self):
""" Choose the 'optimal' resolution. """
if (self.resolutions[0][0] == 640):
self.res = RES_SD
elif (self.resolutions[0][0] == 1280):
self.res = RES_HD
else:
self.active = False
self.snd('bonk')

return self.resolutions[0]

Where would I insert the print line, assuming I am in the correct section?

EDIT:Got this, not sure if this is what you are looking for
[(720, 480, 10, 11), (1280, 720, 3, 4), (704, 480, 10, 11), (640, 480, 1, 1)]

jbernardis
05-01-2011, 02:32 PM
OK - there is a new version in the repository.

I made the simple snd -> sound change identified by innocentfreak, but I also changed the handle_resolutions routine to scan through the self.resolutons array for the first resolutions that has a horizontal resolution of 640 or 1280. Prior to this, it was blindly taking the first entry in the array.

I don't know what resolutions were in the array in innocentfreak's case, but at a minimum, this new logic will AT LEAST find the SD resolution and operate in that mode.

The only file that changed from the prior version was vidmgr/__init__.py.

Jeff

jbernardis
05-01-2011, 02:35 PM
Like I said, my config maybe off so it might just be due to a bad config. I have never tried to use PyHME prior to this.

My knowledge is very limited so I will try to help as much as I can.

I am assuming you are talking about below in _init_.py in the vidmgr folder?

class Vidmgr(Application):
def handle_resolution(self):
""" Choose the 'optimal' resolution. """
if (self.resolutions[0][0] == 640):
self.res = RES_SD
elif (self.resolutions[0][0] == 1280):
self.res = RES_HD
else:
self.active = False
self.snd('bonk')

return self.resolutions[0]

Where would I insert the print line, assuming I am in the correct section?

You would need to add the print statement immediately before if(self.resolutions[0][0] == 640):
It would also need to be indented using tabs to the same depth as the if statement (this is my ONLY complaint with python - indentation defines program structure)

jbernardis
05-01-2011, 02:40 PM
EDIT:Got this, not sure if this is what you are looking for
[(720, 480, 10, 11), (1280, 720, 3, 4), (704, 480, 10, 11), (640, 480, 1, 1)]

This line is what I'm looking for. So your optimal resolution is 720x480.

With my new logic, it will choose the second entry and operate in 1280x720 resolution.

I'm not sure what the 3 and 4 are - I think they define the pixel aspect ratio, and I'm also thinking that since it is not 1:1 (like it is in my case) that things might be slightly distorted???? If so, it probably wouldn't effect the text too much - the only thing that might be obvious would be the artwork.

innocentfreak
05-01-2011, 02:53 PM
Cool that seems to have fixed it so that I can access the shares. Most of my image files come from theTVDB.com along with the metadata.

I was scrolling through a show testing it and got this error.

Exception happened during processing of request from ('192.168.1.2', 42946)
Traceback (most recent call last):
File "C:\Python26\lib\SocketServer.py", line 560, in process_request_thread
self.finish_request(request, client_address)
File "C:\Python26\lib\SocketServer.py", line 322, in finish_request
self.RequestHandlerClass(request, client_address, self)
File "C:\PyHME\start.py", line 141, in __init__
client_address, server)
File "C:\Python26\lib\SocketServer.py", line 617, in __init__
self.handle()
File "C:\Python26\lib\BaseHTTPServer.py", line 329, in handle
self.handle_one_request()
File "C:\Python26\lib\BaseHTTPServer.py", line 323, in handle_one_request
method()
File "C:\PyHME\start.py", line 232, in do_GET
self._page(True)
File "C:\PyHME\start.py", line 186, in _page
appinst.mainloop()
File "C:\PyHME\hme.py", line 1139, in mainloop
while self.active and self.get_event():
File "C:\PyHME\hme.py", line 1192, in get_event
handle(keynum, rawcode)
File "C:\PyHME\vidmgr\__init__.py", line 182, in handle_key_press
self.handle_key_pressList(keynum, rawcode)
File "C:\PyHME\vidmgr\__init__.py", line 286, in handle_key_pressList
self.drawScreen()
File "C:\PyHME\vidmgr\__init__.py", line 519, in drawScreen
self.drawScreenDetail()
File "C:\PyHME\vidmgr\__init__.py", line 661, in drawScreenDetail
flags=RSRC_TEXT_WRAP + RSRC_HALIGN_LEFT + RSRC_VALIGN_TOP)
File "C:\PyHME\hme.py", line 1033, in set_text
self.set_resource(Text(self.app, message, font, color, colornum), flags)
File "C:\PyHME\hme.py", line 713, in __init__
self.put(_CMD_RSRC_ADD_TEXT, 'iis', font.id, color.id, text)
File "C:\PyHME\hme.py", line 553, in put
_pack('ii' + format, cmd, self.id, *params))
File "C:\PyHME\hme.py", line 506, in _pack
return ''.join([func[i](value) for i, value in zip(format, values)])
File "C:\PyHME\hme.py", line 466, in _pack_string
return _pack_vdata(value.encode('utf-8'))
UnicodeDecodeError: 'ascii' codec can't decode byte 0xc3 in position 196: ordina
l not in range(128)

jbernardis
05-01-2011, 03:06 PM
The issue is that you have a non-ascii character in your description - not sure which file it is, but one of the meta files has a non-ascii character in the description field.

You can explore that angle of it while I see if there is some way I can be more defensive in my code.

innocentfreak
05-01-2011, 03:18 PM
This appears to be the file.

seriesTitle : 30 Rock
title : Dealbreakers Talk Show #0001
episodeTitle : Dealbreakers Talk Show #0001
originalAirDate : 2009-12-03T20:30:00Z
time : OAD
description : The tables are turned when production begins on Liz's new talk show, "Dealbreakers," and she experiences what its like to walk a mile in Jenna's shoes. Jack, dealing with pressure from Devin, calculates to make "Dealbreakers" a success. Meanwhile, Tracy takes on the ultimate Hollywood challenge in order to prove his commitment to his wife. Everyone pitches in to help Tracy reach his goal including Kenneth, Dotcom and Grizz.
isEpisode : true
seriesId : SH79488
episodeNumber : 407
vProgramGenre : Comedy
vSeriesGenre : Comedy
vDirector : Don Scardino
vWriter : Kay Cannon
vActor : Alec Baldwin
vActor : Tina Fey
vActor : Tracy Morgan
vActor : Scott Adsit
vActor : Jack McBrayer
vActor : Jane Krakowski
vActor : Keith Powell
vActor : Katrina Bowden
vActor : Judah Friedlander
vActor : Kevin Brown
vActor : Maulik Pancholy
vActor : Lonny Ross
vActor : Grizz Chapman

jbernardis
05-01-2011, 03:31 PM
innocentfreak,

I'm attaching a new version of metadata.py (you will need to rename the file from metadata.txt to metadata.py). Replace the same named file in the pyhme directory (one dir above vidmgr) and see if it solves your problem. If so, I will commit the change and update the repository.

Jeff

innocentfreak
05-01-2011, 03:39 PM
Yeah that worked. Thanks, sorry I tend to break things in testing and find the odd results, ask Orangebuy :)

jbernardis
05-01-2011, 03:50 PM
No problem - I asked that people test it - I'd rather have working software associated with my name.

The repository will be updated in the next 10 minutes.

innocentfreak
05-01-2011, 04:07 PM
Quick question is there any way to customize the font size? I find on my plasma the show descriptions are pretty tiny and wouldn't mind being able to make the show names larger also. Of course this may interfere with the images though.

Also my format is laid out tvshows/series name/season#/episodes
Is there a way to display show art when I am at the series name folder? I can't think of a way but thought I would throw it out there in case.

wmcbrine
05-01-2011, 06:11 PM
I'm not sure what the 3 and 4 are - I think they define the pixel aspect ratioYes. See here about resolutions:

http://www.tivocommunity.com/tivo-vb/showthread.php?t=385669

I hadn't seen 720x480 come up before, but I haven't looked at these in a while.

lew
05-02-2011, 07:48 AM
Try a utility called thumbgen. It will web scrape images from many sources including amazon, netflix, imdb and tvdb. It will also automaticly resize the image to your specs. It does alot more but I have not figured out how to format its metadata into pytivo compatible format yet.

Thanks for the suggestion.

jbernardis--Thanks for sharing your work. Great tool. I may go back to the SD version. The font size is too small for me to read on a 42" LCD. I suspect you have better eyesight then some of us.:)

innocentfreak
05-02-2011, 08:05 AM
Ok glad it wasn't just me with the font size.

jcthorne
05-02-2011, 12:27 PM
If you go into the .py file, the font sizes and colors are easily adjusted. Jbernardis did a great job of documenting the code throughout.

Any one here want to tackle a project converting meta data in an xml or ifo file to a pytivo compatible .txt file? I'd like to get the data from thumbgen to the tivo but not sure where to start with this.

wmcbrine
05-02-2011, 03:14 PM
Well, "xml" isn't a format -- you'll have to be more specific. jbernardis' metadata.py is borrowed from pyTivo, although he's trimmed it down. My version already supported importing data from TiVo-style XML (two different kinds just for that), as well as EyeTV (which uses plists, which use XML). But I assume none of those are what you want.

"ifo", I'm not even sure what you mean. There are .IFO files that come as part of a DVD structure, but they don't contain (this kind of) metadata. And then I see ".nfo" files, but those seem to be plain text in no fixed format.

jbernardis
05-02-2011, 06:22 PM
Version 0.2c is now in the repository. A new option has been added to the config.ini file.

descsize=<size of the font for descriptive text>

For example

descsize=20


If omitted, it will default to its present value of 16.

BTW - I don't think my 54 year old eyes are any better than anyone elses :) - I chose the 16 point font because I needed it to fit the larger descriptions on screen.

Also note - if you choose a large font, the image will not be overwritten. The description view does NOT overlap the view for the image. What this means is that is the descriptive font is too large for the text, the text will simply be truncated.

innocentfreak
05-02-2011, 07:01 PM
I am guessing this will only change the episode summary and not the size of the episode name or series name?

jbernardis
05-02-2011, 07:08 PM
I am guessing this will only change the episode summary and not the size of the episode name or series name?

Correct - only the description field.

jcthorne
05-03-2011, 08:35 AM
Well, "xml" isn't a format -- you'll have to be more specific. jbernardis' metadata.py is borrowed from pyTivo, although he's trimmed it down. My version already supported importing data from TiVo-style XML (two different kinds just for that), as well as EyeTV (which uses plists, which use XML). But I assume none of those are what you want.

"ifo", I'm not even sure what you mean. There are .IFO files that come as part of a DVD structure, but they don't contain (this kind of) metadata. And then I see ".nfo" files, but those seem to be plain text in no fixed format.

I should have been more specific. I will try and attach an .nfo file generated by thumbgen here for example. Since thumbgen webscrapes the data and images for both movies and tv shows and is actively being developed, being able to use this data for tivo would prove useful.

<?xml version="1.0" encoding="utf-8"?>
<movie xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" ThumbGen="1">
<hasrighttoleftdirection>false</hasrighttoleftdirection>
<title>Avatar</title>
<originaltitle>Avatar</originaltitle>
<year>2009</year>
<plot>Disabled Marine Jake Sully travels to planet Pandora to become an avatar, ingratiate himself with the natives and help Americans mine lucrative unobtainium. But he finds himself in an interstellar conflict after falling for Na'vi warrior Neytiri.</plot>
<filename>Avatar.1080p.2009.mp4</filename>
<tagline>Enter the World of Pandora</tagline>
<metascore>84</metascore>
<rating>8.2</rating>
<homepage>http://www.avatarmovie.com/</homepage>
<episodes />
<episodesnames />
<writers />
<gueststars />
<id>tt0499549</id>
<releasedate>18.12.2009</releasedate>
<mpaa>Rated PG-13 for intense epic battle sequences and warfare, sensuality, language and some smoking. (also special edition)</mpaa>
<actor>
<name>Sam Worthington</name>
<name>Zoe Saldana</name>
<name>Sigourney Weaver</name>
<name>Stephen Lang</name>
<name>Michelle Rodriguez</name>
<name>Joel Moore</name>
<name>Giovanni Ribisi</name>
<name>CCH Pounder</name>
<name>Laz Alonso</name>
<name>Wes Studi</name>
<name>Dileep Rao</name>
<name>Matt Gerald</name>
<name>Dean Knowsley</name>
</actor>
<genre>
<name>Action</name>
<name>Adventure</name>
<name>Science Fiction</name>
<name>Romance</name>
</genre>
<director>
<name>James Cameron</name>
</director>
<runtime>162</runtime>
<certification>PG-13</certification>
<studio>
<name>20th Century Fox</name>
</studio>
<country>
<name>United Kingdom</name>
<name>United States of America</name>
</country>
<cover>
<name>http://cf1.imgobject.com/posters/88c/4cc481d15e73d6778400188c/avatar-original.jpg</name>
<name>http://cf1.imgobject.com/posters/374/4bd29ddd017a3c63e8000374/avatar-original.jpg</name>
<name>http://cf1.imgobject.com/posters/351/4bed3468017a3c37ac000351/avatar-original.jpg</name>
<name>http://cf1.imgobject.com/posters/a32/4bc95853017a3c57fe027a32/avatar-original.jpg</name>
<name>http://cf1.imgobject.com/posters/284/4c60d0215e73d63460000284/avatar-original.jpg</name>
<name>http://cf1.imgobject.com/posters/a5a/4bc95859017a3c57fe027a5a/avatar-original.jpg</name>
<name>http://cf1.imgobject.com/posters/730/4d4075c67b9aa15bab002730/avatar-original.jpg</name>
<name>http://cf1.imgobject.com/posters/8f4/4d376aac5e73d6334f00d8f4/avatar-original.jpg</name>
<name>http://cf1.imgobject.com/posters/1a5/4c6b23605e73d65f7e0001a5/avatar-original.jpg</name>
<name>http://cf1.imgobject.com/posters/277/4bd29e03017a3c63eb000277/avatar-original.jpg</name>
<name>http://cf1.imgobject.com/posters/3d2/4bd2b01b017a3c63f50003d2/avatar-original.jpg</name>
<name>http://cf1.imgobject.com/posters/255/4bdda594017a3c20c3000255/avatar-original.jpg</name>
<name>http://cf1.imgobject.com/posters/32f/4cb1bc627b9aa1263f00032f/avatar-original.jpg</name>
<name>http://cf1.imgobject.com/posters/a3c/4bc95853017a3c57fe027a3c/avatar-original.jpg</name>
<name>http://cf1.imgobject.com/posters/673/4d78c5ef7b9aa157b4000673/avatar-original.jpg</name>
<name>http://cf1.imgobject.com/posters/0cf/4bedd282017a3c45930000cf/avatar-original.jpg</name>
<name>http://cf1.imgobject.com/posters/a64/4bc9585d017a3c57fe027a64/avatar-original.jpg</name>
<name>http://cf1.imgobject.com/posters/04b/4bedd253017a3c458900004b/avatar-original.jpg</name>
<name>http://cf1.imgobject.com/posters/527/4ce2dd595e73d60f71000527/avatar-original.jpg</name>
<name>http://cf1.imgobject.com/posters/a50/4bc95858017a3c57fe027a50/avatar-original.jpg</name>
<name>http://cf1.imgobject.com/posters/a5f/4bc9585a017a3c57fe027a5f/avatar-original.jpg</name>
<name>http://cf1.imgobject.com/posters/5d8/4ce453967b9aa168b00005d8/avatar-original.jpg</name>
<name>http://cf1.imgobject.com/posters/a55/4bc95859017a3c57fe027a55/avatar-original.jpg</name>
<name>http://cf1.imgobject.com/posters/a4b/4bc95858017a3c57fe027a4b/avatar-original.jpg</name>
<name>http://cf1.imgobject.com/posters/a46/4bc95857017a3c57fe027a46/avatar-original.jpg</name>
<name>http://cf1.imgobject.com/posters/097/4c41ccc25e73d60f3b000097/avatar-original.jpg</name>
<name>http://cf1.imgobject.com/posters/2e2/4d7cf7365e73d651740022e2/avatar-original.jpg</name>
</cover>
<backdrop>
<name>http://cf1.imgobject.com/backdrops/a2e/4bc95852017a3c57fe027a2e/avatar-original.jpg</name>
<name>http://cf1.imgobject.com/backdrops/a0e/4bc95848017a3c57fe027a0e/avatar-original.jpg</name>
<name>http://cf1.imgobject.com/backdrops/20e/4bd1e35c017a3c63ea00020e/avatar-original.jpg</name>
<name>http://cf1.imgobject.com/backdrops/2e7/4bd9de08017a3c1c090002e7/avatar-original.jpg</name>
<name>http://cf1.imgobject.com/backdrops/9ee/4bc95842017a3c57fe0279ee/avatar-original.jpg</name>
<name>http://cf1.imgobject.com/backdrops/a16/4bc9584c017a3c57fe027a16/avatar-original.jpg</name>
<name>http://cf1.imgobject.com/backdrops/a26/4bc9584e017a3c57fe027a26/avatar-original.jpg</name>
<name>http://cf1.imgobject.com/backdrops/a2a/4bc9584f017a3c57fe027a2a/avatar-original.jpg</name>
<name>http://cf1.imgobject.com/backdrops/0e1/4bdd0e91017a3c20c30000e1/avatar-original.jpg</name>
<name>http://cf1.imgobject.com/backdrops/a1a/4bc9584d017a3c57fe027a1a/avatar-original.jpg</name>
<name>http://cf1.imgobject.com/backdrops/9ea/4bc9583e017a3c57fe0279ea/avatar-original.jpg</name>
<name>http://cf1.imgobject.com/backdrops/042/4bd5c1c4017a3c658a000042/avatar-original.jpg</name>
<name>http://cf1.imgobject.com/backdrops/9f2/4bc95842017a3c57fe0279f2/avatar-original.jpg</name>
<name>http://cf1.imgobject.com/backdrops/a02/4bc95846017a3c57fe027a02/avatar-original.jpg</name>
<name>http://cf1.imgobject.com/backdrops/9f6/4bc95844017a3c57fe0279f6/avatar-original.jpg</name>
<name>http://cf1.imgobject.com/backdrops/348/4bd9dcff017a3c1bfb000348/avatar-original.jpg</name>
<name>http://cf1.imgobject.com/backdrops/ff8/4d29a7e25e73d626b0002ff8/avatar-original.jpg</name>
<name>http://cf1.imgobject.com/backdrops/a1e/4bc9584d017a3c57fe027a1e/avatar-original.jpg</name>
<name>http://cf1.imgobject.com/backdrops/a22/4bc9584e017a3c57fe027a22/avatar-original.jpg</name>
<name>http://cf1.imgobject.com/backdrops/a12/4bc9584c017a3c57fe027a12/avatar-original.jpg</name>
<name>http://cf1.imgobject.com/backdrops/9fa/4bc95845017a3c57fe0279fa/avatar-original.jpg</name>
<name>http://cf1.imgobject.com/backdrops/800/4cf54d7b5e73d6299e000800/avatar-original.jpg</name>
<name>http://cf1.imgobject.com/backdrops/74d/4cf54e065e73d6299900074d/avatar-original.jpg</name>
<name>http://cf1.imgobject.com/backdrops/9fe/4bc95846017a3c57fe0279fe/avatar-original.jpg</name>
<name>http://cf1.imgobject.com/backdrops/833/4cf54e325e73d6299a000833/avatar-original.jpg</name>
<name>http://cf1.imgobject.com/backdrops/84f/4cf54e425e73d6299b00084f/avatar-original.jpg</name>
<name>http://cf1.imgobject.com/backdrops/754/4cf54e555e73d62999000754/avatar-original.jpg</name>
</backdrop>
<mediainfo>
<Resolution>
<Flag>Resolution_1080p</Flag>
</Resolution>
<resolution>1080P</resolution>
<Format>
<Flag>Format_Mpeg</Flag>
</Format>
<format>mpeg4</format>
<Video>
<Flag>Video_H264</Flag>
</Video>
<video>avc</video>
<Audio>
<Flag>Audio_DolbyDigital</Flag>
</Audio>
<audio>DD51</audio>
<Subtitles>
<Flag>Unknown</Flag>
</Subtitles>
<SubtitlesText>Unknown</SubtitlesText>
<framerate>23.976</framerate>
<aspectratio>16:9</aspectratio>
<videoresolution>1920x1080</videoresolution>
<videocodec>AVC</videocodec>
<videobitrate>8 Mbps</videobitrate>
<audiocodec>AC-3</audiocodec>
<audiochannels>6</audiochannels>
<audiobitrate>448 Kbps</audiobitrate>
<durationseconds>9701</durationseconds>
<durationminutes>161</durationminutes>
<duration>2h 41m</duration>
<filesizebytes>10444713701</filesizebytes>
<filesize>9.73 GB</filesize>
<container>MPEG-4</container>
<language>English</language>
<languagecode>en</languagecode>
<languages>English</languages>
<languagecodes>en</languagecodes>
<externalsubtitles />
</mediainfo>
</movie>



Just FYI, the author of Thumbgen just messaged me and has agreed to look at adding direct support of pyTivo metadata .txt files to the program. I sent him a link to the wiki site http://pytivo.sourceforge.net/wiki/index.php/Metadata
and an example of one of my files.

windracer
05-08-2011, 05:25 PM
Is there an option in config.ini to hide directories? For pyTivo, I use the .meta subfolder to keep all the metadata files. pyTiVo hides this folder but vidmgr does not.

jbernardis
05-08-2011, 06:08 PM
Is there an option in config.ini to hide directories? For pyTivo, I use the .meta subfolder to keep all the metadata files. pyTiVo hides this folder but vidmgr does not.

This capability doesn't exist now, but theres no reason I couldn't implement it. Let me think about how it should be designed.

One question - should I ignore all directories below the meta directory? I knew this isn't the way meta directories are used, but it's a possibility my logic needs to consider. Initially my thought is to eliminate any directory that has a node named meta somewhere in the path name beneath the rout.

windracer
05-08-2011, 06:13 PM
Initially my thought is to eliminate any directory that has a node named meta somewhere in the path name beneath the root.
Or just hide any subdirectory that starts with a period?

wmcbrine
05-08-2011, 09:30 PM
Yes, a leading period is the Unix convention for hidden files and directories, which is why pyTivo uses it. It pays no special attention to "meta". You probably want the same behavior as pyTivo, since this is a front-end for it.

if f.startswith('.'):
continue

jbernardis
05-08-2011, 10:26 PM
Ok - version 0.2d is now available at github (https://github.com/jbernardis/pytivo-video-manager). The only change is to ignore directories that start with a period ala the unix convention.

windracer
05-09-2011, 07:22 AM
Great, thanks!

rrr22777
05-09-2011, 01:12 PM
Does this do HD Photos? I am keeping Tivo Desktop running in a VM just for the HD photos.

jcthorne
05-10-2011, 06:59 AM
vidmgr does not but pytivo does.

wmcbrine
05-10-2011, 12:06 PM
Does this do HD Photos? I am keeping Tivo Desktop running in a VM just for the HD photos.What you can do is to rip the HD Photos app out of TiVo Desktop -- it's in Java, and will run on Linux, Mac, etc. -- and use pyTivo as the backend for it, instead of TD. See here. (http://www.tivocommunity.com/tivo-vb/showthread.php?t=346901)

Alternatively, if all you want is a slide show, you can use the "Pictures" sample app from the HME for Python package.

windracer
05-14-2011, 12:16 PM
I already got thumbgen configured to generate the requred thumnail cover images, going to work on getting it to generate .txt files with meta data.
I've been digging around trying to find this on the pyTivo and streambaby wikis, but how do you add the cover art to the metadata files? What's the syntax/format?

jbernardis
05-14-2011, 07:08 PM
I've been digging around trying to find this on the pyTivo and streambaby wikis, but how do you add the cover art to the metadata files? What's the syntax/format?

I don't know about pytivo and/or streambaby, but I don't use the metadata file to find the thumbnail. I simply look for a file name following a specific rule.

windracer
05-14-2011, 09:30 PM
Doh, right there in your readme. :o I'll check it out, thanks!

windracer
05-16-2011, 09:48 AM
Ok, I got thumbnail images working ... as long as the files are in the same directory as the videos. Any chance on allowing them in the .meta directory with the metadata files? I tried moving them in there but then they don't show up.

jbernardis
05-16-2011, 12:23 PM
Ok, I got thumbnail images working ... as long as the files are in the same directory as the videos. Any chance on allowing them in the .meta directory with the metadata files? I tried moving them in there but then they don't show up.

Shouldn't be too difficult. If I get a chance, I'll look at it when I get home tonight. Two or three days at the most

jbernardis
05-16-2011, 08:08 PM
Version 0.2e is now available at github - see my signature for a link.

This version supports artwork in the .meta subdirectory. Search order for thumbnail art:
1) <fn>.jpg
2) .meta/<fn>.jpg
3) folder.jpg
4) .meta/folder.jpg

I didn't really put this through the paces - it was a very easy change. Please let me know if I screwed something up.

windracer
05-16-2011, 08:47 PM
Hmmm ... not working for me. They show up in the normal folder, but not when in the .meta folder. Any type of debugging or logging I can enable?

jbernardis
05-17-2011, 03:47 PM
Let me try a few things tonight - like I said I didn't put it through the paces so maybe I overlooked something.

Sorry about that

jbernardis
05-17-2011, 05:13 PM
OK - it was a stupid mistake. Version 0.2f properly implements the artwork feature. This time I actually did some testing.

windracer
05-17-2011, 09:45 PM
Yup, that did it. Thanks!! :up:

jbernardis
05-18-2011, 09:31 PM
I had to deliver another fix. I closed up two holes - both having to do with video deletion. 1) if the meta file was in the .meta directory it was not being deleted, and 2) the artwork file, regardless of what directory it was in, was not being deleted.

These have been fixed. Follow the link in my signature to get the update.

windracer
05-20-2011, 08:55 AM
I gave ThumbGen a try and managed to get it to automatically download the thumbnails for my movies and drop them, correctly named, in each .meta folder of my video library. I had to do some minor cleanup where it picked the foreign language image (for whatever reason) other than that it worked pretty well.

Pretty neat. :up:

windracer
05-20-2011, 05:27 PM
Two quick things:

- in the README.TXT, there's a typo:

The view into which this graphic is placed is 320 pixels wide by 44 pixels high. If your graphic exceeds those dimensions it will be cropped.

I think that should be 444, not 44?

- any reason why vidmgr is hiding .TiVo files? I added it to my exts= line in config.ini but they don't show up. They do appear in pyTivo.

jbernardis
05-20-2011, 05:34 PM
Two quick things:

- in the README.TXT, there's a typo:



I think that should be 444, not 44?

- any reason why vidmgr is hiding .TiVo files? I added it to my exts= line in config.ini but they don't show up. They do appear in pyTivo.

You are correct. I will fix the readme. Sorry if this caused an issue for you.

I updated git, but did not change the version number.

jbernardis
05-20-2011, 05:42 PM
Didn't see your second question - no reason to hide the .tivo files. I just don't have any in my collection so I never included them. They should show up if you include them in the exts line. This is the line that does this check:

if os.path.splitext(name)[1].lower() in goodexts:

so in other words, the file extension is forced to lower case and compared with what you have in your exts. Do you have mixed case in your config file? Try it with all lower case and see if that works. I can also just force both of them to lower.

This is one of those things that is difficult between Windows (which is not case sensitive for file names) and linux (which is). No matter which way I choose, somebody isn't happy.

Let me know if that was your issue.

windracer
05-20-2011, 06:31 PM
Yep, that was it. I'm on Linux so I put .TiVo in my config.file. Changed that to just .tivo and they show up now. Thanks!

jcthorne
05-23-2011, 07:10 AM
I gave ThumbGen a try and managed to get it to automatically download the thumbnails for my movies and drop them, correctly named, in each .meta folder of my video library. I had to do some minor cleanup where it picked the foreign language image (for whatever reason) other than that it worked pretty well.

Pretty neat. :up:

Could you take a look at the .nfo and .tgmd files it generates and see if it might be possible to parse out the pytivo metadata .txt file from the info they contain?

windracer
05-23-2011, 08:22 AM
I turned off all the metadata stuff and was using it just for thumbnails. The moviescreens it could generate were pretty neat, though. To bad we can't use those with vidmgr!

If I get a chance, I'll see if I can check those files ...

reneg
05-23-2011, 10:01 AM
Loaded this app up yesterday, and it's pretty nice. Thanks for making it available.

I ran into a problem with directory/share traversal. I have lots of pyTivo shares defined (>30) and when I navigate to shares on the second and subsequent pages for directories/shares, and then enter a directory (share), the files within that share are wrong, they typical display files from shares that would be on the first page. It's like the offsets are off.

Just curious how others deal with displaying TV series. I prefer chronological sort of <series>.sXXeYY, so alpha sorting on title doesn't work for me.

innocentfreak
05-23-2011, 10:06 AM
Loaded this app up yesterday, and it's pretty nice. Thanks for making it available.

I ran into a problem with directory/share traversal. I have lots of pyTivo shares defined (>30) and when I navigate to shares on the second and subsequent pages for directories/shares, and then enter a directory (share), the files within that share are wrong, they typical display files from shares that would be on the first page. It's like the offsets are off.

Just curious how others deal with displaying TV series. I prefer chronological sort of <series>.sXXeYY, so alpha sorting on title doesn't work for me.

My TV series are in a folder labeled TV Shows. Then seperate folders per series. Then in each series folder I have a folder for every season. This is just how the program I use organizes my content though.

As a result all of my listings are just alphabetical. The episodes seem to be in order by episode number though.

jbernardis
05-23-2011, 12:52 PM
I do something similar to innocentfreak. I have a single share and under that I have folders for TV, Movies, Podcasts, Sports, and Home Movies. And then under these, I organize. For example, under Movies, I have 8 or 9 genre, and under TV, I have a folder for each show title (and under that I have a folder for each season). I have the episode number - and sometimes the season number - as the first part of the file name and as the first part of the title in the metafile. That way they sort into episode order in pytivo and windows, as well as on my PS3. I find this organization works well for me.

Reneg - could you explain a little better about the issue you are seeing where it is displaying the wrong thing? I wouldn't be surprised if there was a bug or two lurking in there somewhere, but I need to know the exact curcumstances under which it occurs if I'm going to fix it.

It almost sounds, from your explanation, that you have shares within shares.

reneg
05-23-2011, 02:15 PM
I do something similar to innocentfreak. I have a single share and under that I have folders for TV, Movies, Podcasts, Sports, and Home Movies. And then under these, I organize. For example, under Movies, I have 8 or 9 genre, and under TV, I have a folder for each show title (and under that I have a folder for each season). I have the episode number - and sometimes the season number - as the first part of the file name and as the first part of the title in the metafile. That way they sort into episode order in pytivo and windows, as well as on my PS3. I find this organization works well for me.

Reneg - could you explain a little better about the issue you are seeing where it is displaying the wrong thing? I wouldn't be surprised if there was a bug or two lurking in there somewhere, but I need to know the exact curcumstances under which it occurs if I'm going to fix it.

It almost sounds, from your explanation, that you have shares within shares.

My directory structure is flat. I have one share per TV series, and under each share is all the episodes of that series. I have enough shares that I have to scroll down to see them all. I think to recreate, it was as simple as scrolling down twice and selecting a directory. For example, scrolling down to the Modern Family share, I would get episodes to Big Bang Theory displayed. I'll verify the steps when I get home tonight. It behaved the same on a Tivo HD & a Premiere.

[Edit] If I scroll down one page on the shares screen and select a directory, it pulls the episodes from the first entry on the previous page. For each position I move down on the second page of shares, it pulls the episodes from the first page. Second row, second page pulls second row, first page. Third row, second page pulls third row, first page. First row, third page pulls first row, first page. etc..

txporter
05-24-2011, 10:45 AM
I just started playing around with this. Very cool! My wife would love to be able to push from the Tivo rather than having me push from the browser interface.

How would I go about changing the sorting order to be based on filename rather than metadata? Or how about only using the metadata Title rather than seriesTitle:Title? My files are all jumbled up with alphabetical sorting right now.

If I want to use the HD menu on vidmgr, do I need to actually be using the HD menu on my Tivo or can a resolution change be forced in the application?

jcthorne
05-24-2011, 11:09 AM
Yes it would be very helpful if there was a way to display episode numbers and sort in the correct order for tv shows. Short of editing each metadata file to add episode numbers to the titles, could it sort by episode number if its present and then by file name? ( I am more asking for discussion than resolution just yet as I am not sure the best way to go, just that tv series do not currently show the episode numbers nor sort in order. Open to suggestion here on how best to do this or use the tool.)

txporter
05-24-2011, 11:19 AM
Yeah, I agree. I have a mod'd version of pytivometathis that adds the episode number before the title, so my metadata looks like this:
seriesTitle : Torchwood
title : Everything Changes
episodeTitle : 101-Everything Changes
originalAirDate : 2006-10-22T00:00:00Z
description : WPC Gwen Cooper is at the scene of a brutal murder, when the "special ops," known only as Torchwood, arrive. After witnessing the group bring the dead man back to life, Gwen goes in pursuit of this mysterious organisation, only to see weirder things than she could ever imagine existed. Soon after, she begins to regret giving in to her curiosity, when she meets Captain Jack Harkness.
isEpisode : true
seriesId : SH947230
episodeNumber : 101
vProgramGenre : Action and Adventure
vProgramGenre : Drama
vProgramGenre : Science-Fiction
vSeriesGenre : Action and Adventure
vSeriesGenre : Drama
vSeriesGenre : Science-Fiction
vDirector : Brian Kelly
vWriter : Russell T. Davies
vGuestStar : Paul Kasey
vGuestStar : Mark Heal
vGuestStar : Gary Shepheard
vGuestStar : Gwilym Havard Davies
vGuestStar : Cathryn Davies
vGuestStar : Jams Thomas
vGuestStar : Dion Davis
vGuestStar : Gwyn Vaughan-Jones
vGuestStar : Jason May
vGuestStar : Tom Price
vGuestStar : Guy Lewis
vGuestStar : Rhys Swinburn
vGuestStar : Olwen Medi
vActor : John Barrowman
vActor : Eve Myles
vActor : Gareth David-Lloyd
vActor : Naoko Mori
vActor : Burn Gorman

I have trouble reading through python code since I am not a programmer, but what I wrote before is not correct. I think it was displaying title:episodeTitle whereas I would like it to just be episodeTitle or to sort by filename.

jcthorne
05-24-2011, 11:28 AM
I never had much luck with pytivometathis and stuck with metagenerator. My metadata files only have episode data in the episodeNumber field. And in the file name but the file names are not all consistant from one tv series to the next. Although and alpha sort of the file name or episodeNumber either one would work in my case.

I think perhaps would like to see video manager display the episode number and sort for it for items with isEpisode = true. That might work in both cases?

Just noticed another difference between metagenerator data and yours from pytivometathis. for metagenerator, title and seriestitle are the same, only episode title contains the episode title information.

txporter
05-24-2011, 11:45 AM
Yes, metagenerator and pytivometathis do have different information in the different fields. I used to use metagenerator (and still do in the times when pytivometathis cannot grab the show correctly), which makes the alphabetical jumble even worse.

I transcode all of my own shows, which makes the filename consist at least for me. That would be my preferred approach (which I believe is what pytivo does??). I think sorting by episodenumber might also work like you say. Not sure what my Movies folder would look like exactly...but that is sort of a mess anyhow. I have both .mpg and .mp4 files in that folder and pytivo currently sorts those lists separately (.mp4 sorted alphabetically first and then .mpg listed alphabetically). Dunno.

jbernardis
05-24-2011, 02:56 PM
When I originally wrote this program, I was developing based on my own library which consists mostly of movies - no episode numbers there. However, I can see where this can be useful. I just want to find out how it should be done. I have to write my program to be general. I can't say I want to sort on episode numbers because that does not indicate what should happen to those files that do not have an episode number, or what about those files that don't even have a metafile?

Here's what I presently do:

1) If I have episode title and series title, then the string seriestitle:episodetitle is the key.
2) If I only have episode title it is the key
3) If I only have series title it is the key
4) Otherwise the filename is the key.

Once I've determined the key for everything, I sort into key order putting directories first.

I can certainly add an option to sort on file name only beacuse that is a universal attribute. The question is how and where to consider the episode number. It probably makes sense to consider the episode number OR the episode name, but not both. SO I would propose adding two entries to the front of the above list

-1) If I have episode number and series title, the the string series title:episode number is the key.
0) If I only have the episode number, then it is the key.

and then the above list. I can add an option to ignore the episode number too, to keep with the original algorithm

This will create screwy things if the meta data is weird and you have some that have an episode number and some that don't for example. Garbage in - garbage out.

There is another potential issue here: episode number is not always a numeric value. I've seen things like E01, or even S01E07. I don't think I want to parse this string to get the numeric values, so I'd like to treat it as a string. The problem with this is that "10" sorts before "2" which of course is not what you want. People would have to enter their episode numbers with a consistent length (e.g. 01, 02, 03, ... if there are more than 9).

Would this suffice? Let me know. I'm probably not going to get to this until after Memorial Day, but this will give us a few days to better define the scope.

txporter
05-24-2011, 03:15 PM
I like your list and the ability to ignore episode number with a setting.

How hard is it to add a setting for what metadata string to display on the Tivo? I organize most everything by series (I have a bunch of folders based on series name) since most of what we watch are TV shows rather than movies. I would prefer to set something so that I only see the episodeTitle for videos that have 'isEpisode : true' and only title for everything else.

Then a similar setting could be made for sorting. Sort based on filenames or metadata.

Thanks for your work! This is a really cool piece of software. I currently never pull anything with pytivo anymore. I only navigate to my shares when I want to look to see what is available. I then log in with my iphone to push the episodes that I want to watch. This shortcuts all of that. Very nice.

jbernardis
05-24-2011, 06:05 PM
I'm glad it turned out useful. My original purpose was just to explore the HME and hopefullly provide an example that others might benefit from. I think that wmcbrine has done us all a big favor by porting all of this to python. It really provides a nice application development environment.

jbernardis
05-24-2011, 06:09 PM
I can certainly think about alternate display formats. Right now the sort value and the display text are basically the same thing. I was thinking I'd have to separate these two to have the various sort options, and if I'm going to separate them, it shouldn't prove too tough to have alternatives for display. Again, I'll think on it for a few days while I'm at the shore; we'll probably have something towards the middle to end of next week. I want to explore reneg's issue too - that has be perplexed right now, so I've got to do some debugging there.

reneg
05-24-2011, 07:39 PM
I think you can check the force_alpha option from the pyTivo.conf file which is a per share option (see get_files in plugin.py). Ideally, I'd like to see episodeTitle & episodeNumber displayed if possible. I make a one line change in the pytivo template to display filename instead of title since my filenames contain SxxExx data so I don't have to drill down another level to see episode number data.

Streambaby has an option, sort.filename=true

reneg
05-24-2011, 08:08 PM
I want to explore reneg's issue too - that has be perplexed right now, so I've got to do some debugging there.

Maybe this will help, I put a few prints. I hit the channel down key once, and then pressed the select key on the top entry on the second page. I think the problem is in drawScreenList.

C:\pyhme>c:\python26\python start.py
HME Server for Python 0.19
Not using Zeroconf:
Tue May 24 20:07:06 2011 Server Starts
192.168.1.92:51674 - - [24/May/2011 20:07:24] "GET /vidmgr/icon.png HTTP/1.0" 20
0 -
192.168.1.92:51752 - - [24/May/2011 20:07:36] "GET /vidmgr/ HTTP/1.1" 200 -
192.168.1.92:51752 - - [24/May/2011 20:07:36] Starting HME: vidmgr
Enter pressShares: shareSelection = 0 shareOffset = 0
Exit pressShares: shareSelection = 0 shareOffset = 12
Enter pressShares: shareSelection = 0 shareOffset = 12
Enter drawScreenList: shareSelection = 0 shareOffset = 12
Exit pressShares: shareSelection = 0 shareOffset = 12
Enter pressShares: shareSelection = 0 shareOffset = 12
Exit pressShares: shareSelection = 0 shareOffset = 12
192.168.1.92:51752 - - [24/May/2011 20:08:28] Ending HME: vidmgr
192.168.1.92:51756 - - [24/May/2011 20:08:29] "GET /vidmgr/icon.png HTTP/1.0" 20
0 -

jbernardis
05-24-2011, 08:50 PM
Reneg:

I figured it out and it is a simple 1 line fix. The problem is, that I am also making major changes to the program to allow for various display and sorting options. I don't want to deliver these yet because 1) I am not quite finished, and 2) I want to do a LOT of testing before I deliver.

In the meantime, you can make the fix yourself if you are comfortable with it. In the createListing subroutine, a few lines below the cmplist routine, you will see a line like this:
root = self.share[self.shareSelection]['path']
change this to

root = self.share[self.shareSelection+self.shareOffset]['path']


Be careful not to change indentation and you should be in business.

I will be delivering this in a few days.

reneg
05-24-2011, 09:24 PM
Thanks. That fixed the listings, but the sub-title needs a tweak too in drawScreenList:

self.SubTitleView.set_text(self.share[self.shareSelection]['name'] + ":" + self.currentDir,
font=self.fonts.fnt20,
colornum=0xffffff, flags=RSRC_VALIGN_BOTTOM)

to

self.SubTitleView.set_text(self.share[self.shareOffset+self.shareSelection]['name'] + ":" + self.currentDir,
font=self.fonts.fnt20,
colornum=0xffffff, flags=RSRC_VALIGN_BOTTOM)

jbernardis
05-24-2011, 09:52 PM
You're absolutely right - thanks for finding this.

But that's not the only other place - two places at the beginning of DelVideo, and the two places where pushVideo is called from need the same fix.

Damn - I'd like to deliver this instead of just telling you to just make these changes, but I have made significant other changes to the code for the other requests and I can't release it at this time.

All I can say at this point is I will try to get this out by Wednesday, Thursday at the latest. In the meantime all I can tell the community at large is that this is only an issue if you have more than 1 page of shares. If this is your situation, you don't need to make any changes - wait for the update.

reneg
05-24-2011, 10:07 PM
No rush, I can wait.

I do have a feature request to consider. Could you check for a background image in each directory as you navigate into it and load it if there is one present? For TV series, I think I'd rather have one background image of the series vs an image for each episode.

jbernardis
05-25-2011, 08:35 AM
You can already do that - if you have a file named folder.jpg - either in the same directory with the files or in a .meta subdirectory, then it will use that. Of course of you have an image file for a specific video, it will use THAT before using the folder file.

jbernardis
05-25-2011, 08:39 AM
Alright - I worked on this sooner that I had planned because I wanted to get the fix out there. I haven't released it yet, but I want to hear people's thoughts.

With the new logic, you can specify two new options in the config.ini file, display= and sort=

sort controls how the video files are sorted. If it is omitted or is given a value of "normal" then the present mechanism will be used. To be specific, it is as follows:

title:episodetitle
episodetitle
title
filename


If you specify 'fileonly' then only the filename is used

If you specify 'episodenumber' then the above list is preceded by

title:episodenumber
episodenumber



For display, if you specify 'fileonly; then only the file name is displayed

if you specify 'episodetitle' then the following list is used:

episodetitle
title
filename


if you specify 'episodenumname' then the following list is used:

episodenumber - episodetitle
episodetitle
title
filename


otherwise, the algorithm of today is used:

title:episodetitle
episodetitle
title
filename



The lists all show the order of processing. I start at the top of the list. If I do not have ALL of the meta items to build that string, I move down to the next entry in the list.

reneg
05-25-2011, 10:12 AM
You can already do that - if you have a file named folder.jpg - either in the same directory with the files or in a .meta subdirectory, then it will use that. Of course of you have an image file for a specific video, it will use THAT before using the folder file.

Oops, there it is right in the readme.

Your sorting & display options seem flexible enough. Will try them when it's available

jcthorne
05-25-2011, 12:46 PM
Alright - I worked on this sooner that I had planned because I wanted to get the fix out there. I haven't released it yet, but I want to hear people's thoughts.

.

You have been busy! WOW. The options presented surely cover what I need and sounds like most of the others. This is great. Look forward to the update!

orangeboy
05-26-2011, 07:18 AM
Sure - I'll make it available, but I'm not quite done yet. Also, I'm not crazy about the idea of providing support for the code, so it would most likely be on an as-provided basis...

I'm glad to see that it appears you've changed your perspective a bit since starting this project! Thank you for making this available! :up:

windracer
05-26-2011, 07:26 AM
I'm willing to beta test the sorting changes as well. Most of my episodic videos filenames are using the SxxExx nomenclature so they sort "alphabetically" in episode order (using force_alpha = true in pyTivo.conf).

jbernardis
05-26-2011, 08:04 AM
Thanks windracer - and yes I changed my perspective. I'm a software developer by profession, and there's nothing worse that the pressure I feel when there is a field issue and the customer is waiting (sometimes impatiently) for a fix. I just didn't want that feeling to permeate a hobby.

Instead, what I find is that everyone has been tremendously supportive and it has actually turned somewhat gratifying to accommodate their wants.

With that said, version 0.3 of vidmgr is available at git (follow the link in my signature).

With this fix:
1) I think I fully fixed the problem reported by reneg,
2) I added sort option to the config.ini file
sort=file will sort on the file name only
sort=episodenumber will sort on the episode number
if omitted or set to 'normal' it will use today's sort method of 'title:episodetitle'
3) I added the display option to config.ini:
display=file will show the file name only
display=eptitle will show the episode title only
display=epnumtitle will show the combination of ep number and title
if omitted or set to 'normal' it will use today's method of 'title:episdoetitle'

Note that for the last two new options, if the indicated meta data is missing, the program will move on to the title, and ultimately the filename, in order to have something to display/sort.

I have to put in a caveat here - I DID do some testing, but I don't have all of the testing rigs that you guys have so I am relying on you to help me identify any bugs.

windracer
05-26-2011, 09:59 AM
Instead, what I find is that everyone has been tremendously supportive and it has actually turned somewhat gratifying to accommodate their wants.
We're here for ya! :up:

jcthorne
05-26-2011, 02:10 PM
Too Cool. Installed and had the wife try it. (if there is a bug, she will fall right into it)

Works for me as discribed. GREAT. Thanks.

One minor I ran into from your post above. The setting is:
display=episodenumtitle
as stated in your readme not
display=epnumtitle
as posted above.

Once I fixed that, it worked as intended.

I'll drive it a bit further when I get home tonight but looks great from here. (installed remotely during my lunch hour and tried it out via sling...)

jbernardis
05-26-2011, 02:14 PM
Thanks for the input - I'm glad it's holding up for you and hope it continues to do so.

reneg
05-26-2011, 10:04 PM
Works great, thanks for the update.

At first I thought there was a bug in the display sorting, but I discovered some metadata issues with some of my older files. Title keyword had been set to the same as EpisodeTitle. Changing Title to SeriesTitle fixed the display sorting.

windracer
05-27-2011, 09:01 AM
The sorting is definitely cool. Since episodenumtitle is a character sort, it's not that useful to me (episode 6 appears after 11) but since all of my episodic filenames are in SxxEyy format, using the file sort with just episodetitle for the display works great.

One thing I noticed is that vidmgr doesn't show the metadata for .TiVo files like pyTivo does (using tdcat (http://pytivo.sourceforge.net/forum/tdcat-support-display-info-from-tivo-files-t896.html)). I guess I just need to generate separate metadata files for those I keep in .TiVo format.

txporter
05-27-2011, 11:46 AM
The changes sound excellent! I will give them a whirl this weekend. Thanks for your speedy updates!

reneg
05-27-2011, 10:40 PM
The sorting is definitely cool. Since episodenumtitle is a character sort, it's not that useful to me (episode 6 appears after 11) but since all of my episodic filenames are in SxxEyy format, using the file sort with just episodetitle for the display works great.

My episode numbers are formatted by season & episode <s><ee>. I did have to zero pad a series than ran for more than 10 seasons in order to get it to show up the way I wanted.

1) I did run across a minor bug. Vidmgr crashed when it encountered the following filename and metadata file for House.S03E06-Que Será Será.avi. I worked around it by renaming to House.S03E06-Que Sera Sera.avi. What's interesting is that both pyTivo & Streambaby handle the filename and metadata ok. Here is the traceback from the crash:
----------------------------------------
Exception happened during processing of request from ('192.168.1.92', 56379)
Traceback (most recent call last):
File "c:\python26\lib\SocketServer.py", line 558, in process_request_thread
self.finish_request(request, client_address)
File "c:\python26\lib\SocketServer.py", line 320, in finish_request
self.RequestHandlerClass(request, client_address, self)
File "start.py", line 141, in __init__
client_address, server)
File "c:\python26\lib\SocketServer.py", line 615, in __init__
self.handle()
File "c:\python26\lib\BaseHTTPServer.py", line 329, in handle
self.handle_one_request()
File "c:\python26\lib\BaseHTTPServer.py", line 323, in handle_one_request
method()
File "start.py", line 232, in do_GET
self._page(True)
File "start.py", line 186, in _page
appinst.mainloop()
File "C:\pyhme\hme.py", line 1139, in mainloop
while self.active and self.get_event():
File "C:\pyhme\hme.py", line 1192, in get_event
handle(keynum, rawcode)
File "C:\pyhme\vidmgr\__init__.py", line 223, in handle_key_press
self.handle_key_pressShares(keynum, rawcode)
File "C:\pyhme\vidmgr\__init__.py", line 387, in handle_key_pressShares
self.createListing()
File "C:\pyhme\vidmgr\__init__.py", line 1069, in createListing
meta = metadata.from_text(fullpath)
File "C:\pyhme\metadata.py", line 60, in from_text
path, name = os.path.split(unicode(full_path, 'utf-8'))
UnicodeDecodeError: 'utf8' codec can't decode bytes in position 49-51: invalid d
ata
----------------------------------------

2) Out of habit, I use the clear key when I want to delete something. Hitting the clear key under vidmgr exits vidmgr. I wouldn't mind if it initiated a delete, but could it at least just boink instead of exit?

3) Please consider making the 2nd part of the advance key work like it does on tivo. The first part works great, it takes you to the end of the list. The second part of the advance key is that when you are at the bottom of a list and hit the advance key, it takes you to the top of the list.

Really liking this program.

txporter
05-28-2011, 01:32 PM
Showed it to my wife last night. She was impressed. Thanks for the nice code! I really like the sorting and display title options. Just what I was looking for.

dcrowell77
05-28-2011, 03:01 PM
Cool program! One minor feature request - it would be nice if there was some sort of visual acknowledgement that you sent a push successfully. I was playing around with it muted (someone was taking a nap) and I couldn't tell that the program actually accepted my button press.

Thanks for the work!

txporter
05-28-2011, 03:14 PM
It does. It says something along the lines of 'Queued for Push to (Tivoname)'.

dcrowell77
05-28-2011, 08:44 PM
It does. It says something along the lines of 'Queued for Push to (Tivoname)'.

Odd... I didn't see any such message. Though I did see something when it got an error.

And speaking of errors... I got an error message (it said error from pytivo) trying to push files to my TiVoHD box. The same files worked fine on my Series 2. Interestingly, the pushes actually worked just fine. I couldn't see any errors on the pyTiVo console. I'm wondering if there might be a timing issue or something throwing things off (or maybe I just have an old version of pytivo). The files in question happened to be mp4 files that were transferable without transcoding to my TiVoHD.

jbernardis
05-28-2011, 11:00 PM
It does say 'queued for push to tivoname', but basically all I'm doing here is some simple parsing of the returne message I get back from pytivo, There might be some set of circumstances I didn't anticipate. If you DO get an error message, please get me the exact wording and I can see if I can reproduce it.

I will look at the two issues reneg reported when I get back home on Tuesday - the file naming issue and the clear key. Regarding the second hitting of the advance key, I didn't realize that it did that on the tivo (and I've been using them for 11 years). I programmed the instant replay button to do just that, but I ought to be able to add the logic you're looking for for the advance key too.

orangeboy
05-29-2011, 10:09 AM
I have installed a user defined Service for HME for Python (hosting the pyTivo Video Manager app) using Windows Resource Kit tools: "Instsrv.exe" and "Srvany.exe", and Window's native command: Regedit.exe. Be sure to read the footnotes!

Install a basic Service using Instsrv.exe and Srvany.exe, using the syntax "Instsrv.exe <Service Name> "<Full path to Srvany.exe>"¹:

Start > Run > Instsrv.exe HME-Python "C:\path\exes\srvany.exe"


Use Regedit.exe to define Srvany.exe application parameters:

Start > Run > Regedit

Navigate to HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\HME-Python

Right-click in the right window pane > New > Key

Name the new Key²: Parameters

Select the Parameters Key in the left window pane

Right-click in the right window pane > New > String Value

Name the new REG_SZ string²: Application

Right-click the new Application string > Modify

Enter the path to Python.exe, followed by the path to Start.py³:
"C:\Python26\python.exe" "D:\Program Files\HME Python\start.py"

Close Regedit


All the parts should be in place for the new Service. Now just need to start it:

Start > Run > Services.msc

Find "HME-Python" in the list of Services

Right-click HME-Python > Start


There may be third party apps that make this process a whole lot easier, but I had the Resource Kit Tools already installed, so I used what I had available. You can get both Instsrv.exe and Srvany.exe by themselves in a .zip file here (http://www.tacktech.com/display.cfm?ttid=197) if you didn't want to get the full-blown ResKit Tools. SC.exe is another tool that can configure Windows Services, adding dependencies, changing Display Name, and adding Account information (if needed).

Footnotes:
¹Both Instsrv.exe and Srvany.exe are found in my %path%, but Instsrv.exe requires the full path to the executable in it's options. You will have to specify the path to Instsrv.exe if it is not found in the %path% search order.

²Both "Parameters" and "Application" are required registry entries for Srvany.exe, and may be case sensitive.

³Your path to Python.exe and Start.py will have to be adjusted accordingly.

lrhorer
05-30-2011, 12:20 PM
lrhorer, I think you want this thread (http://www.tivocommunity.com/tivo-vb/showthread.php?t=468466).
Um, OK. I'm writing the /etc/init.d startup script for pyhme and updating the one for pyTiVo to better meet the standards established for System V scripts. Is there a need (considering vidmgr or any other utility) to restart pyhme if pyTiVo is hard restarted?

jbernardis
05-30-2011, 05:50 PM
It depends on the reason for the restart. The only actual interface between vidmgr and pytivo is the pytivo http interface - I post requests there to push a video. My program doesn't know the status of the pytivo daemon - it just sends a message there and hope it gets a response.

So the bottom line is that if nothing has changed in the pytivo config, then no vidmgr restart is necessary. If, on the other hand, pytivo is suddenly listening to a different port or if additional shares are created (for example), then vidmgr will need to reread its configuration, and perhaps the best/easiest way to do that will be to restart the process.

jbernardis
05-30-2011, 06:29 PM
I did run across a minor bug. Vidmgr crashed when it encountered the following filename and metadata file for House.S03E06-Que Será Será.avi. I worked around it by renaming to House.S03E06-Que Sera Sera.avi. What's interesting is that both pyTivo & Streambaby handle the filename and metadata ok.

Reneg:

I'm not quite sure why this works for you in pytivo. I don't know about streambaby, but the metadata.py file you include in your trace above borrows heavily from the metadata.py file that is part of pytivo, and in fact the line in question is verbatim from pytivo (or at least the version I'm using - perhaps it's old).

The problem is that it is trying to convert the filename to a unicode string with utf-8 encoding and the filename contains characters that do not conform to that spec. I'm not sure why I'd want to do this because the filenames I am using are, in fact, file names I have read off of the disk itself. It seems to me I should be using the filenames verbatim (as I said - I did not write the metadata file - it was "derived" from pytivo).

I'm going to try just removing the unicode calls on this (and one other) line of code to see what happens.

ajayabb
05-30-2011, 08:17 PM
Odd... I didn't see any such message. Though I did see something when it got an error.

And speaking of errors... I got an error message (it said error from pytivo) trying to push files to my TiVoHD box. The same files worked fine on my Series 2. Interestingly, the pushes actually worked just fine. I couldn't see any errors on the pyTiVo console. I'm wondering if there might be a timing issue or something throwing things off (or maybe I just have an old version of pytivo). The files in question happened to be mp4 files that were transferable without transcoding to my TiVoHD.
I got the same error message "Pytivo Push error" with an h.264 mp4 file. The file still transferred but I also wonder if it was a timing issue.

jbernardis
05-30-2011, 08:49 PM
I got the same error message "Pytivo Push error" with an h.264 mp4 file. The file still transferred but I also wonder if it was a timing issue.

When you use the pytivo web interface and push a video, what does the resultant web page look like? Mine looks like this:


Queued for Push to Master Bedroom

/Movies/Family/Disney/Shorts/Day and Night.mp4

The page will reload in 5 seconds.


vidmgr basically uses the same HTTP interface to make its push request, and then literally looks for the string 'queue' in a case insensitive manner in the response. If it finds 1 or more occurrences, it assumes that the push went OK. Otherwise it gives the above generic error message.

Perhaps you are using an different version of pytivo where the wording is different? Try it with a browser and let me know what you get. I can perhaps make the code accept additional text to indicate a success.

wmcbrine
05-30-2011, 11:29 PM
The problem is that it is trying to convert the filename to a unicode string with utf-8 encoding and the filename contains characters that do not conform to that spec. I'm not sure why I'd want to do this because the filenames I am using are, in fact, file names I have read off of the disk itself. It seems to me I should be using the filenames verbatimThe HME protocol only speaks UTF-8 (or ASCII, which is a proper subset of UTF-8). It's not meaningful to say "using the filenames verbatim" -- verbatim in what character set? In Windows, that's usually Windows-1252 (a minor variant of Latin-1), if you're using the 8-bit APIs. Throw that at the TiVo, and it will barf.

pyTivo mostly uses Unicode APIs -- except, for certain things, in Windows -- but uses UTF-8 internally to save memory.

jbernardis
05-31-2011, 08:08 AM
The HME protocol only speaks UTF-8 (or ASCII, which is a proper subset of UTF-8). It's not meaningful to say "using the filenames verbatim" -- verbatim in what character set? In Windows, that's usually Windows-1252 (a minor variant of Latin-1), if you're using the 8-bit APIs. Throw that at the TiVo, and it will barf.

pyTivo mostly uses Unicode APIs -- except, for certain things, in Windows -- but uses UTF-8 internally to save memory.

SO I guess there's nothing to do with this filename except manually change it like the original poster did. I should also probably put a try block around the unicode call. All of this begs the question, then, about the OP saying this file worked for him in pytivo. How did pytivo handle it if the filename violates the TiVo specs?

wmcbrine
05-31-2011, 10:15 AM
SO I guess there's nothing to do with this filename except manually change it like the original poster did.What? No, no, no. Either read it with a Unicode call -- in Python, you do this by passing a Unicode path to os.listdir(), for example -- or else recognize the 8-bit character set that's being used, or just assume it, and convert appropriately.

dcrowell77
05-31-2011, 08:13 PM
When you use the pytivo web interface and push a video, what does the resultant web page look like? Mine looks like this:


Queued for Push to Master Bedroom

/Movies/Family/Disney/Shorts/Day and Night.mp4

The page will reload in 5 seconds.


vidmgr basically uses the same HTTP interface to make its push request, and then literally looks for the string 'queue' in a case insensitive manner in the response. If it finds 1 or more occurrences, it assumes that the push went OK. Otherwise it gives the above generic error message.

Perhaps you are using an different version of pytivo where the wording is different? Try it with a browser and let me know what you get. I can perhaps make the code accept additional text to indicate a success.

I grabbed the console output from pytivo during the attempt that worked but indicated a failure. I didn't notice any messages using the web interface.


DEBUG:pyTivo.video.transcode:CACHE HIT! V:\Videos\TV\Burn Notice\Burn Notice - 205 - Scatter Point.mpg
DEBUG:pyTivo.video.transcode:CACHE HIT! V:\Videos\TV\Burn Notice\Burn Notice - 205 - Scatter Point.mpg
DEBUG:pyTivo.video.transcode:TRANSCODE=YES, vCodec mpeg2video not compatible, V:\Videos\TV\Burn Notice\Burn Notice - 205 - Scatter Point.mpg
DEBUG:pyTivo.video.transcode:CACHE HIT! V:\Videos\TV\Burn Notice\Burn Notice - 205 - Scatter Point.mpg
DEBUG:pyTivo.video.transcode:TRANSCODE=YES, vCodec mpeg2video not compatible, V:\Videos\TV\Burn Notice\Burn Notice - 205 - Scatter Point.mpg
DEBUG:pyTivo.video.transcode:CACHE HIT! V:\Videos\TV\Burn Notice\Burn Notice - 205 - Scatter Point.mpg
DEBUG:pyTivo.video.transcode:CACHE HIT! V:\Videos\TV\Burn Notice\Burn Notice - 205 - Scatter Point.mpg
DEBUG:pyTivo.video.transcode:TRANSCODE=NO, all compatible, V:\Videos\TV\Burn Notice\Burn Notice - 205 - Scatter Point.mpg
DEBUG:pyTivo.video.transcode:CACHE HIT! V:\Videos\TV\Burn Notice\Burn Notice - 205 - Scatter Point.mpg
DEBUG:pyTivo.video.transcode:CACHE HIT! V:\Videos\TV\Burn Notice\Burn Notice - 205 - Scatter Point.mpg
DEBUG:pyTivo.video.transcode:TRANSCODE=NO, all compatible, V:\Videos\TV\Burn Notice\Burn Notice - 205 - Scatter Point.mpg
DEBUG:pyTivo.video.video:Pushing http://192.168.1.7:9032/TV%20Shows/Burn%20Notice/Burn%20Notice%20-%20205%20-%20Scatter%20Point.mpg
DEBUG:pyTivo.mind:__login
{'cams_security_domain': 'tivocom', 'cams_login_config': 'http', 'cams_cb_password': 'd4a1n14c', 'cams_original_url': '/mind/mind7?type=infoGet', 'cams_cb_username': 'daniel.crowell@gmail.com'}
DEBUG:pyTivo.mind:pcBodySearch
{}

<pcBodyList><isBottom>true</isBottom><isTop>true</isTop><pcBody><bucketNumber>-1</bucketNumber><levelOfDetail>low</levelOfDetail><name>pyTivo</name><pcBodyId>tivo:pc.1001335731</pcBodyId><type>pcBody</type></pcBody></pcBodyList>g
DEBUG:pyTivo.mind:pcBodySearch
{}

<pcBodyList><isBottom>true</isBottom><isTop>true</isTop><pcBody><bucketNumber>-1</bucketNumber><levelOfDetail>low</levelOfDetail><name>pyTivo</name><pcBodyId>tivo:pc.1001335731</pcBodyId><type>pcBody</type></pcBody></pcBodyList>g
DEBUG:pyTivo.mind:bodyOfferModify&bodyId=tsn:65200018042EBC4
{'description': '', 'title': 'Burn Notice - 205 - Scatter Point', 'url': 'http://192.168.1.7:9032/TV%20Shows/Burn%20Notice/Burn%20Notice%20-%20205%20-%20Scatter%20Point.mpg?Format=video/mpeg', 'pcBodyId': 'tivo:pc.1001335731', 'bodyId': 'tsn:65200018042EBC4', 'publishDate': '2011-05-31 03:1241', 'source': 'SH924844', 'state': 'complete', 'partnerId': 'tivo:pt.3187', 'duration': 3595, 'encodingType': 'mpeg2ProgramStream', 'size': 1783300643}

<bodyOffer><bodyId>tsn:65200018042EBC4</bodyId><bodyOfferId>tivo:bo.15028161</bodyOfferId><createDate>2011-05-31 03:12:39</createDate><description /><duration>3595</duration><encodingType>mpeg2ProgramStream</encodingType><levelOfDetail>high</levelOfDetail><offerId>tivo:of.bs.15028161</offerId><partnerId>tivo:pt.3187</partnerId><pcBodyId>tivo:pc.1001335731</pcBodyId><publishDate>2011-05-31 23:41:00</publishDate><size>1783300643</size><source>SH924844</source><state>complete</state><title>Burn Notice - 205 - Scatter Point</title><updateDate>2011-05-31 03:12:39</updateDate><url>http://192.168.1.7:9032/TV%20Shows/Burn%20Notice/Burn%20Notice%20-%20205%20-%20Scatter%20Point.mpg?Format=video/mpeg</url></bodyOffer>g
DEBUG:pyTivo.mind:subscribe&bodyId=tsn:65200018042EBC4
{'uiType': 'cds', 'idSetSource': {'contentId': 'tivo:ct.bs.15028161', 'type': 'singleOfferSource', 'offerId': 'tivo:of.bs.15028161'}, 'bodyId': 'tsn:65200018042EBC4', 'title': 'pcBodySubscription'}

<subscribeResult><subscription><autoRecord>true</autoRecord><bodyGeneratesCandidates>false</bodyGeneratesCandidates><bodyId>tsn:65200018042EBC4</bodyId><hdOnly>false</hdOnly><idSetSource><contentId>tivo:ct.bs.15028161</contentId><offerId>tivo:of.bs.15028161</offerId><type>singleOfferSource</type></idSetSource><isAdult>false</isAdult><isForKids>false</isForKids><levelOfDetail>high</levelOfDetail><showStatus>rerunsAllowed</showStatus><subscriptionId>tivo:sb.15028531</subscriptionId><title>pcBodySubscription</title><type>subscription</type><uiType>cds</uiType></subscription></subscribeResult>g
INFO:pyTivo:192.168.1.7 [30/May/2011 22:12:43] "POST /TivoConnect HTTP/1.0" 302
-
INFO:pyTivo:192.168.1.7 [30/May/2011 22:12:43] "GET /None HTTP/1.0" 200 -
DEBUG:pyTivo.video.transcode:CACHE HIT! V:\Videos\TV\Burn Notice\Burn Notice - 205 - Scatter Point.mpg
DEBUG:pyTivo.video.transcode:TRANSCODE=NO, all compatible, V:\Videos\TV\Burn Notice\Burn Notice - 205 - Scatter Point.mpg
INFO:pyTivo:192.168.1.4 [30/May/2011 22:13:08] "GET /TV%20Shows/Burn%20Notice/Burn%20Notice%20-%20205%20-%20Scatter%20Point.mpg?Format=video%2Fmpeg HTTP/1.1" 206 -
DEBUG:pyTivo.video.video:V:\Videos\TV\Burn Notice\Burn Notice - 205 - Scatter Point.mpg is tivo compatible

jbernardis
05-31-2011, 08:45 PM
Here are the relevant lines from my pytivo log when I do a push.

2011-05-30 21:47:50,014 INFO pyTivo.video.video: [30/May/2011 21:47:50] Queued "/media/Videos/Movies/Family/Disney/Shorts/Day and Night.mp4" for Push to Master Bedroom
2011-05-30 21:47:50,015 INFO pyTivo: 192.168.1.124 [30/May/2011 21:47:50] "POST /TiVoConnect HTTP/1.1" 200 -


Note 2 things: 1) there is a very definite Queued message in my log. I'm not sure why it's not in yours, and 2) My POST response is 200 which indicates success. Yours is 302 which means "Moved Temporarily". I'm not sure why yours gets the 302, but one question I'd have to ask is how recent your pytivo is? Maybe it's time to update it? Just a suggestion.

If I don't see a response from pytivo, I have to pretty much assume a failure. I guess I could go by the HTTP return code instead of the message, but I'm not sure if a 302 is a valid return code in this case. Can anybody offer an opinion here?

wmcbrine
05-31-2011, 10:14 PM
Yeah, pyTivo doesn't use 302 currently, but it used to. This was changed in Feb. 2010.

jbernardis
06-01-2011, 05:33 PM
I posted version 0.3a of the app on git. This addresses some of the issues reported here. The clear key no longer directly exits the app. That was actually an early debugging aid when I was testing deeply nested directories - I wanted a quick way out, and I just forgot to remove it.
Also, the advance key now takes you back to the beginning of a list if you're positioned at the end. Otherwise, it takes you to the end.
Also, I removed the calls to unicode from metadata.py. These are not filenames I am trying to send to the tivo - they are file names I am attempting to open locally in order to read the meta data out of them. I felt there was no need to process the file names as such. I'm sure if this causes issues we'll all hear about it here.

I have no additional information for how to proceed with the 302/200 HTTP return code and the missing queued message other than to advise people to update their pytivo installation. Also, someone wanted some kind of a "please wait" type of thing if the requested operation was going to be lengthy. I'm not saying no to that, but it's low on the to do list.

reneg
06-01-2011, 06:21 PM
I posted version 0.3a of the app on git. This addresses some of the issues reported here. The clear key no longer directly exits the app. That was actually an early debugging aid when I was testing deeply nested directories - I wanted a quick way out, and I just forgot to remove it.
Also, the advance key now takes you back to the beginning of a list if you're positioned at the end. Otherwise, it takes you to the end.
Also, I removed the calls to unicode from metadata.py. These are not filenames I am trying to send to the tivo - they are file names I am attempting to open locally in order to read the meta data out of them. I felt there was no need to process the file names as such. I'm sure if this causes issues we'll all hear about it here.


No new issues here. Works great, thanks for the changes!

dcrowell77
06-02-2011, 09:49 AM
I have no additional information for how to proceed with the 302/200 HTTP return code and the missing queued message other than to advise people to update their pytivo installation.

I made an update and things are working better now. I do see the positive message and I haven't gotten an error.

Thanks!

lrhorer
06-03-2011, 06:13 AM
Also, someone wanted some kind of a "please wait" type of thing if the requested operation was going to be lengthy. I'm not saying no to that, but it's low on the to do list.
OK. The other thing that hit me was the lack of a listing of the number of videos in a directory. PyTivo and Galleon both do this, and I like it.

jbernardis
06-03-2011, 09:19 AM
OK. The other thing that hit me was the lack of a listing of the number of videos in a directory. PyTivo and Galleon both do this, and I like it.

I'm at work just thinking about this one. I kind of like that idea too. Does it just show videos, and not subdirectories? Does it just show the number of videos in the immediate subdirectory and not in the entire subdirectory tree?

I could probably do videos in the immediate directory easily enough, but I wouldn't want to do the entire tree, not because it's tough, but because it could be expensive in terms of processing time. Would this suffice?

jbernardis
06-03-2011, 10:22 PM
Version 0.3b is now on git. A few changes:

1) I added a "please wait" graphic for long running operations - currently this includes pushing a video, deleting a video, and building a directory listing. The latter is not really necessary, but if your directories are large and have thumbnails, they could take a few seconds.
2) I added a file and directory count to directory and share names where they appear on the screen. (These two items at lrhorer's request)
3) I have provided an alternate set of graphics. They are in the skins/blue directory. Just drop all of the png files into the vidmgr directory if you want to try it out. The background is just a simple blue color with a gradient fill of a lighter blue. It's much cleaner and I like it. I was never in love with the original purple screens, but didn't want to spend too much time on that aspect of the app.
4) Because of the alternate skin, I have changed the color of the font used for description text from black to white. I think this too looks better

Happy pushing :)

jbernardis
06-04-2011, 09:15 AM
Sorry everyone

There were a couple of bugs in the last delivery, prompting me to deliver 0.3c. This fixes:
1) exception when navigating OUT of an empty directory
2) video count was not updating in the shares list when a video was deleted
3) minor glitch when processing display option in the config file

jcthorne
06-04-2011, 10:32 AM
Wow, really on a roll with this. Love the updates! Working very well. Thanks!

I have a request to consider. Would it be possible to append the starRating, movieYear, and the first 2 or 3 vActor tags (from the metadata) to the discription or display them in some other way. Perhaps to the right of the cover art in the HD view? Just looking for a way to get just a bit more info presented.

Thanks again for a very useful bit of software.

reneg
06-04-2011, 10:22 PM
Latest update is nice. I'll throw a couple requests out there too:
1) Support the info button and display the metadata kind of like how Tivo supports it on individual items.
2) Increase HD lists from 12 rows to 13 rows (not sure 14 rows would fit).

jbernardis
06-04-2011, 10:31 PM
Ok - let's see

Reneg's request number 2 is trivial - I can see how many lines I can fit and increase it to that.

Reneg's other request kind of works hand in hand with jcthorne's request. There really is not too much space left on the screen - the area to the right of the thumbnail is where I have the push/delete menu and the menu if you have multiple tivo's. But perhaps the info button could bring up some sort of pop-up where I could put more complete metadata information.

Let me think about it for a few days.

lrhorer
06-05-2011, 08:14 PM
Version 0.3b is now on git. A few changes:

1) I added a "please wait" graphic for long running operations - currently this includes pushing a video, deleting a video, and building a directory listing. The latter is not really necessary, but if your directories are large and have thumbnails, they could take a few seconds.
Thanks! 'No thumbnails - at least not yet, but many of my shares have more than 1000 videos in them. Under the old code I could never really be certain whether the button press was lost, or not.

2) I added a file and directory count to directory and share names where they appear on the screen. (These two items at lrhorer's request)
Yep, and thanks a ton! I'll have to try this out, perhaps tonight if I get a chance.

3) I have provided an alternate set of graphics. They are in the skins/blue directory. Just drop all of the png files into the vidmgr directory if you want to try it out. The background is just a simple blue color with a gradient fill of a lighter blue. It's much cleaner and I like it. I was never in love with the original purple screens, but didn't want to spend too much time on that aspect of the app.
Yeah, me, either. I had real trouble reading the screen, especially in the livingroom, which is often sunlit. I just created a simple two tone gray HD background shown below for my own use. I'll try yours out and see how I like it. If anyone likes it, they are free to scarf it from my website:

http://fletchergeek.com/images/background.png

http://fletchergeek.com/images/background.png (http://fletchergeek.com/images/background.png)
http://fletchergeek.com/images/backgroundHD.png (http://fletchergeek.com/images/backgroundHD.png)
Note: I haven't tried the SD background, myself.

4) Because of the alternate skin, I have changed the color of the font used for description text from black to white. I think this too looks better
Oh, cool! I agree about the font. I was going to look into this, but you beat me to it. :)

lrhorer
06-08-2011, 06:56 PM
I'm at work just thinking about this one. I kind of like that idea too. Does it just show videos, and not subdirectories? Does it just show the number of videos in the immediate subdirectory and not in the entire subdirectory tree?
I'm not sure. Two levels is the deepest I go.

Would this suffice?
For me it certainly would. Perhaps a better compromise, however, would be the total number of videos in the immediate subdirectory plus the number of child directories in the immediate subdirectory.

jbernardis
06-08-2011, 07:07 PM
I'm not sure. Two levels is the deepest I go.


For me it certainly would. Perhaps a better compromise, however, would be the total number of videos in the immediate subdirectory plus the number of child directories in the immediate subdirectory.

lrhorer:

This is already in the current git. You can download it and try it today. It tells you the total number of videos PLUS the number of directories - a single sum. This is what pytivo does (at least the version I am using)

I am just about ready to release a version that allows you to press the "info" button to see ALL of the metadata associated with a video - not just the description as it currently does. I expect to upload it by Friday of this week. The logic is relatively complete, but I was just trying to figure out if I have a complete list of meta items. I'm basically using the metadata.py module from pytivo to identify the MANY different tags.

lrhorer
06-08-2011, 11:42 PM
This is already in the current git. You can download it and try it today.
I have 0.3c. Isn't that the latest as of this moment?

It tells you the total number of videos PLUS the number of directories - a single sum. This is what pytivo does (at least the version I am using)
OK, I really wouldn't notice this, since none of the folders I have created have both videos and folders in them.

I am just about ready to release a version that allows you to press the "info" button to see ALL of the metadata associated with a video - not just the description as it currently does. I expect to upload it by Friday of this week. The logic is relatively complete, but I was just trying to figure out if I have a complete list of meta items. I'm basically using the metadata.py module from pytivo to identify the MANY different tags.
That sounds intriguing. Boy, you're really on a roll with this app!

jbernardis
06-09-2011, 07:05 AM
I have 0.3c. Isn't that the latest as of this moment?

Yes - 0.3c is the version you want. Basically if you have the version that has the clock icon for long-running operations, you have the correct version since both of these capabilities were released together. If you are not seeing a count of your videos, please let me know and we can do some debugging.

jbernardis
06-10-2011, 09:19 AM
ok

Version 0.4 is now available - this version adds an info screen. This screen pops up over top of the video list or the details page when you press the info button and it displays the meta data. Pressing clear or left on the popup will dismiss it. While on the pop-up, if there is more than 1 page, channel up/down will allow paging. There is an arrow "cue" at the top and bottom of the page to indicate if there is more information in that direction.

Note - if you are in the habit of just copying the py file, there are new png files - most notably the "info*.png" files, but also, one of the png files in the "blue" collection was
incorrect and is fixed with this delivery (specifically hiliteHD.png).

reneg
06-10-2011, 01:02 PM
Tried out 0.4 and worked well on my setup. I like the formatting, but not the pink background. Pink is ok in small doses, but that's way too much for me. I haven't compared what is displayed vs my metadata files, but I didn't notice anything I couldn't live without.

windracer
06-10-2011, 01:16 PM
I like the formatting, but not the pink background. Pink is ok in small doses, but that's way too much for me.
Try the blue skin ... it's a lot better.

jbernardis
06-10-2011, 02:02 PM
Tried out 0.4 and worked well on my setup. I like the formatting, but not the pink background. Pink is ok in small doses, but that's way too much for me. I haven't compared what is displayed vs my metadata files, but I didn't notice anything I couldn't live without.

I agree with windracer - I don't pay too much attention to the original skin anymore - I ship all the png files that are needed, but I spend more time with the blue skin.

If everyone feels this way, I might drop the original files - it's a pain to make sure both sets are updated.

jbernardis
06-10-2011, 02:07 PM
I haven't compared what is displayed vs my metadata files, but I didn't notice anything I couldn't live without.

The only thing I explicitly leave out are the isEpisode and isEpisodic flags. I have a dictionary in the program to translate tags into a friendlier name, but If I don't find a label in that dictionary, I just use the label as is. Every tag except for the two mentioned above will be displayed. Also, I force Title, seriesTitle, episodeTitle, and description to the top of the display.

If there are tags that you think I should ignore, translate into a friendlier name, or force to the front, give me your thoughts. The entire thing is based on a dictionary and two lists. It would be easy to extend or change.

lrhorer
06-10-2011, 04:01 PM
Ok - let's see

Reneg's request number 2 is trivial - I can see how many lines I can fit and increase it to that.
Have you looked into this, or is it by any chance already part of 0.4c? I would love to have an expanded number of titles by this weekend - I have company coming over. If you ask me, the top selling point of this app is the greater coverage of titles in the video list. Essentially, it displays twice the number of titles the NPL does, because the NPL always retains the top or bottom entry, as the case may be, when moving to a new page. Adding one or two more lines would just be gravy.

I'm looking forward to downloading your latest offering when I get home tomight.

jbernardis
06-10-2011, 05:13 PM
I totally forgot about Reneg's request with all of the changes for the info screen.
version 0.4b is out on git - I increased the list size for the HD screen from 12 to 14.
It looks OK on my TV, but because the simulator does not do HD, I cannot verify that I am not outside the safe zone.

If I am, let me know. It's a 1 line change, but if there is enough of a difference from tv to tv, maybe I can make it a config option.

reneg
06-10-2011, 10:46 PM
I made the one line change on my system for 14 rows and it worked well for me.

I had made my own backgound a couple releases back because I didn't care for the original background. My preference is the blue skin and I believe it would be a more appealing default.

The program is easy to use and has a high acceptance factor in my household. Thanks again for making this available.

lrhorer
06-11-2011, 10:14 AM
Is there any way the thumbnail could be moved down just a bit? Sometimes the description text overflows it. Perhaps it would also be a good idea to truncate the description text if it is longer than a certain size? Probably both of these should be configurable, as their proper values depend on font size.

lrhorer
06-11-2011, 10:16 AM
It looks OK on my TV, but because the simulator does not do HD, I cannot verify that I am not outside the safe zone.
What, exactly, is the safe zone?

jbernardis
06-11-2011, 11:54 AM
What, exactly, is the safe zone?

The safe zone is an area around the perimeter of the screen that you can be reasonably sure will be displayed. Some TV's cut off the edges due to overscan. This potentially cut-off area is the unsafe zone - everything else is the safe zone.

BTW - I made your requested changes to version 0.4c now available on git.

I was able to move the thumbnail down about 20 pixels, but I also added logic to calculate the size of the description view based on the font size. Now it should only show full lines of text and it should not impinge on the thumbnail (and vice-versa). Incidentally, these two views only overlapped by a single pixel before this fix; the situation was exacerbated by the fact that the description view height was just an arbitrary value, and it was only showing the top half of a line of text.

jbernardis
06-11-2011, 11:59 AM
Probably both of these should be configurable, as their proper values depend on font size.

Although there is presently no way to configure the positions of things on the screen, you CAN configure the description font size via a value in the config.ini.

In the vidmgr section of the file, add a line such as:
descsize=16

The default value is 20. I know 20 might cause an overflow of the current description view, but I deemed that as acceptable since the full meta data is now available by pressing the info key.

westside_guy
06-11-2011, 03:05 PM
I respectfully suggest that - even if you feel it's easier in the discussions to use the term "pyhme" - your docs should use the correct name "hmeforpython" (or "HME for Python") so it's easier to find the necessary external stuff. Speaking as someone who hasn't been hanging around TC for a while, I can say a Google search for "pyhme" is not particularly enlightening. :D

If you choose to release this, I also suggest you consider adding a configuration file toggle that could disable the "delete" functionality.

Thanks for making this! It seems to work well, and it's certainly snappier than streambaby (and likely doesn't have the memory leak issues, being based on python rather than java).

jbernardis
06-11-2011, 04:57 PM
I respectfully suggest that - even if you feel it's easier in the discussions to use the term "pyhme" - your docs should use the correct name "hmeforpython" (or "HME for Python") so it's easier to find the necessary external stuff. Speaking as someone who hasn't been hanging around TC for a while, I can say a Google search for "pyhme" is not particularly enlightening. :D

If you choose to release this, I also suggest you consider adding a configuration file toggle that could disable the "delete" functionality.

Thanks for making this! It seems to work well, and it's certainly snappier than streambaby (and likely doesn't have the memory leak issues, being based on python rather than java).

Glad you like it. I will take the delete toggle feature into consideration. Seems like a good idea.

I agree that with the many changes that have gone into the program, there is not one place that provides adeqaute documentation. I should simply consolidate everything into one place rather than just have a running log.

westside_guy
06-11-2011, 05:10 PM
Glad you like it. I will take the delete toggle feature into consideration. Seems like a good idea.

My personal bias is to always err towards caution - but that's just me.

For my own use I just did a quick-and-dirty edit to your code, so I don't have to worry about the kid accidentally deleting the file (or thinking "of course I want to remove it from the Tivo, I'm done watching!"). I didn't even bother removing the button - it just says "no can do" if they hit delete (and simply plays the "bonk" sound if they manage to hit thumbs up and get into the script anyway). :D

Anyway, thanks again! Seriously, it's so-ooo nice to have a quick and responsive UI for this.

jbernardis
06-11-2011, 10:53 PM
I just posted version 0.5 (we're halfway to 1.0) onto git.

I incorporated westside_guy's idea of having a config option to disable delete functionality, but I made MANY other changes as well:

-As stated, I added the ability to specify deleteallowed=False in the config file to prevent file deletions

-I formalized the skin concept. Now skins are kept in separate directories under the skins directory (e.g. skins/blue), and the directory you want to use for a skin is named in the config file (e.g. skin=blue). ALso, changed the
image loading logic such that if the HD version of an image does not exist, then it will use the SD version of that file. This solved the situation where there were duplicate files just to satisfy a naming convention.

-I moved metadata.py into the vidmgr directory. It didn't belong up in the pyhme directory and I never liked having it up there. I was too unfamiliar with python to know how to specify to look in the vidmgr subdirectory
to find the file (it turns out I didn't need to do anything - python found it!!)

-I split README.txt into README.txt and changelog.txt. changelog.txt will contain the change history, and README will be maintained as the always current description of the application

-I fixed the positioning bug in 0.4c where the "Push" button was over top of the bottom line of the description.

Perhaps the easiest way to install all of this over a present installation is to save your config file, and if you have a custom skin, save all of the png files. Delete the vidmgr subdirectory tree, move this package into its place, create a directory for your custom skin under skins (if you had one) and then add your desired skin to the config.ini file. Also, if you do not want delete enabled, set that flag to false.

westside_guy
06-11-2011, 11:13 PM
This is really cool - thank you for sharing your work with us!

It's amazing what a great group of "community devs" we have - what with pyTivo/X, tivodecode, streambaby, kttmg, the other sundry apps wmcbrine continues to develop, your great new tool, etc. etc. We're very lucky to have all of you guys letting us enjoy the fruits of your labor.

lrhorer
06-12-2011, 12:08 PM
Glad you like it. I will take the delete toggle feature into consideration. Seems like a good idea.
I second that. Although I have not yet deleted a show on the server accidentally, I don't really ever want to do so, at least not from a TiVo. The other way around, yes, but deleting a file on the server from a TiVo? Uh-uh. For safety I would prefer to have the ability to disable the feature.

Edit - Oh I see you've already done it. You're just too efficient!

lrhorer
06-12-2011, 12:29 PM
The only thing I explicitly leave out are the isEpisode and isEpisodic flags. I have a dictionary in the program to translate tags into a friendlier name, but If I don't find a label in that dictionary, I just use the label as is. Every tag except for the two mentioned above will be displayed. Also, I force Title, seriesTitle, episodeTitle, and description to the top of the display.
I vote to also force the "movieYear" field to the top, between the titles and the description, followed by director(s), writer(s), and then description, followed by the actors. For me, at least, I would also find the info more readable if there were a blank line between the writer(s) and the description, and another between the description and the actors.

If there are tags that you think I should ignore, translate into a friendlier name, or force to the front, give me your thoughts. The entire thing is based on a dictionary and two lists. It would be easy to extend or change.
The two following fields show up in some of the metafiles, and I have no idea what they are. I think they can be suppressed:

Showing Bits
Display Major Number

jcthorne
06-12-2011, 02:10 PM
Showing Bits maps to the atributes Closed Captioned, Stereo, Subtitles, Joined in Progress, SAP, 3D, Letterbox, the various advisories for language, violance, nudity. These could be useful to some but I do not use them. Maping info for this is in one of the pytivo metadata threads over on pytivo forum but its been a long time. WMcBrine would know for sure.

Display Major Number is related to channel number it was recorded from.


I would second the request for movie year to display after the title but before the discription. Also the movie star rating (1 star to 5 stars)

jcthorne
06-12-2011, 02:17 PM
I got 0.5 installed today and it looks great. Love the new features. I updated my custom skin, placed it in a directory as stated and it worked perfectly. Had to add a few new graphics for the new elements but since your skins use easy to work with file types, was no trouble.

I do now have a request that came from my wife flipping through TV shows. She is good a pointing out the obvious....

In my directory structure I have a folder for each tv series. IE NCIS. Under that are a set of folders for each season and in each season folder are the episodes with thier meta data and graphics.

I also have placed a folder.jpg in the series folder and each season folder. Would be great if vidmgr displayed those jpgs when the folder is highlighted. That way the show cover art is displayed when its title is highlighted rather than no art until the episode is selected 3 levels in. IE its as simple as when a folder is highlighed, display the folder.jpg contained in that folder if it exists. Thanks for considering this, look forward to what you come up with next.

jbernardis
06-12-2011, 02:51 PM
One important step I forgot to mention about installing 0.5 - don't forget to remove the metadata.py (and metadata.pyc) from the pyhme directory. The new home for these files is in the vidmgr directory. Right now, the files would be the same, so if you forget to delete the pyhme copy, no harm done. However, if this file ever changes, the changes will only be delivered to the copy in the vidmgr directory. That means you will have two identically named files with different content, and I'm not sure which one python will use - best simply to delete the copy in the pyhme directory.

Regarding the requested changes to the metadata in the info screen, it seems that everybody wants something different, so I think I'm going to add these lists to the config file - that way you'll get exactly what you want.

I am also looking into the folder thumbnail ides - I like it.

windracer
06-12-2011, 03:32 PM
Lovin' 0.5, nice work!

I did notice that the changelog.txt file doesn't seem to exist in git yet?

jbernardis
06-12-2011, 04:02 PM
I did notice that the changelog.txt file doesn't seem to exist in git yet?

I forgot to include changelog - I forgot to make the changes to my build.xml to stage this file for delivery too, but you'll find it now, because.....


I have just posted 0.5a in git. In addition to now including the changelog, I have also implemented the recently requested changes. You can place metaignore= and metafirst= lines in the config file to override the default values for metadata that is either ignored or placed first in the display.

Also, thumbnails are now displayed for directories. It looks for a file named folder.jpg either in that directory or in the .meta subdirectory.

As I was posting, it hit me that the new directory thumbnail logic does not apply to shares. Many people use shares differently than I do. I have a single share that has subdirectories in it, so thumbnails there didn't make sense, but I know that some people have a different share for each show - in which case showing thumbnails for the share makes sense. It should be able to easily add it if it's wanted.

Jeff

lrhorer
06-12-2011, 11:03 PM
I have just posted 0.5a in git. In addition to now including the changelog, I have also implemented the recently requested changes. You can place metaignore= and metafirst= lines in the config file to override the default values for metadata that is either ignored or placed first in the display.
Oh, excellent! What about the ability to insert spaces?

Also, thumbnails are now displayed for directories. It looks for a file named folder.jpg either in that directory or in the .meta subdirectory.
Let me make sure I have this straight. If the file name precisely "folder.jpg", or is it <folder>.jpg, where <folder> is the name of the directory? In the case of a .meta subdirectory, that is a subdirectory of <folder>, right, not in the vidmgr directory?

As I was posting, it hit me that the new directory thumbnail logic does not apply to shares. Many people use shares differently than I do. I have a single share that has subdirectories in it, so thumbnails there didn't make sense, but I know that some people have a different share for each show - in which case showing thumbnails for the share makes sense. It should be able to easily add it if it's wanted.
Well, I have more than 1 share, but I don't have a share for every show, or even a share for every genre, so my usage more closely resembles yours, but I can see how some people would make use of the feature.

jbernardis
06-13-2011, 07:58 AM
Oh, excellent! What about the ability to insert spaces?
Not yet - I am thinking about how to do that. I have an idea, but haven't started implementing yet. I am thinking about adding metaspace= to the config file. You'd name metadata items after which you'd like to have a space.

Let me make sure I have this straight. If the file name precisely "folder.jpg", or is it <folder>.jpg, where <folder> is the name of the directory? In the case of a .meta subdirectory, that is a subdirectory of <folder>, right, not in the vidmgr directory?
the file is literally named folder.jpg - NOT the directory name, and the .meta directory is within the folder itself, not in the vidmgr directory

Well, I have more than 1 share, but I don't have a share for every show, or even a share for every genre, so my usage more closely resembles yours, but I can see how some people would make use of the feature.
I'm already well along adding this feature. It will be there in the next release.

lew
06-13-2011, 08:20 AM
-As stated, I added the ability to specify deleteallowed=False in the config file to prevent file deletions


Thank you. I didn't ask for it but I'll use it.

It's a shame there isn't a way to select PyTivo Video Manager from either the main tivo menu or from the Now Playing list.

I doubt it can be done, at least on a stock tivo, but it would be nice to replace the add on the main tivo menu with your application.

lrhorer
06-13-2011, 02:45 PM
TiVo needs to look at this application to see what the NPL should should be like, user configurations and all. This is looking better and better by the day - by the hour almost.

One more question / request: Does the content text from the metafile have to be so far over to the right on the info screen? There's a big gap between the field name and the field text. This not only makes the fields longer, it makes it harder to read. Adding the blank line for which I have asked will help, but moving the text to the left will help even more.

lrhorer
06-13-2011, 02:53 PM
Could you see your way to program a paged jump based on a number press? Thus, pressing the 1 button would take the user 1/10th the way down the current list, 2 will take the user 2/10s down the list, etc? With some of these shares and share folders having titles numbering in the hundreds and even the thousands, being able to jump only to the beginning the end, or up / down 14 titles doesn't really cut it, sometimes.

(I don't suppose we could get more than 14 titles on the screen?)

rrr22777
06-13-2011, 03:05 PM
Where do I put the contents of config.merge? I dont have config.ini. Running everything on linux.

ERROR:pyTivo:hmeserver - 'type'
ERROR:pyTivo:pytivos - 'type'
ERROR:pyTivo:tivos - 'type'
ERROR:pyTivo:vidmgr - 'type'
INFO:pyTivo:192.168.0.250 [13/Jun/2011 13:10:10] "GET /TiVoConnect?Command=QueryContainer&Container=%2F&DoGenres=1 HTTP/1.0" 200 -

windracer
06-13-2011, 03:21 PM
Just rename it to be config.ini and put it in the main folder where you have HME for Python installed (one level up from vidmgr). You only need to "merge" that info if you have an existing config.ini file.

jbernardis
06-13-2011, 05:38 PM
Just rename it to be config.ini and put it in the main folder where you have HME for Python installed (one level up from vidmgr). You only need to "merge" that info if you have an existing config.ini file.

Be aware though - if you are running without a config.ini, that means it is simply running All apps that it finds. If you want this to continue, make sure you do NOT have an apps line in the config file - if you do, then pyhme will run ONLY the named apps.

jbernardis
06-13-2011, 05:42 PM
Version 0.5b is now on git.

I added the following:

- thumbnails are now displayed for shares as well as for directories. The same rules - just put folder.jpg in the root of the share or in a .meta directory that lives there.

- added "metaspace=" to the config file to indicate if a blank line should be added to the display after the named metadata items. The default is an empty list.

- added "infolabelpercent=" to config file to specify the width of the label on the info screen. This value should be expressed as a percent. The default value is 30, but I have found that 20 works OK for HD screens

jbernardis
06-13-2011, 05:46 PM
Could you see your way to program a paged jump based on a number press? Thus, pressing the 1 button would take the user 1/10th the way down the current list, 2 will take the user 2/10s down the list, etc? With some of these shares and share folders having titles numbering in the hundreds and even the thousands, being able to jump only to the beginning the end, or up / down 14 titles doesn't really cut it, sometimes.

(I don't suppose we could get more than 14 titles on the screen?)

Great idea - I never thought about it with my directories having at most 15 or 20 videos. It should be easy to do - let me think about it for a bit. I may call on you to do some testing since you have such huge directories.

I think 14 is as many as we're going to see with the current layout.

lrhorer
06-13-2011, 06:10 PM
Where do I put the contents of config.merge? I dont have config.ini. Running everything on linux.

ERROR:pyTivo:hmeserver - 'type'
ERROR:pyTivo:pytivos - 'type'
ERROR:pyTivo:tivos - 'type'
ERROR:pyTivo:vidmgr - 'type'
INFO:pyTivo:192.168.0.250 [13/Jun/2011 13:10:10] "GET /TiVoConnect?Command=QueryContainer&Container=%2F&DoGenres=1 HTTP/1.0" 200 -
Silly web conference software... FYI, the software interprets the sequence ":" and then "p" as a smiley face. To avoid this, put such sequences in a code frame:

ERROR:pyTivo:hmeserver - 'type'
ERROR:pyTivo:pytivos - 'type'
ERROR:pyTivo:tivos - 'type'
ERROR:pyTivo:vidmgr - 'type'
INFO:pyTivo:192.168.0.250 [13/Jun/2011 13:10:10] "GET /TiVoConnect?Command=QueryContainer&Container=%2F&DoGenres=1 HTTP/1.0" 200 -[/QUOTE]

lrhorer
06-13-2011, 06:13 PM
Version 0.5b is now on git.
You are just too cool.

lrhorer
06-13-2011, 06:18 PM
Great idea - I never thought about it with my directories having at most 15 or 20 videos.
My largest has 1893 and counting. :eek:

Now that you mention, it (OK, OK, I mentioned it), is there any code optimization that could take place when writing the cache? The first time one enters a large directory, it takes quite a while - nearly a minute.

It should be easy to do - let me think about it for a bit. I may call on you to do some testing since you have such huge directories.
Of course! I'd be more than happy to help with development testing. You can PM me or I can provide you with FTP access to my main website.

I think 14 is as many as we're going to see with the current layout.
Yeah, I figured. It would proabbly require a smaller font. I also personally don't care about the safe zone, but both could be problematical for people with smaller, less "overscanned" TVs, and you need to consider that. Of course, providing a user-defined variable that allows the user to break the rules would be a reasonable compromise, but it also probably means a headache for the developer. That would be you. :D

It never hurts to ask, though. :)

lrhorer
06-13-2011, 06:30 PM
Something's wrong with the git. The download never happens.

jbernardis
06-13-2011, 06:36 PM
Something's wrong with the git. The download never happens.

You're right - I think it must be their site, I was able to retrieve it just fine with firefox though - just IE gave me problems

jbernardis
06-13-2011, 06:41 PM
Now that you mention, it (OK, OK, I mentioned it), is there any code optimization that could take place when writing the cache? The first time one enters a large directory, it takes quite a while - nearly a minute.


I have to think about a caching method. I made a conscious decision early that I was going to treat the directories as volatile information; I do no real caching in the program - hme provides a bit, but I simply read the entire directory every time I enter it. Perhaps it's faster the second time because of hme and/or os caching.

This will be a tough one.

cweb
06-13-2011, 06:44 PM
Can I use video manager with my OSX Pytivo installation?

jbernardis
06-13-2011, 06:53 PM
Can I use video manager with my OSX Pytivo installation?

I know nothing about the MAC environment, and I have no way to test there, but it's simple python code. If hme for python runs there I see no reason why this wouldn't as well. Give it a try and let us know. We could probably even resolve simple issues by working together on it.

lrhorer
06-13-2011, 07:02 PM
- added "metaspace=" to the config file to indicate if a blank line should be added to the display after the named metadata items.
One tiny bug, here. If I have

metafirst = title seriesTitle episodeTitle movieYear vWriter vDirector description
metaspace = vDirector description vActor

Things lay out the way I want as long as the metafile has vDirector fields, but some of the metafiles don't have that field. Would it be possible to do a Boolean, something like:

metafirst = title seriesTitle episodeTitle movieYear vWriter vDirector description
metaspace = movieYear+vWriter+vDirector description vActor
That way a newline will be added after whichever the last of the 3 which exists in the metafile.

- added "infolabelpercent=" to config file to specify the width of the label on the info screen. This value should be expressed as a percent. The default value is 30, but I have found that 20 works OK for HD screens
A value of 15% seems to work fine, here, with a font size of 20. I may increase the font size a bit, though, to make it nicer for the folks in the back row.

lrhorer
06-13-2011, 07:05 PM
Can I use video manager with my OSX Pytivo installation?
No, it's not allowed on a Mac. The state computing police will come haul you away. :)

Give it a shot. If you have pyHME working, the rest is a breeze. If you have to set up pyHME, it's still not really very difficult.

jbernardis
06-13-2011, 07:08 PM
One tiny bug, here. If I have

metafirst = title seriesTitle episodeTitle movieYear vWriter vDirector description
metaspace = vDirector description vActor

Things lay out the way I want as long as the metafile has vDirector fields, but some of the metafiles don't have that field. Would it be possible to do a Boolean, something like:

metafirst = title seriesTitle episodeTitle movieYear vWriter vDirector description
metaspace = movieYear+vWriter+vDirector description vActor
That way a newline will be added after whichever the last of the 3 which exists in the metafile.


A value of 15% seems to work fine, here, with a font size of 20. I may increase the font size a bit, though, to make it nicer for the folks in the back row.

I anticipated this issue. I was actually thinking of doing it this way:
I would have two config file options metaspace would become metaspaceafter and work as it does now, and metaspacebefore would put a space before - but the logic would never put out 2 consecutive spaces

lrhorer
06-13-2011, 07:09 PM
You're right - I think it must be their site, I was able to retrieve it just fine with firefox though - just IE gave me problems
Hmm. It works here under IceWeasel, but not FireFox.

lrhorer
06-13-2011, 07:10 PM
I anticipated this issue. I was actually thinking of doing it this way:
I would have two config file options metaspace would become metaspaceafter and work as it does now, and metaspacebefore would put a space before - but the logic would never put out 2 consecutive spaces
That would work.

jbernardis
06-13-2011, 07:19 PM
lrhorer:

I have attached a new __init__.py (I had to rename it to .txt). This is not released yet and has not been thoroughly tested. This has both the key based paging mechanism you described as well as the new metaspacebefore and metaspaceafter that was discussed. metaspaceafter is a synonym for metaspace in the config.ini file.

Give it a try and let me know. I'll release it after you get back to me.

lrhorer
06-13-2011, 07:24 PM
I have to think about a caching method. I made a conscious decision early that I was going to treat the directories as volatile information; I do no real caching in the program - hme provides a bit, but I simply read the entire directory every time I enter it. Perhaps it's faster the second time because of hme and/or os caching.
OS - level caching would be my guess, or actually more likely the hard drives. I also tried decreasing the nice value of the Python process, and, qualitatively, it seemed to help some. I need to do some more rigorous testing to be sure.

This will be a tough one.
Yeah, and I can understand if you are reticent to spend a lot of resources on it.

jbernardis
06-13-2011, 07:35 PM
OS - level caching would be my guess, or actually more likely the hard drives. I also tried decreasing the nice value of the Python process, and, qualitatively, it seemed to help some. I need to do some more rigorous testing to be sure.


Yeah, and I can understand if you are reticent to spend a lot of resources on it.

The main issue as I see it is that these are short-lived processes - not like pytivo that is resident at all times. The work of accessing the disk has to be done - and there is no improving the response time the first time it runs, caching will be helpful if I could somehow retain this information from run to run. But then I couldn't take it at faith - I'd still need to verify that the cache was accurate.

All I'm really doing is processing the directory (except for loading of thumbnails). I'm not sure how much I'd save by only needing to verify the cache contents.

I'm going to give this some thought - I'm not ruling it out entirely. I just wanted you to know that you weren't going to get a response in an hour like has been the norm :)

wmcbrine
06-13-2011, 09:00 PM
They're only threads, not processes. You can store common info at the class level, or the module level. This is how I do two-player games in Reversi. pyTivo actually works in a similar way, even though it's not HME.

lrhorer
06-13-2011, 09:00 PM
lrhorer:

I have attached a new __init__.py (I had to rename it to .txt). This is not released yet and has not been thoroughly tested. This has both the key based paging mechanism you described as well as the new metaspacebefore and metaspaceafter that was discussed. metaspaceafter is a synonym for metaspace in the config.ini file.

Give it a try and let me know. I'll release it after you get back to me.
Seems to be working perfectly, both the number jump and the metaspacebefore directive.

I almost never use the numeric buttons on my remote. Now I'll start using them!

jbernardis
06-13-2011, 09:10 PM
They're only threads, not processes. You can store common info at the class level, or the module level. This is how I do two-player games in Reversi. pyTivo actually works in a similar way, even though it's not HME.

I understand that they're threads. I guess what it boils down to is if I exit to live TV and come back into the app, is there any memory of the previous instantiation.

I noticed that the "mainline" code - code outside of any classes or subroutines - executes at import time, but I would think there is very little I could do here - certainly nothing with any of the HME classes. I assume this is what you are referring to as module-level. I would guess that I could create some empty data structures at this level, and then fill them in as I traverse directories while within the app. They would then be available for subsequent invocations.

jbernardis
06-13-2011, 09:11 PM
Seems to be working perfectly, both the number jump and the metaspacebefore directive.

I almost never use the numeric buttons on my remote. Now I'll start using them!

Thanks much - I'll package it up and get it up on git.

jbernardis
06-13-2011, 09:24 PM
OK - Version 0.5c with the above described features is now available at git

rrr22777
06-14-2011, 06:04 PM
Be aware though - if you are running without a config.ini, that means it is simply running All apps that it finds. If you want this to continue, make sure you do NOT have an apps line in the config file - if you do, then pyhme will run ONLY the named apps.

Should I see something in the pytivo log after I add this?

[root@linux1 pytivo]# ls
beacon.py hdphotos.jnlp mind.pyc pyTivo.conf.dist vidmgr
beacon.pyc httpserver.py mutagen pyTivoConfigurator.pyw xmpp
Cheetah httpserver.pyc nohup.out pyTivo.py Zeroconf.py
config.ini lrucache.py plugin.py pyTivoService.py Zeroconf.pyc
config.merge lrucache.pyc plugin.pyc README
config.py metadata.py plugins stager.py
config.pyc metadata.pyc PYCC.pf stager.pyc
content mind.py pyTivo.conf templates
[root@linux1 pytivo]# cat config.ini
[vidmgr]
exts=.mpg .mp4 .avi .wmv .m4v
descsize=16

[tivos]
tivo1.name=Family Room
tivo1.tsn=748-0001-902C-E861


[pytivos]
pytivo1.config=pyTivo.conf
pytivo1.ip=192.168.0.100
pytivo1.port=9032
pytivo1.sep=/
[root@linux1 pytivo]# python /u03/samba/HMO/pytivo/pyTivo.py
INFO:pyTivo.beacon:Announcing shares...
INFO:pyTivo.beacon:Registering: MyMovies
INFO:pyTivo.beacon:Registering: MyMusic
INFO:pyTivo.beacon:Registering: MyPhotos
INFO:pyTivo.beacon:Scanning for TiVos...
INFO:pyTivo:pyTivo is ready.
INFO:pyTivo:192.168.0.250 [14/Jun/2011 16:10:17] "GET /TiVoConnect?Command=QueryContainer&Container=%2F&DoGenres=1 HTTP/1.0" 200 -

lrhorer
06-14-2011, 07:21 PM
Should I see something in the pytivo log after I add this?
No, this doesn't run under pyTivo. It runs under HME for Python. It looks to me like you put the code in the wrong directory and modified the wrong config file. Well, sort of.

pyTivo:
RAID-Server:/usr/share/pyTivo# ls
alphagroup Cheetah content httpserver.py __init__.py metadata.py mind.pyc plugin.pyc pyTivo pyTivoConfigurator.pyw README xmpp
beacon.py config.py dategroup httpserver.pyc lrucache.py metadata.pyc mutagen plugins pyTivo.conf pyTivo.py templates Zeroconf.py
beacon.pyc config.pyc eyeD3 httpserver.py.orig lrucache.pyc mind.py plugin.py pyshares pyTivo.conf.dist pyTivoService.py Unverified Zeroconf.pyc
RAID-Server:/usr/share/pyTivo# cat pyTivo.conf
[RAID Server]
force_alpha = True
type = video
path = /RAID/Recordings

[_tivo_SD]

[_tivo_00000DEADBEEF]

[Server]
tivo_password = xxxxxxxxxxx
tivo_mak = yyyyyyyyyy
ffmpeg = /usr/bin/ffmpeg
togo_path = /RAID/Server-Main/Movies/TiVo_TS
debug = True
tivo_username = zzzzzzzzz
port = 9032

[_tivo_HD]

[Videos by Genre]
force_alpha = True
type = video
path = /usr/share/pyTivo/pyshares

[Group by Alpha]
force_alpha = True
type = video
path = /usr/share/pyTivo/alphagroup

[Unverified]
type = video
path = /usr/share/pyTivo/Unverified

[DVD]
path = /RAID/DVD
force_alpha = True
type = dvdvideo
fast_index = true

[Videos by Date]
force_alpha = True
type = video
path = /usr/share/pyTivo/dategroup

pyHME:
RAID-Server:/usr/share/pyhme# ls
config.ini hme.py hme.pyc pyHME start.py vidmgr Zeroconf.py Zeroconf.pyc
RAID-Server:/usr/share/pyhme# cat config.ini
[hmeserver]
apps=vidmgr

[vidmgr]
exts=.mpg .mp4 .avi .wmv .m4v
descsize=20
sort=file
skin=local
deleteallowed=false
metafirst = title seriesTitle episodeTitle movieYear vDirector vWriter description
metaspaceafter = vWriter description vActor
metaspacebefore = description vActor
infolabelpercent = 15
metaignore = isEpisode isEpisodic showingBits displayMajorNumber

[tivos]
tivo1.name=LivingRoom
tivo1.tsn=###-####-####-####
tivo2.name=Theater
tivo2.tsn=###-####-####-####
tivo3.name=TiVoHD
tivo3.tsn=###-####-####-####


[pytivos]
pytivo1.config=/usr/share/pyTivo/pyTivo.conf
pytivo1.ip=192.168.1.50
pytivo1.port=9032
pytivo1.sep=/

And looking at the servers:
RAID-Server:/usr/share/pyhme# ps -ef | grep py
root 13245 1 0 Jun13 pts/1 00:01:21 /usr/bin/python2.6 /usr/share/pyhme/start.py
root 14763 1 0 10:03 pts/1 00:00:42 /usr/bin/python2.6 /usr/share/pyTivo/pyTivo.py /dev/null

Except when pushing a video, the output will be from pyHME, not pyTivo. It will look someting like this:

RAID-Server:/usr/share/pyhme# cat /var/log/pyhme.log
192.168.1.101:4119 - - [13/Jun/2011 23:21:23] "GET /vidmgr/icon.png HTTP/1.0" 200 -
192.168.1.102:1762 - - [13/Jun/2011 23:24:34] "GET /vidmgr/icon.png HTTP/1.0" 200 -
192.168.1.102:1801 - - [13/Jun/2011 23:24:47] "GET /vidmgr/ HTTP/1.1" 200 -
192.168.1.102:1801 - - [13/Jun/2011 23:24:47] Starting HME: vidmgr
192.168.1.102:1801 - - [13/Jun/2011 23:29:27] Ending HME: vidmgr
192.168.1.102:1802 - - [13/Jun/2011 23:29:43] "GET /vidmgr/ HTTP/1.1" 200 -
192.168.1.102:1802 - - [13/Jun/2011 23:29:43] Starting HME: vidmgr
192.168.1.102:1802 - - [13/Jun/2011 23:41:28] Ending HME: vidmgr
192.168.1.102:1807 - - [13/Jun/2011 23:41:31] "GET /vidmgr/icon.png HTTP/1.0" 200 -
192.168.1.102:1846 - - [13/Jun/2011 23:41:35] "GET /vidmgr/ HTTP/1.1" 200 -
192.168.1.102:1846 - - [13/Jun/2011 23:41:35] Starting HME: vidmgr
192.168.1.102:1846 - - [13/Jun/2011 23:49:23] Ending HME: vidmgr
192.168.1.102:1856 - - [14/Jun/2011 00:59:53] "GET /vidmgr/ HTTP/1.1" 200 -
192.168.1.102:1856 - - [14/Jun/2011 00:59:53] Starting HME: vidmgr
192.168.1.102:1856 - - [14/Jun/2011 01:00:37] Ending HME: vidmgr
192.168.1.102:1860 - - [14/Jun/2011 01:00:38] "GET /vidmgr/icon.png HTTP/1.0" 200 -
192.168.1.102:1899 - - [14/Jun/2011 01:00:44] "GET /vidmgr/ HTTP/1.1" 200 -
192.168.1.102:1899 - - [14/Jun/2011 01:00:44] Starting HME: vidmgr
192.168.1.102:1899 - - [14/Jun/2011 01:04:20] Ending HME: vidmgr
192.168.1.102:1942 - - [14/Jun/2011 01:25:02] "GET /vidmgr/icon.png HTTP/1.0" 200 -
192.168.1.102:1982 - - [14/Jun/2011 01:25:15] "GET /vidmgr/ HTTP/1.1" 200 -
192.168.1.102:1982 - - [14/Jun/2011 01:25:15] Starting HME: vidmgr
192.168.1.102:1982 - - [14/Jun/2011 01:29:26] Ending HME: vidmgr
192.168.1.102:1983 - - [14/Jun/2011 01:30:07] "GET /vidmgr/ HTTP/1.1" 200 -
192.168.1.102:1983 - - [14/Jun/2011 01:30:07] Starting HME: vidmgr
192.168.1.102:1983 - - [14/Jun/2011 01:35:31] Ending HME: vidmgr
192.168.1.101:4234 - - [14/Jun/2011 10:29:46] "GET /vidmgr/icon.png HTTP/1.0" 200 -
192.168.1.101:4273 - - [14/Jun/2011 10:30:05] "GET /vidmgr/ HTTP/1.1" 200 -
192.168.1.101:4273 - - [14/Jun/2011 10:30:05] Starting HME: vidmgr
192.168.1.101:4273 - - [14/Jun/2011 10:30:21] Ending HME: vidmgr
192.168.1.101:4278 - - [14/Jun/2011 10:30:22] "GET /vidmgr/icon.png HTTP/1.0" 200 -

rather than the output from pyTivo:
RAID-Server:/usr/share/pyhme# more /var/log/pyTivo.log
INFO:pyTivo.beacon:Announcing shares...
INFO:pyTivo.beacon:Registering: DVD
INFO:pyTivo.beacon:Registering: Group by Alpha
INFO:pyTivo.beacon:Registering: RAID Server
INFO:pyTivo.beacon:Registering: Unverified
INFO:pyTivo.beacon:Registering: Videos by Date
INFO:pyTivo.beacon:Registering: Videos by Genre
INFO:pyTivo.beacon:Scanning for TiVos...
INFO:pyTivo.beacon:HD Theater
INFO:pyTivo.beacon:HD Livingroom
INFO:pyTivo:pyTivo is ready.
INFO:pyTivo:192.168.1.102 [14/Jun/2011 10:03:37] "GET /TiVoConnect?Command=QueryContainer&Container=%2F HTTP/1.0" 200 -
INFO:pyTivo:192.168.1.101 [14/Jun/2011 10:03:37] "GET /TiVoConnect?Command=QueryContainer&Container=%2F HTTP/1.0" 200 -
INFO:pyTivo:192.168.1.103 [14/Jun/2011 10:04:37] "GET /TiVoConnect?Command=QueryContainer&Container=%2F HTTP/1.0" 200 -
INFO:pyTivo:192.168.1.103 [14/Jun/2011 10:11:15] "GET /TiVoConnect?Command=QueryContainer&Container=%2F HTTP/1.0" 200 -
INFO:pyTivo:192.168.1.103 [14/Jun/2011 10:11:16] "GET /TiVoConnect?Command=QueryContainer&Container=%2F HTTP/1.0" 200 -
INFO:pyTivo:192.168.1.103 [14/Jun/2011 10:11:16] "GET /TiVoConnect?Command=QueryContainer&Container=%2F HTTP/1.0" 200 -
INFO:pyTivo:192.168.1.103 [14/Jun/2011 10:11:24] "GET /TiVoConnect?Command=QueryFormats&SourceFormat=video%2Fx-tivo-mpeg HTTP/1.1" 200 -
DEBUG:pyTivo.dvdvideo:mobileagent: -1 useragent: tvhttpclient
INFO:pyTivo:192.168.1.103 [14/Jun/2011 10:11:24] "GET /TiVoConnect?Command=QueryContainer&Container=DVD&SortOrder=!CaptureDate&ItemCount=8&Filter=x-tivo-container%2Ftivo-videos,x-tivo-container%2Ffolder,video%2Fx-tivo-
mpeg,video%2F* HTTP/1.1" 200 -
INFO:pyTivo:192.168.1.103 [14/Jun/2011 10:11:28] "GET /TiVoConnect?Command=QueryFormats&SourceFormat=video%2Fx-tivo-mpeg HTTP/1.1" 200 -
DEBUG:pyTivo.dvdvideo:mobileagent: -1 useragent: tvhttpclient
INFO:pyTivo:192.168.1.103 [14/Jun/2011 10:11:28] "GET /TiVoConnect?Command=QueryContainer&Container=DVD%2F39%20Steps&SortOrder=!CaptureDate&ItemCount=8&Filter=x-tivo-container%2Ftivo-videos,x-tivo-container%2Ffolder,vi
deo%2Fx-tivo-mpeg,video%2F* HTTP/1.1" 200 -
INFO:pyTivo:192.168.1.103 [14/Jun/2011 10:11:33] "GET /TiVoConnect?Command=QueryFormats&SourceFormat=video%2Fx-tivo-mpeg HTTP/1.1" 200 -
DEBUG:pyTivo.video.transcode:starting ffmpeg, will wait 10 seconds for it to complete
DEBUG:pyTivo.video.transcode:ffmpeg output=FFmpeg version SVN-r25838, Copyright (c) 2000-2010 the FFmpeg developers
built on Jan 21 2011 08:21:58 with gcc 4.4.5
configuration: --enable-libdc1394 --prefix=/usr --extra-cflags='-Wall -g ' --cc='ccache cc' --enable-shared --enable-libmp3lame --enable-gpl --enable-libvorbis --enable-pthreads --enable-libfaac --enable-libxvid --en
able-postproc --enable-x11grab --enable-libgsm --enable-libtheora --enable-libopencore-amrnb --enable-libopencore-amrwb --enable-libx264 --enable-libspeex --enable-nonfree --disable-stripping --enable-avfilter --enable
-libdirac --disable-decoder=libdirac --enable-libschroedinger --disable-encoder=libschroedinger --enable-version3 --enable-libopenjpeg --enable-libvpx --enable-librtmp --extra-libs=-lgcrypt --disable-altivec --disable-
armv5te --disable-armv6 --disable-vis
libavutil 50.33. 0 / 50.33. 0
libavcore 0.14. 0 / 0.14. 0
libavcodec 52.97. 2 / 52.97. 2
libavformat 52.87. 1 / 52.87. 1
libavdevice 52. 2. 2 / 52. 2. 2
libavfilter 1.65. 0 / 1.65. 0
libswscale 0.12. 0 / 0.12. 0
libpostproc 51. 2. 0 / 51. 2. 0
pipe:: Invalid data found when processing input

orangeboy
06-14-2011, 07:39 PM
Hooray for DEAD BEEF! It's fun to spell in Hex. :D

lrhorer
06-14-2011, 08:01 PM
Damn! I keep forgetting the pyTivo.conf file has some modestly sensitive information in it.

rrr22777
06-14-2011, 09:26 PM
...



Thank you for the example. Got things working well except this error when trying to browse.

[root@linux1 pyhme]# python start.py
HME Server for Python 0.19
Tue Jun 14 19:31:19 2011 Server Starts
Registering: vidmgr
192.168.0.250:37550 - - [14/Jun/2011 19:31:25] "GET /vidmgr/icon.png HTTP/1.0" 200 -
192.168.0.250:37551 - - [14/Jun/2011 19:31:28] "GET /vidmgr/ HTTP/1.1" 200 -
192.168.0.250:37551 - - [14/Jun/2011 19:31:28] Starting HME: vidmgr
----------------------------------------
Exception happened during processing of request from ('192.168.0.250', 37551)
Traceback (most recent call last):
File "/usr/lib64/python2.6/SocketServer.py", line 560, in process_request_thread
self.finish_request(request, client_address)
File "/usr/lib64/python2.6/SocketServer.py", line 322, in finish_request
self.RequestHandlerClass(request, client_address, self)
File "start.py", line 141, in __init__
client_address, server)
File "/usr/lib64/python2.6/SocketServer.py", line 617, in __init__
self.handle()
File "/usr/lib64/python2.6/BaseHTTPServer.py", line 329, in handle
self.handle_one_request()
File "/usr/lib64/python2.6/BaseHTTPServer.py", line 323, in handle_one_request
method()
File "start.py", line 232, in do_GET
self._page(True)
File "start.py", line 186, in _page
appinst.mainloop()
File "/u03/samba/HMO/pyhme/hme.py", line 1139, in mainloop
while self.active and self.get_event():
File "/u03/samba/HMO/pyhme/hme.py", line 1192, in get_event
handle(keynum, rawcode)
File "/u03/samba/HMO/pyhme/vidmgr/__init__.py", line 314, in handle_key_press
self.handle_key_pressList(keynum, rawcode)
File "/u03/samba/HMO/pyhme/vidmgr/__init__.py", line 463, in handle_key_pressList
self.drawScreen()
File "/u03/samba/HMO/pyhme/vidmgr/__init__.py", line 761, in drawScreen
self.drawScreenDetail()
File "/u03/samba/HMO/pyhme/vidmgr/__init__.py", line 896, in drawScreenDetail
if self.listing[self.indexDetail]['thumb']:
IndexError: list index out of range
----------------------------------------

orangeboy
06-14-2011, 09:58 PM
Damn! I keep forgetting the pyTivo.conf file has some modestly sensitive information in it.

As does pyHME... ;)

jbernardis
06-14-2011, 09:59 PM
Thank you for the example. Got things working well except this error when trying to browse.

[root@linux1 pyhme]# python start.py
HME Server for Python 0.19
Tue Jun 14 19:31:19 2011 Server Starts
Registering: vidmgr
192.168.0.250:37550 - - [14/Jun/2011 19:31:25] "GET /vidmgr/icon.png HTTP/1.0" 200 -
192.168.0.250:37551 - - [14/Jun/2011 19:31:28] "GET /vidmgr/ HTTP/1.1" 200 -
192.168.0.250:37551 - - [14/Jun/2011 19:31:28] Starting HME: vidmgr
----------------------------------------
Exception happened during processing of request from ('192.168.0.250', 37551)
Traceback (most recent call last):
File "/usr/lib64/python2.6/SocketServer.py", line 560, in process_request_thread
self.finish_request(request, client_address)
File "/usr/lib64/python2.6/SocketServer.py", line 322, in finish_request
self.RequestHandlerClass(request, client_address, self)
File "start.py", line 141, in __init__
client_address, server)
File "/usr/lib64/python2.6/SocketServer.py", line 617, in __init__
self.handle()
File "/usr/lib64/python2.6/BaseHTTPServer.py", line 329, in handle
self.handle_one_request()
File "/usr/lib64/python2.6/BaseHTTPServer.py", line 323, in handle_one_request
method()
File "start.py", line 232, in do_GET
self._page(True)
File "start.py", line 186, in _page
appinst.mainloop()
File "/u03/samba/HMO/pyhme/hme.py", line 1139, in mainloop
while self.active and self.get_event():
File "/u03/samba/HMO/pyhme/hme.py", line 1192, in get_event
handle(keynum, rawcode)
File "/u03/samba/HMO/pyhme/vidmgr/__init__.py", line 314, in handle_key_press
self.handle_key_pressList(keynum, rawcode)
File "/u03/samba/HMO/pyhme/vidmgr/__init__.py", line 463, in handle_key_pressList
self.drawScreen()
File "/u03/samba/HMO/pyhme/vidmgr/__init__.py", line 761, in drawScreen
self.drawScreenDetail()
File "/u03/samba/HMO/pyhme/vidmgr/__init__.py", line 896, in drawScreenDetail
if self.listing[self.indexDetail]['thumb']:
IndexError: list index out of range
----------------------------------------



Do you see anything on the TV before this message? What is in the directory you are currently in? Can you give me a dierctory listing?

jbernardis
06-14-2011, 10:05 PM
I have a new version out on git that addressed some of the concerns of lrhorer. This is version 0.5d. The changes are:
Version 0.5d 6/14/11
- added logic to load thumbnails just in time rather than ahead of time. This speeds up initial painting of a page, but slows down navigation within the page. Beacuse of this,
- I added an image cache to speed up image processing. This is just an in-memory cache, but if you exit the app cleanly - by hitting left all the way out - the cache is saved to disk for future runs. The cache quickly got too big to save to disk with every change, so this was a compromise
- added logic to scale the thumbnail to fit in the 320 pixel wide view frame. Thanks to wmcbrine for the picture sample hme app that told me how to do this. A side effect of this - you need to have the python image lib (PIL) installed. Just google PIL and you will find links for the version of python you have installed.

I am a bit concerned over the size the cache can grow to - so I'd be interested if lrhorer could give me his experience with this. I might have to implement something that limits the size of the cache.

I could also provide a tool to generate the cache ahead of time if there is interest in that. Right now, there is a little sluggishness the first time you load an image, but once it's in the cache, things are snappier. If you pre-create the cache, you avoid this first time pain.


NOTE there is a new py file (thumbcache.py) in the vidmgr directory.

lrhorer
06-15-2011, 12:49 AM
As does pyHME... ;)
What, the TSNs? Are those sensitive?

lrhorer
06-15-2011, 01:03 AM
I have a new version out on git that addressed some of the concerns of lrhorer. This is version 0.5d. The changes are:
Version 0.5d 6/14/11
It's not on the git, yet. Did you upload it? Also, the download is still not working here in FireFox. It works for IceWeasel.

wmcbrine
06-15-2011, 04:18 AM
I might have to implement something that limits the size of the cache.pyTivo uses the lrucache module for this purpose.

jbernardis
06-15-2011, 07:45 AM
It's not on the git, yet. Did you upload it? Also, the download is still not working here in FireFox. It works for IceWeasel.

Sorry about this everybody - I guess I was tired last night. Apparently I forgot to upload to git. I THOUGHT I had done so. I am at work and do not have the latest code with me - it will have to wait until this evening.

jbernardis
06-15-2011, 07:47 AM
pyTivo uses the lrucache module for this purpose.

I was thinking of some kind of LRU algorithm, but I didn't realize python has one already. I need to explore the modules more.

I also need to explore how to make the cache threadsafe. Since the cache exists at the module level, there could potentially be multiple threads using it. I assume python has some kind of mutex mechanism.

jbernardis
06-15-2011, 08:00 AM
Thank you for the example. Got things working well except this error when trying to browse.


rrr22777 - I'm just looking a bit closer at the code, and I think I know what happened. I just want to make sure my assumptions are accurate:

Since it appears you are new to pytivo also, I guessed that 1) you have no videos in your shares, and 2) you only have a single share.

I think I see where the logic falls apart in that case. In that situation, there is basically nothing for the app to do - there is nothing to navigate. I can test that tonight - I already know how to fix it, and if I am right, I will post the fix with the release I apparently forgot to upload last night.

orangeboy
06-15-2011, 09:42 AM
What, the TSNs? Are those sensitive?

Hmm... Good question. But yes, that's what I was referring to. There's been some discussion about disclosing one's TSN publicly, but really no examples of what another could do with such a TSN.

Apologies for meandering off-topic.

rrr22777
06-15-2011, 03:25 PM
rrr22777 - I'm just looking a bit closer at the code, and I think I know what happened. I just want to make sure my assumptions are accurate:

Since it appears you are new to pytivo also, I guessed that 1) you have no videos in your shares, and 2) you only have a single share.
...

Long time pytivo user. Also use streambaby but pytivo never crashes while steambaby does on some videos. Both are running on the same computer with the same ffmpeg binary.

As for pytivo only 1 video share but about 50 folders in that share with videos in various formats. Gives me an error saying it cannot transfer on all videos but only crashes on some foldesr. I am mostly looking into this app for the delete functionality. Can the ability to just initiate a regular download to tivo be added if the video does to conform to the right standard?

I can upload more debug info when I get home if you would like. 100% with the poster that said Tivo needs to learn a few things about how to display its NPL based on this app.

jbernardis
06-15-2011, 03:35 PM
It's interesting that it only crashes on some folders. This app does not process the files at all - it makes push requests to pytivo through its HTTP interface. All my app does, basically, is process directories and read some metadata information.

Whatever info you can get to me would be beneficial - particularly the contents of the directories that crash. I think for some reason my app thinks you have an empty directory but yet it is continuing to process it. I can't figure out why.

Also, do you know what version you are running? I just added a print statement at startup that displays the version number, but this wasn't in early versions. The version number is up near the top of the __init__.py file.

jbernardis
06-15-2011, 05:40 PM
This time I made certain of my posting - version 0.5d is definitely on git. It's probably best that this was delayed a day because I was able to address the concerns I mentioned yesterday. I now use LRU logic to maintain the last X images in memory. X is initially set to 100. It's currently not configurable because the cache is initialize at module import time and "normal" access to the config file is unavailable. I can parse the file myself if we find we need to be able to tune this parameter.

I limited it to 100 because I was concerned about memory use - especially on my system (which is my readynas server). Since the cache is maintained at the module level, I needed to add mutex protection; however, this also means that the cache will be maintained from one usage to the next. In addition to this, if you exit the app cleanly - by hitting left all the way out, the cache will be written to disk - so it will survive a stop/restart of the server (although the lru ordering will not survive a restart)

Overall, I'm not 100% on board with the cache. I think we gained sufficient performance gain my loading the images just in time rather that in advance. I think the marginal gain realized by the cache might not be worth the processing required. But again, we'll see how it goes.

rr22777:

I definitely found a hole in the logic that would have caused the exact problem you saw. Frankly I'm surprised it hasn't surfaced before now. Try this version and see if it solves your problem.

Version 0.5d 6/15/11
- added logic to load thumbnails just in time rather that ahead of time. This speeds up initial painting
of a page, but slows down navigation within the page. Beacuse of this,
- I added an image cache. If you exit the app cleanly - by hitting left all the way out - the cache is saved to disk
for future runs. The cache got too big to save to disk with every change, so this was a compromise. The cache uses lru
logic to keep the last X used images in memory. I had to choose some kind of limit here - I chose 100 for now - we'll
see how that works out. Also, the cache exists at the module level, but yet is accessed, and possible changed, at the
HME thread level. Because of this, I had to mutex exclusion around parts of the cache logic.
- added logic to scale the thumbnail to fit in the 320 pixel wide view frame. Thanks to wmcbrine for the picture
sample hme app that told me how to do this. Side effect of this - you need to have the python image lib (PIL) installed
- widened the right hand margin on the info page a bit

lrhorer
06-15-2011, 06:59 PM
This time I made certain of my posting - version 0.5d is definitely on git. It's probably best that this was delayed a day because I was able to address the concerns I mentioned yesterday. I now use LRU logic to maintain the last X images in memory. X is initially set to 100. It's currently not configurable because the cache is initialize at module import time and "normal" access to the config file is unavailable. I can parse the file myself if we find we need to be able to tune this parameter.
Ooh. That's definitely much, much faster ( ~3 seconds vs. 39 seconds on an 800+ video share ), and the cache code seems to be working just fine, but the PIL code has introduced a bug. A large number of the .jpg files in my shares are still 0 bytes in length. (They are place-holders.) Whenever I try to select one of the videos whose thumbnail is 0 bytes in length, vidmgr locks up. I can exit the app in the TiVo by pressing the <TiVo> button (the left arrow does not work), but if I enter vidmgr again, it is still locked up. I have to restart pyHME to get it working again. I'm still working on getting thumbnails for all my videos, but at this point in time, nearly half are still 0 bytes.

Traceback (most recent call last):
File "/usr/lib/python2.6/SocketServer.py", line 560, in process_request_thread
self.finish_request(request, client_address)
File "/usr/lib/python2.6/SocketServer.py", line 322, in finish_request
self.RequestHandlerClass(request, client_address, self)
File "/usr/share/pyhme/start.py", line 141, in __init__
client_address, server)
File "/usr/lib/python2.6/SocketServer.py", line 617, in __init__
self.handle()
File "/usr/lib/python2.6/BaseHTTPServer.py", line 329, in handle
self.handle_one_request()
File "/usr/lib/python2.6/BaseHTTPServer.py", line 323, in handle_one_request
method()
File "/usr/share/pyhme/start.py", line 232, in do_GET
self._page(True)
File "/usr/share/pyhme/start.py", line 186, in _page
appinst.mainloop()
File "/usr/share/pyhme/hme.py", line 1134, in mainloop
while self.active and self.get_event():
File "/usr/share/pyhme/hme.py", line 1187, in get_event
handle(keynum, rawcode)
File "/usr/share/pyhme/vidmgr/__init__.py", line 322, in handle_key_press
self.handle_key_pressList(keynum, rawcode)
File "/usr/share/pyhme/vidmgr/__init__.py", line 469, in handle_key_pressList
self.drawScreen()
File "/usr/share/pyhme/vidmgr/__init__.py", line 768, in drawScreen
self.drawScreenDetail()
File "/usr/share/pyhme/vidmgr/__init__.py", line 942, in drawScreenDetail
self.listing[self.indexDetail]['name'])
File "/usr/share/pyhme/vidmgr/__init__.py", line 1424, in getThumb
data = tc.getImageData(tfn)
File "/usr/share/pyhme/vidmgr/thumbcache.py", line 129, in getImageData
self.cache[filename]['data'] = resizePic(filename, self.width, self.height)
File "/usr/share/pyhme/vidmgr/thumbcache.py", line 17, in resizePic
pic = img.open(fn)
File "/usr/lib/python2.6/dist-packages/PIL/Image.py", line 1980, in open
raise IOError("cannot identify image file")
IOError: cannot identify image file

jbernardis
06-15-2011, 07:07 PM
Ooh. That's definitely much, much faster ( ~3 seconds vs. 39 seconds on an 800+ video share ), and the cache code seems to be working just fine, but the PIL code has introduced a bug. A large number of the .jpg files in my shares are still 0 bytes in length. (They are place-holders.) Whenever I try to select one of the videos whose thumbnail is 0 bytes in length, vidmgr locks up. I can exit the app in the TiVo by pressing the <TiVo> button (the left arrow does not work), but if I enter vidmgr again, it is still locked up. I have to restart pyHME to get it working again. I'm still working on getting thumbnails for all my videos, but at this point in time, nearly half are still 0 bytes.


I can, and probably should, put a try block around that code. I'll get something out right away.

Great to hear the other changes are for the better.

lrhorer
06-15-2011, 07:21 PM
- added logic to scale the thumbnail to fit in the 320 pixel wide view frame. Thanks to wmcbrine for the picture
sample hme app that told me how to do this. Side effect of this - you need to have the python image lib (PIL) installed
You weren't clear in your e-mails why increasing the width of the view frame would be an issue, but I would definitely still like to lobby for a wider view frame, if it is at all a reasonable thing to implement in code. In my opinion, there is absolutely no question that this

http://fletchergeek.com/images/thumbnail1.jpg

and this

http://fletchergeek.com/images/thumbnail2.jpg

are far more impressive on-screen than this

http://fletchergeek.com/images/thumbnail3.jpg

and this

http://fletchergeek.com/images/thumbnail4.jpg

There's plenty of screen real-estate to support these pictures.

lrhorer
06-15-2011, 07:27 PM
I can, and probably should, put a try block around that code. I'll get something out right away.
Thanks! I suspect non-zero length, but still invalid, files might also cause the problem.

Great to hear the other changes are for the better.
Oh, they are, they are. You rock, man!

jbernardis
06-15-2011, 07:28 PM
You weren't clear in your e-mails why increasing the width of the view frame would be an issue, but I would definitely still like to lobby for a wider view frame, if it is at all a reasonable thing to implement in code. In my opinion, there is absolutely no question that this

and this

are far more impressive on-screen than this

and this

There's plenty of screen real-estate to support these pictures.

I don't dispute the quality of the pics, and it's really simple code to have a different size image. It's just a question of layout.

Right now, the entire left half of the screen is devoted to the various lists, the right half for details. The top of the right is for description, and the area to the right of the image is for the sub menu (push/delete) and the tivo menu.

In the meantime, 0.5e is on git with the try block

jbernardis
06-15-2011, 07:51 PM
Would people rather have a landscape oriented view for thumbnails as opposed to the portrait one I have? I chose the present orientation because it is a good aspect ratio for DVD cover art, but I also know that people have been using video thumbnail maker, which would lend itself to landscape orientation. I'm willing to lay the screen out with a landscape orientation if that seems to be the concensus among users. Let me know.

lrhorer
06-15-2011, 08:10 PM
In the meantime, 0.5e is on git with the try block
It works just great. Thanks, yet again.

lrhorer
06-15-2011, 08:29 PM
Would people rather have a landscape oriented view for thumbnails as opposed to the portrait one I have? I chose the present orientation because it is a good aspect ratio for DVD cover art, but I also know that people have been using video thumbnail maker, which would lend itself to landscape orientation. I'm willing to lay the screen out with a landscape orientation if that seems to be the concensus among users. Let me know.
Almost all of my thumbnails are taken from cover art, and so approximate a portrait layout. There are a number of exceptions. In addition to the photos above, which are thumbnails taken from some slideshows I produced using my own photographs, there are the following, none of which are portrait aspects:

http://fletchergeek.com/images/folder1.jpg
http://fletchergeek.com/images/folder2.jpg
http://fletchergeek.com/images/folder3.jpg
http://fletchergeek.com/images/folder4.jpg
http://fletchergeek.com/images/folder5.jpg

My preference would be not to scale the images at all.

jbernardis
06-15-2011, 08:40 PM
Almost all of my thumbnails are taken from cover art, and so approximate a portrait layout. There are a number of exceptions. In addition to the photos above, which are thumbnails taken from some slideshows I produced using my own photographs, there are the following, none of which are portrait aspects:


My preference would be not to scale the images at all.

That's all fine, but I'm not really talking about scaling. In the HME model, I have to define rectangular areas of the screen (called views) into which I place resources (such as text or images). Now these views CAN overlap, but I have certain aspets of the screen that need to be visible. The bottom line is that I need to devote a retangular area of the screen to these images and I don't want it to overlap with any of the other "controls". The question is do you want that to be landscape or portrait.

As far as scaling, I can change the scaling so that it only scales DOWN if images are too big. Aspect ratio will always be maintained.

lrhorer
06-15-2011, 08:41 PM
I don't dispute the quality of the pics, and it's really simple code to have a different size image. It's just a question of layout.

Right now, the entire left half of the screen is devoted to the various lists, the right half for details. The top of the right is for description, and the area to the right of the image is for the sub menu (push/delete) and the tivo menu.
That's a very reasonable argument. I counter, however, by pointing out that the user generally spends very little time with the sub-menu up. Most of the time is spent browsing the video list to decide which video(s) to transfer (or delete if the user has that funtion enabled - I don't). When the decision is made, the transfer is selected in a few moments and the user continues on browsing the list, or else exits vidmgr. As a test, I changed the view frame in your code to 600 pixels and selected a couple of shows to transfer. The small selection images dutifully popped up over the middle-ground photo for selection. It was not in the least objectionable, and the middle-ground photos were displayed in all their glory.

Of course, it is entirely your call, but my definite preference would be to allow the user to set / create whatever size and aspect he wanted for each individual photo, and have the system simply crop the picture (the way your code did originally) and not worry about the aspect. Even with thumbnails that are more nearly portrait aspect, re-sizing them produces some unpleasant results. That, and 444 pixels is too large for the height, IMO. It causes the photos to protrude down below the title frame, which causes the screen to look lopsided.

jbernardis
06-15-2011, 08:55 PM
That's a very reasonable argument. I counter, however, by pointing out that the user generally spends very little time with the sub-menu up. Most of the time is spent browsing the video list to decide which video(s) to transfer (or delete if the user has that funtion enabled - I don't). When the decision is made, the transfer is selected in a few moments and the user continues on browsing the list, or else exits vidmgr. As a test, I changed the view frame in your code to 600 pixels and selected a couple of shows to transfer. The small selection images dutifully popped up over the middle-ground photo for selection. It was not in the least objectionable, and the middle-ground photos were displayed in all their glory.

Of course, it is entirely your call, but my definite preference would be to allow the user to set / create whatever size and aspect he wanted for each individual photo, and have the system simply crop the picture (the way your code did originally) and not worry about the aspect. Even with thumbnails that are more nearly portrait aspect, re-sizing them produces some unpleasant results. That, and 444 pixels is too large for the height, IMO. It causes the photos to protrude down below the title frame, which causes the screen to look lopsided.

We're both responding at the same time and our responses are criss-crossing :)

SO you're saying that when you made the view for the thumbnails the full width of the screen, that the submenus overlapping the image was not objectionable.

Actually looking at the code, it's only because I defined the thumbnail view BEFORE the submenu views that the submenu was even visible. But that''s OK - we can take advantage of that fact, even though that's not why it was done like this.

If I do this, It would remove the PIL dependency and quicken the response time a bit when navigating because there is less image processing going on. At the same time, it allows for more dramatic thumbnails as you showed.

Ok - you convinced me - but I need to unplug for a while - maybe tomorrow :)

Back when I had to be convinced that I should share this app, the argument was made that the community would help make it better. If it was just me using it, I would have been happy with the SD text-based version. Looking back over the past couple of weeks, I'd have to say this has been a great ride. I'd glad so many people are enjoying using this app. I just hope that it eventually settles down to where it changes a little less often.

lrhorer
06-15-2011, 09:09 PM
That's all fine, but I'm not really talking about scaling. In the HME model, I have to define rectangular areas of the screen (called views) into which I place resources (such as text or images). Now these views CAN overlap, but I have certain aspets of the screen that need to be visible.
That's clear.

The bottom line is that I need to devote a retangular area of the screen to these images and I don't want it to overlap with any of the other "controls". The question is do you want that to be landscape or portrait.
That isn't. What's wrong with a control being on top of an image? Certainly all the controls are on top of the background image, so how is a middle-ground image so different? Fundamentally, what's wrong with this:

http://fletchergeek.com/images/vidmgr.jpg

That's how it wound up looking - more or less - in my test.

As far as scaling, I can change the scaling so that it only scales DOWN if images are too big. Aspect ratio will always be maintained.
I think that's better than stretching.

reneg
06-15-2011, 09:20 PM
Would people rather have a landscape oriented view for thumbnails as opposed to the portrait one I have? I chose the present orientation because it is a good aspect ratio for DVD cover art, but I also know that people have been using video thumbnail maker, which would lend itself to landscape orientation. I'm willing to lay the screen out with a landscape orientation if that seems to be the concensus among users. Let me know.

I prefer portrait as most of my files are tv series related and I've been pulling poster images from thetvdb.com which fits within your thumbnail boundaries.

Just an idea if I might offer up a possible alternative, in each directory (or video file) check for a backgroundHD file in the directory or filename.backgroundHD. That could give up to 1280x720 pixels for whatever image the user want.

lrhorer
06-15-2011, 09:25 PM
We're both responding at the same time and our responses are criss-crossing :)
Kind of like chat, isn't it.

SO you're saying that when you made the view for the thumbnails the full width of the screen, that the submenus overlapping the image was not objectionable.
Yeah, see above. Another one of my criss-crossed mesages. :eek:

Actually looking at the code, it's only because I defined the thumbnail view BEFORE the submenu views that the submenu was even visible. But that''s OK - we can take advantage of that fact, even though that's not why it was done like this.
Serendipity.

If I do this, It would remove the PIL dependency
and quicken the response time a bit when navigating because there is less image processing going on. At the same time, it allows for more dramatic thumbnails as you showed.
Yeah the PIL issue doesn't really bother me - personally at least - since PIL is automatically included with my distro. I don't know about the Windows and Mac folks, or even other Linux distros. The image processing time is a little more of a philosophical concern, although on this system it's not objectionable. The last bit, obviously, pushes a button for me.

Ok - you convinced me - but I need to unplug for a while - maybe tomorrow :)
Take all weekend, if you ask me. You deserve a break.

Back when I had to be convinced that I should share this app, the argument was made that the community would help make it better. If it was just me using it, I would have been happy with the SD text-based version.
Yeah, for a guy who said he didn't want to develop or support the app, you are sure doing a good imitation of both. :D

Looking back over the past couple of weeks, I'd have to say this has been a great ride. I'd glad so many people are enjoying using this app.
We are. I hope it's been fun for you. On that note, are you accepting donations?

I just hope that it eventually settles down to where it changes a little less often.
I think it will, quickly. Realize, too, that there is nothing forcing you to meet any schedule. If you want to delay implementing a feature, or even refuse to implement it altogether, you should not feel any compulsion to second guess yourself just because we want it. I figure you've got to be experiencing the onset of burn-out.

jbernardis
06-15-2011, 09:32 PM
Take all weekend, if you ask me. You deserve a break.

Actually - I had to see it for myself - it was really a trivial change - it's already on git as version 0.5f - is this a record yet?


Yeah, for a guy who said he didn't want to develop or support the app, you are sure doing a good imitation of both. :D


We are. I hope it's been fun for you. On that note, are you accepting donations?

No donations please!! I do this for fun.



I think it will, quickly. Realize, too, that there is nothing forcing you to meet any schedule. If you want to delay implementing a feature, or even refuse to implement it altogether, you should not feel any compulsion to second guess yourself just because we want it. I figure you've got to be experiencing the onset of burn-out.

But like I trid to say earlier - all of the suggestions - especially yours, have helped to turn what was a pretty mediocre app into one I am proud of. Yes it's approaching burn out. My wife has forgotten what I look like (and vice-versa) but when I get into something like this, I get consumed.

jbernardis
06-15-2011, 09:37 PM
I prefer portrait as most of my files are tv series related and I've been pulling poster images from thetvdb.com which fits within your thumbnail boundaries.

Just an idea if I might offer up a possible alternative, in each directory (or video file) check for a backgroundHD file in the directory or filename.backgroundHD. That could give up to 1280x720 pixels for whatever image the user want.

Have no fear - with the changes made, your portrait images will be unchanged. Actually as I say this, I seem to think that they'll be centered in the larger window - and I was right - I just verified that by checking on my tivo. Actually though, the centered image was not upsetting.

If people want, though, I can make a simple change to left justify the image so it looks like it did before.

lrhorer
06-15-2011, 09:50 PM
Have no fear - with the changes made, your portrait images will be unchanged. Actually as I say this, I seem to think that they'll be centered in the larger window - and I was right - I just verified that by checking on my tivo. Actually though, the centered image was not upsetting.
I wouldn't think so.

If people want, though, I can make a simple change to left justify the image so it looks like it did before.
I think I prefer the left-justified, but it's a mild preference. Centered is fine.

jbernardis
06-15-2011, 10:03 PM
Ok - this is it - at least for today. And to show a sense of finality, I'm bumping the version number, not the letter - version 0.6 is on git.

This one corrects the left justification oversight from the last version. Images are now, by default, left justified. HOWEVER, I also added a config.ini option, thumbjustify, that can be set to center or right if you want that. If you omit this, it will default to left.

Goot night everyone :)

jcthorne
06-16-2011, 05:54 AM
I am having some diffeculty in getting vidmgr (and PythonHME) to run properly on my Synology NAS. Its strange. If I execute the following at an SSH command line:

python /usr/local/pythonHME/start.py

It starts normally with the response text shown in the SSH session. Running through the menus on the tivo it works normally. However pythonHME stops when I exit the SSH session.

If i use this command in a startup script executed at bootup:

/opt/bin/python /usr/local/pythonHME/start.py > /dev/null 2>&1 &

It starts pythonHME but ignores the config.ini file as if it cannot read it. Starts all apps, rather than just vidmgr listed in the apps section and vidmgr bombs if its called from the tivo, likely because its missing information from the config.ini file like path and pytivo location etc.

Suggestions?

orangeboy
06-16-2011, 06:04 AM
Would people rather have a landscape oriented view for thumbnails as opposed to the portrait one I have? I chose the present orientation because it is a good aspect ratio for DVD cover art, but I also know that people have been using video thumbnail maker, which would lend itself to landscape orientation. I'm willing to lay the screen out with a landscape orientation if that seems to be the concensus among users. Let me know.

Could you use image.size to determine the dimensions of the image, and choose orientation dynamically?


width=image.size[0]
height=image.size[1]

if width > height:
orientation=landscape
else:
orientation=portrait

windracer
06-16-2011, 07:06 AM
I am having some diffeculty in getting vidmgr (and PythonHME) to run properly on my Synology NAS.
Maybe make sure in your script you 'cd' into your pyhme directory first? In my startup script, I do this:
cd /etc/tivo/pyhme
/etc/tivo/pyhme/start.py > /var/log/pyhme.log 2>&1 &

orangeboy
06-16-2011, 07:22 AM
Maybe make sure in your script you 'cd' into your pyhme directory first? In my startup script, I do this:
cd /etc/tivo/pyhme
/etc/tivo/pyhme/start.py > /var/log/pyhme.log 2>&1 &

Yeah, I had issues with start.py and/or installed apps finding the config file when invoking start.py outside it's directory. Adding in a cd command clear things right up for me (on Windows).

jbernardis
06-16-2011, 08:18 AM
Could you use image.size to determine the dimensions of the image, and choose orientation dynamically?



The final (for now) design that I ended up with just drops the image into the view whatever its orientation - no scaling. The view is no longer 320X444 - it is now 620x450 - basically the entire lower right. If you have portrait thumbs that fit into the old view - nothing will change - they will be top/left justified in the view and appear the same. If you have larger (and wider) images, then as much as possible will fit into the viewport - this will allow for landscape images also. The difference is that for these wide images, the push/delete/tivo buttons COULD overlay the actual image.

jcthorne
06-16-2011, 08:33 AM
tried your suggestion. No Go. Here is my startup script called startHME.sh:

`sleep 60`
cd /usr/local/pythonHME
/opt/bin/python /usr/local/pythonHME/start.py > /dev/null 2>&1 &

Is the name of the folder start.py is located in significant? I notice yours is /pyhme

I ran the script from a command line and get this feedback:

: not foundtc/rc.d/startHME.sh: line 1:
/usr/syno/etc/rc.d/startHME.sh: cd: line 2: can't cd to /usr/local/pythonHME
: not foundtc/rc.d/startHME.sh: line 3:

after this start.py is running but again did not ready the config.ini file

jbernardis
06-16-2011, 08:40 AM
tried your suggestion. No Go. Here is my startup script called startHME.sh:

`sleep 60`
cd /usr/local/pythonHME
/opt/bin/python /usr/local/pythonHME/start.py > /dev/null 2>&1 &

Is the name of the folder start.py is located in significant? I notice yours is /pyhme

The name of the pyhme folder is not significant, but all of the apps, including vidmgr, should be off of that directory and must be named the same as the application class in the __init__.py file (vidmgr) in my case.

Try running it without throwing away your output - or redirect it to a real file - to see what is says.

lrhorer
06-16-2011, 08:52 AM
/opt/bin/python /usr/local/pythonHME/start.py > /dev/null 2>&1 &

It starts pythonHME but ignores the config.ini file as if it cannot read it. Starts all apps, rather than just vidmgr listed in the apps section and vidmgr bombs if its called from the tivo, likely because its missing information from the config.ini file like path and pytivo location etc.

Suggestions?
I do this:

#! /bin/bash
PIDFILE=/var/run/pyHME.pid
RUNDIR=/usr/share/pyhme
LOGFILE=/var/log/pyhme.log
cd $RUNDIR
/usr/bin/nohup $RUNDIR/start.py > $LOGFILE 2>&1 &
echo $! > $PIDFILE
exit 0
This in turn is called from the startup script:

RAID-Server:/usr/share/pyhme# cat /etc/init.d/pyHME
#! /bin/sh
### BEGIN INIT INFO
# Provides: pyHME
# Required-Start: $remote_fs $syslog $network $pyTivo
# Required-Stop: $remote_fs $syslog $network $pyTivo
# Default-Start: 2 3 4 5
# Default-Stop: 0 1 6
# Short-Description: HME Services
# Description: Provides HME services for TiVo
#
### END INIT INFO

# Author: Leslie Rhorer

# Do NOT "set -e"

# PATH should only include /usr/* if it runs after the mountnfs.sh script
PATH=/sbin:/usr/sbin:/bin:/usr/bin
DESC="HME Services"
NAME=pyHME
DAEMON=/usr/share/pyhme/$NAME
DAEMON_ARGS=""
PIDFILE=/var/run/$NAME.pid
SCRIPTNAME=/etc/init.d/$NAME

# Exit if the package is not installed
[ -x "$DAEMON" ] || exit 0

# Read configuration variable file if it is present
[ -r /etc/default/$NAME ] && . /etc/default/$NAME

# Load the VERBOSE setting and other rcS variables
. /lib/init/vars.sh

# Define LSB log_* functions.
# Depend on lsb-base (>= 3.2-14) to ensure that this file is present
# and status_of_proc is working.
. /lib/lsb/init-functions

#
# Function that starts the daemon/service
#
do_start()
{
# Return
# 0 if daemon has been started
# 1 if daemon was already running
# 2 if daemon could not be started
if [ -e "$PIDFILE" ];
then
PIDVAL=$( cat $PIDFILE )
ps -ef | grep $PIDVAL | grep -qv grep && return 1
rm $PIDFILE
fi
start-stop-daemon --start --quiet --pidfile $PIDFILE --exec $DAEMON || return 2
}

#
# Function that stops the daemon/service
#
do_stop()
{
# Return
# 0 if daemon has been stopped
# 1 if daemon was already stopped
# 2 if daemon could not be stopped
# other if a failure occurred
if [ -e $PIDFILE ];
then
PIDVAL=$( cat $PIDFILE )
rm -f $PIDFILE
kill -15 $PIDVAL 2> /dev/null
return "$?"
else
return 1
fi
}

case "$1" in
start)
[ "$VERBOSE" != no ] && log_daemon_msg "Starting $DESC" "$NAME"
do_start
case "$?" in
0|1) [ "$VERBOSE" != no ] && log_end_msg 0 ;;
2) [ "$VERBOSE" != no ] && log_end_msg 1 ;;
esac
;;
stop)
[ "$VERBOSE" != no ] && log_daemon_msg "Stopping $DESC" "$NAME"
do_stop
case "$?" in
0|1) [ "$VERBOSE" != no ] && log_end_msg 0 ;;
2) [ "$VERBOSE" != no ] && log_end_msg 1 ;;
esac
;;
restart)
#
# If the "reload" option is implemented then remove the
# 'force-reload' alias
#
log_daemon_msg "Restarting $DESC" "$NAME"
do_stop
case "$?" in
0|1)
do_start
case "$?" in
0) log_end_msg 0 ;;
1) log_end_msg 1 ;; # Old process is still running
*) log_end_msg 1 ;; # Failed to start
esac
;;
*)
# Failed to stop
log_end_msg 1
;;
esac
;;
*)
#echo "Usage: $SCRIPTNAME {start|stop|restart|reload|force-reload}" >&2
echo "Usage: $SCRIPTNAME {start|stop|status|restart|force-reload}" >&2
exit 3
;;
esac

lrhorer
06-16-2011, 09:01 AM
I am having some diffeculty in getting vidmgr (and PythonHME) to run properly on my Synology NAS. Its strange. If I execute the following at an SSH command line:

python /usr/local/pythonHME/start.py

It starts normally with the response text shown in the SSH session. Running through the menus on the tivo it works normally. However pythonHME stops when I exit the SSH session.
Use nohup to prevent the process from terminating when the shell quits. Normally, a spawned process is assigned the calling shell as the parent. Nohup causes the process to be assigned init ( PID 1) as the parent.

jcthorne
06-16-2011, 09:07 AM
I do this:


OK. Thanks, I think. Where do you run those scripts? where is the output shown? I have no idea how to implement most of that, way over my head and a simple copy/paste is not going to run due to the directories all being different from mine. Why is all that necessary just to start pyhme?

jcthorne
06-16-2011, 09:23 AM
Running this script from a command line:

`sleep 60`
cd /usr/local/pythonHME
/opt/bin/python /usr/local/pythonHME/start.py > /usr/local/pyhme.log 2>&1 &

yields these results:

: not foundtc/rc.d/startHME.sh: line 1:
/usr/syno/etc/rc.d/startHME.sh: cd: line 2: can't cd to /usr/local/pythonHME
: not foundtc/rc.d/startHME.sh: line 3:

pyHME is running but did not read the config file. pyhme.log is a zero length file so it did not capture any output.

jbernardis
06-16-2011, 09:34 AM
You don't need the tick marks around sleep 60 - thats actually running sleep 60 and then trying to execute its output - which of course is null.

I don't know why you're getting the other errors, but remove the ticks and try it again

jcthorne
06-16-2011, 09:41 AM
You don't need the tick marks around sleep 60 - thats actually running sleep 60 and then trying to execute its output - which of course is null.

I don't know why you're getting the other errors, but remove the ticks and try it again

running the scripts without the tick marks yields:

'leep: invalid number '60

in addtion to the other errors. very strange.

Using lrhorer's suggestion of using nohup at least lets me start it from a command line and leave it running. Still have no idea why it will not start from the startup script at boot time.

Took me quite a while to get pytivo running from boot time but it does. pyHME starts but does not read its config.ini file. Since this is a pyHME problem and not a vidmgr problem, I'll go ask for help in that thread and quit hogging this one.

I really do appreciate the newbee help. What was so easy for me to do in Window is a major learning curve in linux....slowly I am getting there.

jcthorne
06-16-2011, 09:49 AM
Use nohup to prevent the process from terminating when the shell quits. Normally, a spawned process is assigned the calling shell as the parent. Nohup causes the process to be assigned init ( PID 1) as the parent.

Thanks, this one at least lets me start it and leave it running.

lrhorer
06-16-2011, 12:22 PM
OK. Thanks, I think. Where do you run those scripts? where is the output shown? I have no idea how to implement most of that, way over my head and a simple copy/paste is not going to run due to the directories all being different from mine. Why is all that necessary just to start pyhme?
The nohup script is what arranges for the code itself to be loaded, detaches the process from its parent, creates the log file, and creates the PID file. This can be run from anywhere, by any process, and as long is as pyHME is not already running, it should work. You will, of course, need to adjust the directory names to match your system.

The output from the nohup script shows up in two places. The file /var/log/pyHME.log contains the stdout and stderr produced by python when running the start.py script. The /var/run/pyHME.pid file contains the PID of the python process. This can be used to kill or reinitialize the python process. The two following commands should contain the same number when pyHME is running:

ps -ef | grep start.py
cat /var/log/pyHME.log

The startup script is how Debian and Debian derivatives implement dependency based booting. I won't go into the details here, but basically different distribution families handle the init process - the thing that runs all the accessories once the kernel is up and running - in different ways. If your NAS is not Debian based (it doesn't look like it), then the init script will have a different form, but, ignoring the header, the init script I posted demonstates how to implement a script that will allow the user (or another script) to manage the pyHME load by running

/<directory containing the startup script>/pyHME start | stop | restart

If your system is not Debian based, it may be quite possible to merge the two scripts into a single script, perhaps implementing the nohup script as a subroutine. It's even possible under Debian, but it may not work too well, because the init scripts do not run under bash when booting.

Note in general, this can be shortened by creating a symlink to the process in one of the directories pointed to by the $PATH variable, but since init scripts are not usually run by users, this is not usually done for init scripts.

lrhorer
06-16-2011, 02:30 PM
Hey, I've got a question. Is it posible for HME for Python to deliver a .gif file, specififally an animated .gif file, to the Tivo and for the TiVo to display it properly? It would be kinda neat to have some animated thumbnails.

lrhorer
06-16-2011, 10:54 PM
jbernardis,

When you get a chance to peek at the code again, I think it would be a good idea to add a try block around the video listings as well as the thumbnails. The app also locks up if it encounters a broken link to a video file. I got the following response when attempting to enter the "F" directory of the alphabetically grouped links after I had deleted the target for the link to "/RAID/Recordings/First Wives Club, The test (Recorded Sat Apr 09, 2011, MAXHD).mpg"

Traceback (most recent call last):
File "/usr/lib/python2.6/SocketServer.py", line 560, in process_request_thread
self.finish_request(request, client_address)
File "/usr/lib/python2.6/SocketServer.py", line 322, in finish_request
self.RequestHandlerClass(request, client_address, self)
File "/usr/share/pyhme/start.py", line 141, in __init__
client_address, server)
File "/usr/lib/python2.6/SocketServer.py", line 617, in __init__
self.handle()
File "/usr/lib/python2.6/BaseHTTPServer.py", line 329, in handle
self.handle_one_request()
File "/usr/lib/python2.6/BaseHTTPServer.py", line 323, in handle_one_request
method()
File "/usr/share/pyhme/start.py", line 232, in do_GET
self._page(True)
File "/usr/share/pyhme/start.py", line 186, in _page
appinst.mainloop()
File "/usr/share/pyhme/hme.py", line 1134, in mainloop
while self.active and self.get_event():
File "/usr/share/pyhme/hme.py", line 1187, in get_event
handle(keynum, rawcode)
File "/usr/share/pyhme/vidmgr/__init__.py", line 328, in handle_key_press
self.handle_key_pressList(keynum, rawcode)
File "/usr/share/pyhme/vidmgr/__init__.py", line 446, in handle_key_pressList
self.createListing()
File "/usr/share/pyhme/vidmgr/__init__.py", line 1349, in createListing
meta = metadata.basic(fullpath)
File "/usr/share/pyhme/vidmgr/metadata.py", line 98, in basic
mtime = os.stat(full_path).st_mtime
OSError: [Errno 2] No such file or directory: '/usr/share/pyTivo/alphagroup/F/First Wives Club, The test (Recorded Sat Apr 09, 2011, MAXHD).mpg'

Until then, everyone should be advised they need to delete any broken links caused by deleting, moving, or renaming a video file served by vidmgr, or else the application may lock up when reading a share directory.

jbernardis
06-17-2011, 08:42 AM
I took a look at the code this morning - no changes yet - and I'm not so sure that a simple try block would suffice. At this point in the code, we've already assumed that the file is present because there is a directory entry for it. Now we find that we can't stat the file - we have to drop the data structure we're in the midst of building. I think I need to stat the file earlier and treat it as if the file were never found in the first place (after writing out an error message of course).

In the meantime, I have made some changes to the code - nothing has been delivered yet. Among the new changes are:

- I discovered that I can implement a cleanup method that is the proper place to save the image cache - so I moved the save to there,
- I added logic to allow folder.txt to hold metadata for a folder. If I find such a file, and if it has a meta item named 'description' (like the video metafile) then this description will be shown on the folder (and share) lists above the thumbnail
- although I widened the right hand margin in the info screen, I made it customizable via the config file.

These will all be in the next release, as well as a fix to this broken link issue.

reneg
06-17-2011, 10:56 AM
Feature creep request - Please consider adding the ability to initiate a push of a video from one tivo to another through video manager interface.