1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

PyTivo Video Manager HME App for pyhme

Discussion in 'Developers Corner' started by jbernardis, Apr 20, 2011.

  1. cweb

    cweb New Member

    106
    0
    May 29, 2004
    I got Video Manager mostly working on my mac. One problem I'm still having is displaying the shows' poster image. An example of my setup is a follows: my main directory is TivoShows, it has a folder named Supernatural, it contains the files Supernatural Ep116 2010-10-26 Shadow.mpg and Supernatural.jpg. Shouldn't the image in Supernatural.jpg show up when I am looking in the Supernatural folder? Am I not understanding it correctly?
     
  2. jbernardis

    jbernardis New Member

    1,072
    0
    Oct 21, 2003
    Princeton NJ
    No - The file either has to be named "folder.jpg" in which case it will be displayed for all videos in the folder that do not have their own image file, or "Supernatural Ep116 2010-10-26 Shadow.mpg.jpg" in which case it will be shown for ONLY this video file. The jpg files can either be in the same directory as the mpg file, or they can be in a subdirectory from THAT directory named ".meta". If you are using windows, you will probably have some difficulty creating a directory named .meta from the GUI - it's a lot easier from a command line.
     
  3. cweb

    cweb New Member

    106
    0
    May 29, 2004
    That fixed it. Now I see the images. I just misunderstood what you meant by folder.jpg.
     
  4. jbernardis

    jbernardis New Member

    1,072
    0
    Oct 21, 2003
    Princeton NJ
    Several weeks ago someone asked for a feature whereby they could classify their videos by genre, or other
    metadata. I said then that although I thought it was a good idea, I didn't have the bandwidth for it and
    that perhaps it would be put into version 2.0.

    Well I am happy to announce version 2.0 of vidmgr.

    First, though, I have to acknowledge the assistance of lrhorer. I have a reasonable setup in my home
    for testing this app, but to nowhere near the stress levels that he could put it to. His assistance in
    testing and debugging were more than invaluable - this couldn't have been done without him - or if it
    HAD been done without him, it would have been released with some really bad bugs. Of course that's
    not to say that there's not a bug or two still lurking in there...

    For those of you that don't know, PyTivo video manager (vidmgr) is an HME application that allows you to
    request that videos in your library be "Pushed" to your tivo instead of the normal pull. Since it's an
    HME app, this request can be made from your easy chair with your tivo remote. Pushing allows videos that
    are in a compatible MP4 format to be transferred as is - saving time and space - instead of the transcoding
    that a pull will always cause (although a push can also be requested for a video format that requires
    transcoding). vidmgr can also be used to delete videos from your library.

    Version 2.0 is a complete rewrite of the application with better, more object-oriented code. Among the
    improvements that will be visible to users:
    1.) The video information is obtained from a cache instead of being read from the disk. The cache
    can be built when the program starts up, or ahead of time - at your choice. The advantage of
    building the cache ahead of time is that you can get more complex in terms of the way the
    cache is built (you can still build a complex cache at thread start time if you are willing to
    tolerate a delay - my ARM based NAS builds the cache for my 400 video library in about 5 seconds.)
    The cache supports the ability to create "virtual" shares that are based on metadata, including any
    metadata that you may have added yourself. So, for example, you can create a "virtual" share for
    John Wayne movies, or you can have a virtual share that breaks the videos down by genre.

    2.) You now have the ability to change options on a directory by directory (or virtual share) basis.
    You want this directory sorted on episode number and that one sorted on show title - no problem.
    Sorting can now be done based on ANY combinations of strings from the metadata. You can also control
    the display "name" for a video file based on the directory (or virtual share).

    3.) the user interface was cleaned up - there is no longer a menu choice for push/delete. Pushing is
    accomplished by pressing the select button - if you have multiple tivos a dialog box will pop-up
    over the display so you can choose the proper target. Delete is accomplished by pressing clear.
    Again, a dialog box will pop-up asking for confirmation.

    There are many other changes as well, but they are more subtle and/or are not visible to a user.

    There is one limitation over the original program - This is for HD only. If the application finds that
    your tivo does not support an HD resolution, it simply exits.

    vidmgr is a TiVo HME application designed to operate under wmcbrine's hme for python
    framework. It is NOT a stand-alone application. Please install the pyhme package (I have tested with version 0.19)
    and make sure it is running before you install vidmgr.

    Vidmgr is designed to operate in conjunction with the PyTivo transcoding server - If you are not
    using pytivo, then there is no point in installing vidmgr. I have tested vidmgr with the mcbrine
    fork of pytivo. I am not familiar with the other forks to know whether or not it will run there.

    The link to GIT is in my signature.
     
  5. windracer

    windracer joined the 10k club

    11,580
    3
    Jan 3, 2003
    St. Pete, FL
    Hate to be the first post after your announcement with a problem, but I can't get 2.0 to work. As soon as I select it from my TiVo, it crashes with this:

    Code:
    HME Server for Python 0.19
    Mon Sep 19 21:06:58 2011 PyTivo Video Manager version 2.0 starting
    Cache file does not exist - no thumbnails loaded
    Mon Sep 19 21:06:58 2011 Server Starts
    Registering: vidmgr
    192.168.1.71:53360 - - [19/Sep/2011 21:07:08] "GET /vidmgr/ HTTP/1.1" 200 -
    192.168.1.71:53360 - - [19/Sep/2011 21:07:08] Starting HME: vidmgr
    ----------------------------------------
    Exception happened during processing of request from ('192.168.1.71', 53360)
    Traceback (most recent call last):
      File "/usr/lib/python2.7/SocketServer.py", line 582, in process_request_thread
        self.finish_request(request, client_address)
      File "/usr/lib/python2.7/SocketServer.py", line 323, in finish_request
        self.RequestHandlerClass(request, client_address, self)
      File "./start.py", line 141, in __init__
        client_address, server)
      File "/usr/lib/python2.7/SocketServer.py", line 639, in __init__
        self.handle()
      File "/usr/lib/python2.7/BaseHTTPServer.py", line 343, in handle
        self.handle_one_request()
      File "/usr/lib/python2.7/BaseHTTPServer.py", line 331, 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 "/usr/local/tivo/pyhme/hme.py", line 1134, in mainloop
        self.startup()
      File "/usr/local/tivo/pyhme/vidmgr/__init__.py", line 93, in startup
        self.opts = config.load()
      File "/usr/local/tivo/pyhme/vidmgr/Config.py", line 121, in load
        n = int(value)
    ValueError: invalid literal for int() with base 10: ''
    ----------------------------------------
    Looks like something related to loading the infolabelpercent value from the config file?

    2.0 sounds great ... can't wait to check it out.
     
  6. jbernardis

    jbernardis New Member

    1,072
    0
    Oct 21, 2003
    Princeton NJ
    What's the value you have for infolabelpercent?

    I expect an integer - perhaps I should protect that with a try block, but first let's see if it's just a bad value or if it's something else.

    EDIT: looks like you just left the blank entry that came in the dist file. Sorry to mislead - that was just meant as a pattern to be followed - you need to specify a value or
    if there is a definite default, just comment out the line
     
  7. windracer

    windracer joined the 10k club

    11,580
    3
    Jan 3, 2003
    St. Pete, FL
    Ah, ok. Yeah, I have a lot of "blank" settings lines in there because I thought that's what would trigger the default. I'll go through my .ini file and try again.

    Update: ok, now I'm getting this:

    Code:
    ConfigError: Error in ini file.  Section hmeserver needs tags or values option
    The only place I can find the [hmeserver] section is in my main pyhme config.ini file, which I thought vidmgr doesn't use anymore? Still stuck ...
     
  8. jbernardis

    jbernardis New Member

    1,072
    0
    Oct 21, 2003
    Princeton NJ
    Sorry about that. The decision to move from config.ini to my own config file was made late in the development, and I forgot to go back and test the situation where the cache was built dynamically. If you had pre-built the cache, this would have worked fine. But in any event, you discovered the error - so now it's fixed.

    I updated GIT. FYI - only 1 file changed - __init__.py
     
  9. txporter

    txporter One sec, almost done

    666
    0
    Sep 17, 2006
    Austin, TX
    When you say it only works with HD now, do you mean I need to have HD menus enabled to use it?
     
  10. lrhorer

    lrhorer New Member

    6,922
    0
    Aug 31, 2003
    San...
    No. That would be limited to the Premier. It has to be an HD capable TiVo. It works fine with S3 and THD TiVos. It works with the THD in the guest room with an NTSC monitor attached, but it looks horrible. I also have an NTSC capture device attached to my TiVo in the theater, and it looks much better.
     
  11. windracer

    windracer joined the 10k club

    11,580
    3
    Jan 3, 2003
    St. Pete, FL
    Yep, thanks! Now to play with the new features ...
     
  12. jbernardis

    jbernardis New Member

    1,072
    0
    Oct 21, 2003
    Princeton NJ
    Haven't heard back from you. I guess no news is good news??
     
  13. windracer

    windracer joined the 10k club

    11,580
    3
    Jan 3, 2003
    St. Pete, FL
    Heh, sorry about that.

    Yes, so far so good. Using the virtual tags shows me just how dirty generated metadata can be. For example, if I use the high-level Genre tags I get all sorts of weird groups. I haven't had time to play with the values filters much yet, but it looks like you can do some cool stuff with the virtual shares.
     
  14. jcthorne

    jcthorne Active Member

    2,719
    2
    Jan 28, 2002
    Houston
    When I open vidmgr.ini.dist in notepad, I get a very unformated mess of text. Turning on word wrap does not help. Its obvious from the odd characters in the data that some other utility is intended for viewing and editing this file.

    What am I supposed to be using as notepad is not workable for the file as is.

    EDIT: Opening the .ini file in wordpad seems to work.
     
  15. jcthorne

    jcthorne Active Member

    2,719
    2
    Jan 28, 2002
    Houston
    Next question,

    I have one video share in pytivo. It contains directories for movies, tv shows and concerts. When creating a virtual share, such as Movies by Genre, I only want items inthe movies directory, not from the tv shows. How do I specify that it only include items from specific directories? Do I have to create multiple video shares in pytivo?
     
  16. jcthorne

    jcthorne Active Member

    2,719
    2
    Jan 28, 2002
    Houston
    Launching pythonHME I get the following error:

    Skipping: vidmgr2 - No module named win32file
     
  17. windracer

    windracer joined the 10k club

    11,580
    3
    Jan 3, 2003
    St. Pete, FL
    I was trying something like this too, using a values of isEpisode=false but wasn't having good luck with it.
     
  18. Tobashadow

    Tobashadow Read over there --->

    2,338
    0
    Nov 11, 2006
  19. Tobashadow

    Tobashadow Read over there --->

    2,338
    0
    Nov 11, 2006
    Is there a easier way to read the vdmgr config file in windows?

    In notepad all i get is one huge nonstop paragraph and its making it hard to understand where i make my edits.
     
  20. Tobashadow

    Tobashadow Read over there --->

    2,338
    0
    Nov 11, 2006
    Nevermind found one.

    For future users - http://notepad-plus-plus.org/
     

Share This Page