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

    wmcbrine Ziphead

    10,368
    22
    Aug 2, 2003
    Just take out the zeroconf=False line. Why is it there?
     
  2. thomb

    thomb New Member

    60
    0
    Jan 22, 2008
    Mill Creek, WA
    Thanks that fixed it, hme is correctly launching the apps. However, now when I go into vidmgr (from the Tivo) it shows my folder structure, but no videos show up.

    Edit:
    Problem solved. It seems that I had forgotten to add the .vob extension to the file types in the config.ini. Once I added it everything magically began to show up.

    Thanks everyone for your help!
     
  3. lrhorer

    lrhorer Active Member

    6,924
    0
    Aug 31, 2003
    San...
    That should not be necessary, and may not work properly.

    If you are ripping your entire DVD to File, then you need pyTivo to set up a virtual file system in order to be able to transfer any or all titles from the DVD. To do this, you need to rip each DVD to a separate directory containing at a minimum a VIDEO_TS directory which holds all the .IFO and .VOB files. In addition, each DVD's directory can optionally contain:

    folder.jpg - cover art for the entire folder
    default.txt - metadata for the folder
    __Txx.mpg.txt - metadata for each title, where xx is the title number
    __Txx.mpg.jpg - cover art for each title

    Note the first two can be contained in any directory of the DVD share. In order to share these DVDs, however, you will need a section in pyTivo's pyTivo.conf file like the following:

    Code:
    [DVD]
    path = d:\RAID\DVD
    force_alpha = True
    type = dvdvideo
    fast_index = true
    So, for example, I have a Robert Donat DVD with two movies on it, The 39 Steps and The Ghost Goes West. Here is the contents of "/RAID/DVD/39 Steps":

    Code:
    RAID-Server:/RAID/DVD/39 Steps# ll
    total 144
    drwxrwxrwx  3 lrhorer lrhorer  4096 Jul 26 22:09 .
    drwxrwxrwx 54 root    root     4096 Jul 24 13:05 ..
    -rwxrw-rw-  1 lrhorer lrhorer   715 Jul 23 06:49 default.txt
    -rw-rw-rw-  1 lrhorer lrhorer 33999 Jul 14 01:01 folder.jpg
    -rw-rw-rw-  1 lrhorer lrhorer 34648 Jul 14 01:01 __T02.mpg.jpg
    -rwxrw-rw-  1 lrhorer lrhorer   857 Jul 26 22:09 __T02.mpg.txt
    -rw-rw-rw-  1 lrhorer lrhorer 33999 Jul 14 01:01 __T03.mpg.jpg
    -rw-rw-rw-  1 lrhorer lrhorer   962 Jul  1 19:01 __T03.mpg.txt
    drwxrwxrwx  2 lrhorer lrhorer  4096 Jun 12 15:52 VIDEO_TS
    Title 0 and Title 1 are not videos I care to have on the TiVo in this case, so in default.txt I have:

    Code:
    movieYear : 1935
    description : Robert Donat stars in two 1935 films, Alfred Hitchcock's "The 39 Steps" and Rene Clair's comedy "The Ghost Goes West".
    Title 0: Ignore
    Title 1: Ignore
    Title 2: The Ghost Goes West
    Title 3: The 39 Steps
    isEpisode : true
    __T02.mpg.jpg is the cover art for The Ghost Goes West, __T02.mpg.txt is its metafile, __T03.mpg.jpg is the cover art for The 39 Steps, and of course __T03.mpg.txt is its metadata.

    Also, I have four different Harry Potter films still on DVD, so I collect them under a single directory, but I want cover art and metadata for the folder, so in the "/RAID/DVD/Harry Potter" directory I have:

    Code:
    RAID-Server:/RAID/DVD/Harry Potter# ll
    total 156
    drwxrwxrwx  6 lrhorer lrhorer   4096 Jul 21 00:49 .
    drwxrwxrwx 54 root    root      4096 Jul 24 13:05 ..
    drwxrwxrwx  3 lrhorer lrhorer     56 Jul 15 21:10 and the Chamber of Secrets
    drwxrwxrwx  3 lrhorer lrhorer     56 Jul 16 21:11 and the Goblet of Fire
    drwxrwxrwx  3 lrhorer lrhorer     56 Jul 16 21:11 and the Prisoner of Azkaban
    drwxrwxrwx  3 lrhorer lrhorer    122 Jul 26 22:26 and the Sorcerer's Stone
    -rwxr--r--  1 lrhorer lrhorer 139436 Jun 14 02:48 folder.jpg
    I'll be adding a default.txt file to the directory when I get the chance.
     
  4. lrhorer

    lrhorer Active Member

    6,924
    0
    Aug 31, 2003
    San...
    Now this is not the only way to skin this cat. You can rip the DVD to IFO or to ISO and wind up getting the video to the TiVo, but if you have multi-title DVDs, DVDs with extra features you like, or DVDs with alternate audio tracks you want to manage, then the PyTivo DVD plug-in is the quickest and easiest way to publish the DVD. Jbernardis, the author of vidmgr, prefers to rip to h.24 files for several reasons, as do others, so there is no "right" or "wrong" method, but I definitely prefer the DVD-plug-in.
     
  5. jcthorne

    jcthorne Active Member

    2,726
    3
    Jan 28, 2002
    Houston
    I would like to present an idea I have been mulling over for video manager. See what others think, especially Jbernardis since it is HIS program :)

    A the moment, vidmgr presents a directory of movies in the same hiearchy as the file system on the server. In my case:

    Movies
    -Genre
    --Title

    Since vidmger has available to it the year, title, genre, major actors, it would be really cool if the films could be sorted by these items rather than in just filepath order. You could use the same button tivo does in the myshows list to toggle between them. If so the files could better be managed in a flat file path.

    Now I realize this would require vidmgr to build a db in the background of all the pertinant data, but the data is there and it does not have to be done before the first normal directory is displayed, only available after the db is built and cached. Harmonium works much this way now for music. I would not see this being done for tv shows but only for movies, but others may have ideas on how to do this as well.

    I looked at lrhorer's method of using symlinks but its just too much on going work to maintain and asking for some sort of automation under windows....well, beyond the scope of most current software. I thought an extension of vidmgr that does this would eliminate the need for most of that and make finding a film much easier.

    Heck the db could be built ahead of time by the user and stored as a spreadsheet or other common and easily editable file type.
     
  6. windracer

    windracer joined the 10k club

    11,580
    3
    Jan 3, 2003
    St. Pete, FL
    Galleon can do that as well (although I personally never use that feature). I believe everything is stored in an Apache Derby database.
     
  7. jcthorne

    jcthorne Active Member

    2,726
    3
    Jan 28, 2002
    Houston
    Can Galleon have pytivo PUSH an mp4? Has it been updated to HD menus? I admit to never having actually tried Galleon but I like the menus and graphics we have in vidmgr now, just was hoping for a bit more functionality.
     
  8. windracer

    windracer joined the 10k club

    11,580
    3
    Jan 3, 2003
    St. Pete, FL
    No, Galleon doesn't interact with pyTivo at all. I was just pointing out another example of an app that can parse metadata (MP3 tags in this case) and present different sorting/filtering options to the user.

    Galleon does have a GoBack feature for video files, which I used sparingly back in the old days before pyTivo, streambaby, and vidmgr.
     
  9. lrhorer

    lrhorer Active Member

    6,924
    0
    Aug 31, 2003
    San...
    I don't do any maintenance, at all. The scripts take care of all the work.

    That's definitely a non-trivial request.

    Isn't your Synology NAS Linux based? Why not just modify the scripts I use for use on the Synology system? They will automatically create and delete shares sorted by date, genre, alpha groups, etc.

    I do have the scripts create a database, but I've never made any real use of it.
     
  10. jcthorne

    jcthorne Active Member

    2,726
    3
    Jan 28, 2002
    Houston
    That would be beyond my current linux capabilities or desire to learn. I no longer run pytivo or vidmgr on the synology box either. I had those two running fine and then started working toward java and harmonium and really mucked up the works. I failed the primary purpose of the NAS...the RAID. I got all the data back and reflashed the NAS back to an updated stock configuration and went back to running all the interface software under windows since the small interface server that used to function as file server was not going away. It does downloads, pytivo, harmonium and system backups.


    Anyway, I am back to running all this under windows. The files are all on the NAS. If you think you can give me the scripts and a bit of direction, I'll give them a go under windows. What language are they in?

    I did realize my suggested addition to vidmgr was not trivial. Just thought that managing the vids and presenting them in various sort orders was a logical next step if Jbernardis is interested.
     
  11. jbernardis

    jbernardis New Member

    1,072
    0
    Oct 21, 2003
    Princeton NJ
    It's a great idea, but unfortunately I don't have the bandwidth to tackle that right now. Maybe for vidmgr 2.0 :)

    Of course the downside of a flat file system and relying on metadata is that the PyTivo NPL representation would lose its structure. I'm like you - I have my films all divided into directories by genre, but I also still use the PyTivo pull interface too and I like to see them consistent with one another.
     
  12. jcthorne

    jcthorne Active Member

    2,726
    3
    Jan 28, 2002
    Houston
    Available time I really understand.

    I no longer use the pytivo pull interface at all since all my video is stored as mp4 and would have to be transcoded to transfer.

    My biggest problem with filing by genre is that so many movies belong in more than one category and when I go looking for one....I always am looking in the wrong one. Perhaps using a browse interface for searching is the wrong approach.

    Have you seen any easy way to gather the movie meta data into a single file? Getting all of it to a simple spreadsheet would at least allow me an index to keep handy. Suppose I could relearn visual basic and do it in excel.
     
  13. lrhorer

    lrhorer Active Member

    6,924
    0
    Aug 31, 2003
    San...
    Bash. I know there are at least a couple of bash interpreters for Windows out there. I have no idea how well they work or whether they support any of the newer bash forms. A better solution might be Take Command.
     
  14. lrhorer

    lrhorer Active Member

    6,924
    0
    Aug 31, 2003
    San...
    You may have lost me, there.

    If you are going to relegate the function to a PC, rather than the TiVo, then what I would do is write CGI scripts that relegate the functions to a web page. You can use Perl, PHP, or whatever to write the script, and arrange the database any way you like. Indeed, you could create the data base using whatever database manager you like. I'm doing that very thing here.

    You will have to either run a web server on one of your machines, or else purchase a web page from one of the myriad web hosting services.

    Collecting the relevant data into a single file is not difficult. 'Simply parse the metafiles and extract the fields into a database file. A tab-delimited file would work, or perhaps semicolon. Extracting a page for display filtering by genre is also not difficult.
     
  15. lrhorer

    lrhorer Active Member

    6,924
    0
    Aug 31, 2003
    San...
    Here are the scripts I use to manage the links (among other things).
     

    Attached Files:

  16. philhu

    philhu User Since Day ONE!

    831
    0
    Apr 11, 2001
    Funcity, MA
    Hi

    I just added your vidmgr to my pyhme installation...fyi-Pyhme worked fine before this was added.

    Iadded to the config, and restarted HME, get the following error:


    C:\Program Files\TiVo\hme-vlc kit>start.py
    HME Server for Python 0.17
    Traceback (most recent call last):
    File "C:\Program Files\TiVo\hme-vlc kit\start.py", line 352, in <module>
    app = __import__(name)
    File "C:\Program Files\TiVo\hme-vlc kit\vidmgr\__init__.py", line 14, in <modu
    le>
    print time.asctime(), TITLE + " version " + version + " starting"
    NameError: name 'time' is not defined

    C:\Program Files\TiVo\hme-vlc kit>


    It looks like a pretty basic error. Any idea what I did wrong? Looks like it can't even use the time function?
     
  17. jcthorne

    jcthorne Active Member

    2,726
    3
    Jan 28, 2002
    Houston
    Thanks for your usual very detailed response. I often learn quite a bit from them even if they only lead me in directions I had not considered before. That can be a good thing :up:



    By example, From Russia With Love belongs in each of the following Genre

    Classics
    Action Adventure
    Thrillers

    In my case its located in the Action & Adventure directory but I would just as likely go looking for it in the Thrillers or Classics sections. Symlinks could help with this but I still am not sure I can make this work effectively under windows. The basic problem being that windows does not keep track of the links. When the base file is moved, renamed or deleted, the symlinks do not get updated and now point to the wrong place.
     
  18. jcthorne

    jcthorne Active Member

    2,726
    3
    Jan 28, 2002
    Houston
    I would like the info presented to the user on the tivo, not on a pc. Away from the tivo, a simple spreadsheet database is sufficient. dlfl provided a simple utility to do just that:

    metatoexcel

    My Synology box has a built in simple web page server so could to that but its not for the pc, I need it on the tivo.

    Thanks for the scripts. I am studying them for ideas but at the moment don't see how to use them or similar under windows in an effective manner.
     
  19. philhu

    philhu User Since Day ONE!

    831
    0
    Apr 11, 2001
    Funcity, MA
    Ping

    This seems a fundamental error, but I cannot get around it, please, anybody? :)
     
  20. philhu

    philhu User Since Day ONE!

    831
    0
    Apr 11, 2001
    Funcity, MA
    Ok, got past my previous error, editted out the time part of the line :)

    No it seems to work well, except, when I say push file and try to push, I select the tivo to push to, any selection returns a button labelled:

    'Exception during push request'

    Any ideas why? The console log shows nothing except, 'vidmgr exitting'

    I tried to push .avi, .mp4, all caused exceptions as described.


    Also, does vidmgr support .mkv files?

    I added .mkv to the config and it now sees and describes the episodes, but it gets exception too.

    BTW, the hme stuff and pytivo work perfectly......
     

Share This Page