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

    jbernardis New Member

    1,072
    0
    Oct 21, 2003
    Princeton NJ
    1. The sorting was deliberate. I chose to sort in title number order. Perhaps I can make this into some type of option.

    2. So let me get this straight - you want the description - on both the main screen and the info screen - to contain the titles. It's simple enough to include the text, but formatting might be an issue. Inserting text into a view does not, to my knowledge, have a rich set of text formatting tools. Even something so simple as starting on a new line is difficult - I don't know what happens if a new line character is in the text. Let me do some experimenting and I'll let you know.


    Glad it's working for you otherwise

    EDIT: after thinking about it, adding a list of titles to the info screen wouldn't be difficult - they're already there - it's just a matter of where they are placed. Also, on the info screen, I am managing the display lines myself to allow the two column layout I am using - so it's no big deal to add additional text like this.

    The description on the details screen, however, has the issues discussed above.
     
  2. lrhorer

    lrhorer New Member

    6,922
    0
    Aug 31, 2003
    San...
    That was just me being stupid. I simply changed 3 and 4 to 03 and 04, etc. in the directory names. Unless someone else sees this as necessary, I don't see a need for it.

    Or potentially other items separated by a newline. The ability to indent would be nice, too.

    Mainly the intent is to have the subdirectory info available when the folder is highlighted without having to move away from the current directory level.

    Yeah, that's what I figured. The indent might be even tougher.

    OK.

    Yeah, understood. What I am looking for, as you can see, is the ability to list the contents of the subdirectory without having to drill into something.
     
  3. jbernardis

    jbernardis New Member

    1,072
    0
    Oct 21, 2003
    Princeton NJ
    You should have this already. When the hilite is on the DVD Folder line - where the icon is a DVD - if you press the info button, you can see the titles, in title order, in amongst the other meta data. Of course this only happens if you have the titles in the metadata.
     
  4. lrhorer

    lrhorer New Member

    6,922
    0
    Aug 31, 2003
    San...
    Well, actually, no, it doesn't. Evidently your code processes the last "description :" line and discards the others. When I put the following in default.txt

    Code:
    seriesTitle : The Twilight Zone
    description : Volume 43
    description : This is test 2
    description : This is test 3
    description : This is test 4.
    isEpisode : true
    All that shows up in the description window is the text

    Code:
    This is test 4.
    and the only description line displayed in the info pop-up is

    Code:
    Description      This is test 4.
    Getting back to the main point, however: even if the text showed up in the info pop-up, that still requires moving away from the current level. Basically, I am looking for something that is on the screen (in the description window) without having to drill into something, such as pressing the <Info> button or the Right Arrow key. I realize that it may be too difficult to implement to be practical, in which case the request will have to be abandoned, but if not, then I think it would be a good feature.
     
  5. jbernardis

    jbernardis New Member

    1,072
    0
    Oct 21, 2003
    Princeton NJ
    Actually that's accurate and the same way that pytivo does it (since it's the same code basically - or at least it was) Description is a multiline field - it should be entered all together with no new lines in between:


    Code:
    seriesTitle : The Twilight Zone
    description : Volume 43. This is test 2. This is test 3. This is test 4.
    isEpisode : true
    If you have multiple description lines, each line will successively overwrite the previous, and the last one will be the only one that is kept.

    Also, if you have Title information in the metadata:
    Code:
    Title 1: This is Title 1
    Title 2: This is Title 2
    Title 3: This is Title 3
    
    then the titles will show up in the information pop-up for the DVD folder (although NOT in the description on the main screen)
     
  6. lrhorer

    lrhorer New Member

    6,922
    0
    Aug 31, 2003
    San...
    Oh, I see. When you said, "titles", I was thinking "descriptions".

    Is the <Info> button supposed to work on folders in regular shares? I've never had default.txt files in the directories before, but after having put several in the DVD share directories, I put one in a regular share directory. The description shows up in the description panel, but pressing the <info> button elicits a "Bonk!". It works on individual videos and in the DVD share, but not in directories in the regular video shares.
     
  7. jbernardis

    jbernardis New Member

    1,072
    0
    Oct 21, 2003
    Princeton NJ
    Historically no - when the app was first developed, there was no metadata for folders at all. At some point someone asked to support description on the main screen, so I added the folder.txt to support that, but the only data item of interest was the description.

    Then later, when I added support for the info pop-up, I felt that since all that was there for folders was the description, I needn't support folders on the pop-up. But the app actually supports generic folder meta data with no way to currently get at anything other than the description. The info pop-up would be a good place for this.

    Let me work on this. I think I will still have the bonk if there is no metadata for the folder.
     
  8. jbernardis

    jbernardis New Member

    1,072
    0
    Oct 21, 2003
    Princeton NJ
    Verson 0.7a is now on git. Two changes: 1) added support for info pop-up screen for folders. Current behavior of a bonk sound will continue if there is no metadata available. 2) I am now more defensive if icon files are missing - no icon is displayed instead of an exception being raised.
     
  9. lrhorer

    lrhorer New Member

    6,922
    0
    Aug 31, 2003
    San...
    Did I mention you really rock?
     
  10. lrhorer

    lrhorer New Member

    6,922
    0
    Aug 31, 2003
    San...
    Uh-oh. Something's broken, again, and it looks like it's icon related, again. I looked through the icons, and can't find anything obvious:

    Code:
    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 1215, in get_event
        handle()
      File "/usr/share/pyhme/vidmgr/__init__.py", line 338, in handle_active
        self.drawScreen()
      File "/usr/share/pyhme/vidmgr/__init__.py", line 800, in drawScreen
        self.drawScreenShares()
      File "/usr/share/pyhme/vidmgr/__init__.py", line 894, in drawScreenShares
        if self.listing[sx]['icon'] == None:
    IndexError: list index out of range
     
  11. jbernardis

    jbernardis New Member

    1,072
    0
    Oct 21, 2003
    Princeton NJ
    Stupid code-copying error - version 0.7b is now up on git with the fix
     
  12. lrhorer

    lrhorer New Member

    6,922
    0
    Aug 31, 2003
    San...
    I've come across an anomaly. One of the DVDs has a whole bunch of titles, but as is sometimes the case, the titles are not numbered consecutively. I don't know if that has anything to do with the issue, but vidmgr is not properly handling the titles. The DVD Plug-in apparently is, however. I have the default.txt file set to ignore everything but Title 1 and Title 8. I have a specific metafile for Title 8, but not Title 1. The DVD plugin properly shows and transfers the two videos, but vidmgr only shows one. No errors are generated.

    default.txt:
    Code:
    title : The Mark of Zorro
    movieYear : 1940
    description : Posing as a foppish coward, Spanish nobleman Diego (Tyrone Power) fights injustice in colonial California. Upon his return from Spain, Diego realizes that Captain Pasquale (Basil Rathbone) is terrorizing the district and levying unreasonable taxes. Disguised as Zorro -- a masked swashbuckler -- the young Spaniard menaces the local authorities, to the delight of all the peasants and his beloved (Linda Darnell).
    isEpisode : true
    Title 0 : ignore
    Title 1 : The Mark of Zorro
    Title 3 : ignore
    Title 5 : ignore
    Title 6 : ignore
    Title 8 : The Last Idol - A&E Biography of Tyrone Power
    Title 11 : ignore
    Title 12 : ignore
    Title 13 : ignore
    Title 14 : ignore
    Title 15 : ignore
    Title 17 : ignore
    Title 19 : ignore
    starRating : x5
    mpaaRating : N8
    vProgramGenre : Action & Adventure
    vProgramGenre : Classic Movies
    vProgramGenre : Classic Action & Adventure
    vDirector : Rouben Mamoulian
    vActor : Tyrone Power
    vActor : Linda Darnell
    vActor : Basil Rathbone
    vActor : Gale Sondergaard
    vActor : Eugene Pallette
    vActor : J. Edward Bromberg
    vActor : Montagu Love
    vActor : Janet Beecher
    vActor : George Regas
    vActor : Chris-Pin Martin
    vActor : Robert Lowery
    __T08.mpg.txt:
    Code:
    title : The Last Idol - A&E Biography of Tyrone Power
    movieYear : 1996
    description : A&E investigates the life and career of film star Tyrone Power.
    isEpisode : true
    starRating : x5
    mpaaRating : N8
    vProgramGenre : Biography
    vProgramGenre : Documentary
    vDirector : Elizabeth Bronstein
    vActor : Richard Kiley
    vActor : Frederick Lawrence Guiles
    vActor : J. Watson Webb Jr.
    vActor : Evie Wynn Johnson
    vActor : Roddy McDowall
    vActor : Annabella Power
    vActor : Alice Faye
    vActor : Linda Christian
    vActor : Piper Laurie
    vActor : Taryn Power
    vActor : Terry Moore
    vActor : Tyrone Power
     
  13. jbernardis

    jbernardis New Member

    1,072
    0
    Oct 21, 2003
    Princeton NJ
    Not entirely sure if this is the issue or not, but vidmgr does not know how many Titles it is going to find in the metadata, so it starts at Title 0 and keeps incrementing until it finds a gap. In your case, it won't find Title 8 because there are gaps in the sequence.

    I guess I can alter the logic to find all of the keys that match Title xx.

    I'm not sure the effect it would have on the dvdvideo plugin, but if you put in ignore lines for the intervening titles, at lease vidmgr would be happy. This would also be a good experiment for me to know if this is the issue.
     
  14. lrhorer

    lrhorer New Member

    6,922
    0
    Aug 31, 2003
    San...
    Yes, padding the default.txt file with the additional titles seems to make vidmgr happy, and doesn't seem to have any affect on the DVD plug-in. I just noticed something else, though. It looks like vidmgr is pulling the info for actors, director, writers, etc from default.txt, rather than __Txx.mpg.txt. The way vigmgr handles the "Title x :" entries is a bit distracting, too.
     
  15. jbernardis

    jbernardis New Member

    1,072
    0
    Oct 21, 2003
    Princeton NJ
    to the first point - I chose to use the same metadata strategy that pytivo uses. Basically it searches for default.txt, <filename>.txt, .meta/default.txt and then .meta/<filename>.txt in that order. If multiple files are found, their contents are merged, so if they have the same keys, a subsequent file will overwrite the same key from a previous file. The only exception to this is the keys that start with a v that usually consist of a list of names. The existing metadata logic will merge this data from ALL of the files it finds.

    This seemed like reasonable logic (although I feel that the two default.txt files should be searched before either of the <filename>.txt files) so I just kept it.

    As far as the second point, I assume you are referring to the fact that I list the titles on the pop-up infor screen. Again, this was a conscious decision because I wanted to provide that information without requiring that you dive into that "directory".

    I am not really using this feature, so if there is a concensus that others want it some other way, I am open to changes. Just give me some requirements.

    BTW - did you try the changes I emailed to you? If that works, I want to post it to GIT.
     
  16. lrhorer

    lrhorer New Member

    6,922
    0
    Aug 31, 2003
    San...
    That doesn't work very well with DVDs. First of all, the individual titles may have only one detail in common. For example, on the DVD Seabiscuit, the extra documentary does not have any of the actors, the director, or anything else in common with the main video. In The Mark of Zorro, the biography of Tyrone Power only has Tyrone Power in common with the main title. Alfred Hitchcock did not direct The Ghost Goes West, nor are any of the other actors from The 39 Steps other than Robert Donat in the film, but the app displays the text from both files so it looks like Alfred Hitchcock directed and a ton of others starred in The Ghost Goes West. I suppose I could create a specific metafile for the primary film and exclude everything from default.txt. I'll give it a shot.

    Yeah, but they are listed oddly. First of all, an alphabetic sort, rather than an alphanumeric sort, looks a bit weird. Secondly, it seems to eliminate the text prior to the last hit on the description. Listing all the fields with no sort (other than what is sorted in the metafile), but excluding any "ignore" lines would be better, I think.

    'Just did. It looks like it is working.
     
  17. lrhorer

    lrhorer New Member

    6,922
    0
    Aug 31, 2003
    San...
    Wait, that doesn't really work, either. Then the main folder is missing a bunch of stuff. IMO, the specific files, if they exist, should replace everything in default.txt.
     
  18. thomb

    thomb New Member

    60
    0
    Jan 22, 2008
    Mill Creek, WA
    I'm sure I've configured something wrong here, hopefully someone can suggest a fix or three -

    My goal is to copy 250+ DVDs to my primary windows 7 box and have them accessible from my 2 Tivo HD boxes. Here's what I've done so far -
    1) Install Python
    2) Install pyTivo
    3) Install HME
    4) Install Video Manager
    5) Install DVD Decrypter
    6) Install MetaGenerator

    My first pass at installing everything last night was mostly successful. I am able to rip my DVDs and then transfer them to either Tivo box (pulled from the Tivo). However, when I start hme I get a couple errors:
    A) "Not using Zeroconf:" (i see this setting in the hme config.ini file set as False, but I'm not sure what it does).
    B) "Cache file does not exist - no thumbnails loaded"

    And then a message stating "Server Starts", so I'm not sure what problems A & B are causing me, but I suspect HME or video manager is not working correctly for me. From the TV, all I see is the classic Tivo user interface - Now Playing > MyMovies > {the names of the DVDs I've ripped} and the metadata for the movies - except for:
    C) No cover art is showing on the Tivo

    Finally, the last issue is from a navigation perspective:
    D) In order to view the metadata on any movie the navigation is - Now Playing > MyMovies > Gattaca > Video_ts > Gattaca > {and then you can finally read about Uma}. Clearly this is coming from my Windows directories, but is it possible to see the Gattaca listing once and never see Video_ts? That would eliminate two clicks each time. Are there settings to avoid this directory structure or do I have to do it manually for each DVD?
     
  19. jbernardis

    jbernardis New Member

    1,072
    0
    Oct 21, 2003
    Princeton NJ
    Don't worry about message B - that is normal on the first startup - there is no cache yet.

    Message A is from the hme code itself - usually it means it is unable to import the Zeroconf module, but you also state that it is set as false in the config.ini file - perhaps that is why you are seeing the message.

    Zeroconf allows pytivo and pyhme to both find the tivos on the network and to advertise their own services without any specific configuration on your part (hence the name zeroconf). Others on this forum are more versed in this than I am.

    As far as your other statements - if you are going through the now playing list, then you are not using vidmgr. pytivo is what is showing the directory structure in this case. If you want to use vidmgr, you need to go into the "Music, Photos, and Showcases" (at least that's what it's called on my S3), wait for the list to be built, and then choose "Pytivo Video Manager" from there.

    Get that done, and then we can see where you are.
     
  20. thomb

    thomb New Member

    60
    0
    Jan 22, 2008
    Mill Creek, WA
    That's what I suspected - my HME is messed up somehow. None of the HME apps are showing up in the "music, photos..." menu. Here's my config.ini:
    ==================
    [hmeserver]
    port=7288
    address=192.168.1.100
    zeroconf=False
    basepath=D:\Program Files (x86)\pyhme
    datapath=d:\
    apps=picture clock vidmgr

    [picture]
    path=d:\pictures
    delay=2
    exts=.jpg .png

    [vidmgr]
    exts=.mpg .mp4 .avi .wmv .m4v

    [tivos]
    tivo1.name=Downstairs
    tivo1.tsn=652-0001-abcd-efgh
    tivo2.name=Kitchen
    tivo2.tsn=652-0001-ijkl-mnop

    [pytivos]
    pytivo1.config=D:\Program Files (x86)\pytivo\pyTivo.conf
    pytivo1.ip=192.168.1.100
    pytivo1.port=9032
    pytivo1.sep=\
    ==========================
     

Share This Page