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:

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.

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.

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.

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.

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).

To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts. | To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.

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.

To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts. | To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.

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.

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). I guess I just need to generate separate metadata files for those I keep in .TiVo format.

To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts. | To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.

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:

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.

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.

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.

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.

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>"¹:

Code:

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

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

Code:

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:

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 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.

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?

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.

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.

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.

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:

Code:

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.

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

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.