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

    Tobashadow Read over there --->

    2,339
    0
    Nov 11, 2006
    Ok im lost, i edited the config file and i still get the same error.

    vidmgr\Config.py line 66

    vidmgr configuration file does not exist
     
  2. windracer

    windracer joined the 10k club

    11,580
    3
    Jan 3, 2003
    St. Pete, FL
    Make sure you just named it vidmgr.ini (take off the .dist).
     
  3. Tobashadow

    Tobashadow Read over there --->

    2,339
    0
    Nov 11, 2006
    Well that got past that error now i get a vidmgr instance has no attribute vcChanged error.

    Damn this is frustrating there is very little documentation on this.
     
  4. Tobashadow

    Tobashadow Read over there --->

    2,339
    0
    Nov 11, 2006
    Tried commenting out all settings but the pytivo and tivo settings and still get same error.

    Verified Tivo settings and numbers and pytivo settings.
     
  5. jbernardis

    jbernardis New Member

    1,072
    0
    Oct 21, 2003
    Princeton NJ
    I use vim, but I guess that's only friendly to those of us who have used vi on Unix. There is absolutely no special formatting being done in the file - so I don't know why notepad has a problem with it. Maybe a programmer's editor would be better - there are lots of freeware editors.

    I think the problem might be with the difference between the way Windows handles end-of-line versus how unix does it.
     
  6. jbernardis

    jbernardis New Member

    1,072
    0
    Oct 21, 2003
    Princeton NJ
    Can you provide the exact error text?

    Also, could you let us know what your directory structure looks like - what files are in what directory - and how you invoke the program?
     
  7. jbernardis

    jbernardis New Member

    1,072
    0
    Oct 21, 2003
    Princeton NJ
    What version of python are you running? win32file was included in my python distribution and I am at 2.7. It's only imported if you are running on a windows system.
     
  8. windracer

    windracer joined the 10k club

    11,580
    3
    Jan 3, 2003
    St. Pete, FL
    That's definitely the case. I run vidmgr on Linux, but I tried opening the vidmgr.ini file in my default editor (Notepad++) and Windows Notepad. Notepad is definitely not interpreting the Unix-style CR/LFs properly. Notepad++ is just fine.
     
  9. Tobashadow

    Tobashadow Read over there --->

    2,339
    0
    Nov 11, 2006
    here yha go, i get this when i try to go into the program from the Tivo and get nothing but a black screen on the Tivo

    No issues with standard Pytivo or pushing from a the web interface for Pytivo.
     

    Attached Files:

  10. jbernardis

    jbernardis New Member

    1,072
    0
    Oct 21, 2003
    Princeton NJ
    The vcChanged error is not important here - it's a bug that has to be fixed, but it's only coming out because the cleanup routine is being called before I expected it. This routine is called by pyhme when the app is being torn down. The real question is why is it trying to tear the app down.

    Is there ANY other output form the program before this point, and what are the contents of your vidmgr.ini file - don't forget to mask out your TSN's before uploading your config file.
     
  11. Tobashadow

    Tobashadow Read over there --->

    2,339
    0
    Nov 11, 2006
    Edited


    Code:
    # vidmgr.ini
    #
    # this is the global options file - it belongs in the vidmgr directory under pyhme
    #
    # Default values are specified below
    #
    [vidmgr]
    # what file extensions are we interested in.  Only files with these extensions will be
    # displayed on screen
    # specify a list of file extensions - with the .  
    #      default: exts=.mp4 .mpg .avi .wmv
    #
    exts=.mp4 .mpg .avi .wmv .mkv
    
    # the next 4 options specify format information for the info screen that pops up
    # when you press the info button. 
    # specify a list of metadata tags for each.
    #       default: metaignore=isEpisode isEpisodic
    #                metafirst=title seriesTitle episodeTitle description
    #                metaspacebefore=
    #                metaspaceafter=
    #
    #metaignore=isEpisode isEpisodic
    #metafirst=title seriesTitle episodeTitle description
    #metaspacebefore=
    #metaspaceafter=
    
    # the next two options are also formatting options for the info screen.  The info screen is 
    # a two column layout.  the infolabelpercent option indicates what percentage of the
    # screen width should be devoted to the label column
    #      default: infolabelpercent=30
    # the inforightmargin option specifies the width of the right margin on the info screen.  If
    # you find the text running up against the right edge of the screen, increase this number.
    #      default: inforightmargin=20
    #
    #infolabelpercent=30
    #inforightmargin=20
    
    # the next two options control how multiple metadata files are handled.  When searching for
    # metadata, vidmgr looks for the files in the following sequence:
    #      .meta/default.txt
    #      default.txt
    #      .meta/<videofilename>.txt
    #      <videofilename>.txt
    #
    # metamergefiles determines if the contents of one file are merged with previous files or if
    # it completely replaces the previous file.  If this is set to true, since the files are read
    # from the general to the specific, more specific information will replace more general information,
    # but the end result will be the union of all the files.  If this is set to false, then only the
    # information in the last file read will be kept.
    #      default: metamergefiles=True
    #
    # metamergelines if only meaningful if metamergefiles is set to true.  If set to true, then if
    # two files contain the same metadata tag, then the values are concatenated together.  If set to 
    # false, then the value from the second file replaces the value from the first file.  Note - 
    # metadata tags that are already lists (vActor, etc) are always merged regardless of the value of
    # this option.
    #      default: metamergelines=False
    #
    #metamergefiles=True	
    #metamergelines=False
    
    # specify the point size of the font used to display the descriptive text of a video on the main screen
    #      default: descsize=20
    #
    #descsize=20
    
    #
    # the image files that vidmgr uses for its background, etc, can be replaced.  These files all reside
    # in a directory named 'skins' under the vidmgr directory.  If you wish to use your own image files, 
    # create a directory under skins, place your files there, and name that directory with the skin option.
    # Note: the files must be png files and must match the original images in size.  Only the images being
    # changed need be specified.  If an image file is NOT found in your skin's directory, the corresponding
    # file is taken from the main skins directory.
    #      default: skin=
    #
    #skin=
    
    # 
    # can the files in this directory be deleted - specify true or false.  
    #
    #      default: deleteallowed=True
    #
    deleteallowed=True
    
    #
    # specify how you would like the artwork for a video to be justified - specify left, center, or right
    #
    #      default: thumbjustify=left
    #
    #thumbjustify=left
    
    #
    # what metadata tags should be used to construct the string used to identify this file on the screen
    # specify a list of metadata tags - including any metadata tags you may have created yourself.  In addition to the
    # normal metadata tags, you can use the word 'file' to indicate the video's file name (without the directory) and 
    # you can use the value 'titleNumber' to indicate the title number for a DVD video.
    #      default: display=title episodeTitle
    #
    #display=title episodeTitle
    
    # what string should be used to separate the above metadata when constructing the title string
    # specify an arbitrary string
    #      default: displaysep=:
    #
    #displaysep=1
    
    #
    # what metadata tags should be used to construct the string that is used to sort the videos when they
    # are displayed in a list
    # specify a list of metadata tags - including any metadata tags you may have created yourself.  In addition to the
    # normal metadata tags, you can use the word 'file' to indicate the video's file name (without the directory) and 
    # you can use the value 'titleNumber' to indicate the title number for a DVD video.
    #      default: sort=title episodeTitle
    #
    #sort=title episodeTitle
    
    #
    # which direction should the sort be
    # specify up for an ascending sort or down for a descending sort
    #      default: dortdirection=up
    #
    #sortdirection=up
    
    # 
    # the next option controls the contents of the fop of the navigation tree.  If set to true, the top page will
    # contain an entry that says 'Browse Shares'.  This will take you to a separate page where the shares are listed.
    # If ths is set to false, then each share will be on the top screen.
    #      default: sharepage=true
    #
    #sharepage=true
    
    #
    # what text string should be used for the subtitle on the top navigation screen.  The subtitle normally gives
    # a cue as to where you are in the navigation, but no such cue is necessary when at the top; this string will
    # be displayed instead
    #      default: topsubtitle=Main Menu
    #
    #topsubtitle=Main Menu
    
    
    
    
    #
    # the tivos section of the file is where you identify your Tivos.  For each tivo, you MUST provide a name and
    # a TSN.  It is NOT necessary to put the dashes into the TSN - just use the digits.  In the tags below, replace the
    # X with a digit starting at 1 (e.g. tivo1.name).  If you have multiple tivos, number them sequentially.  You can have
    # an arbitrary number of tivos, but vidmgr will stop parsing the file as soon as it detects a gap in the
    # numbering sequence.  These fields have no default values.
    #
    [tivos]
    tivo1.name=Living Room
    tivo1.tsn=649000180xxxx 
    tivo2.name=Bedroom
    tivo2.tsn=649000180xxxxxx
    
    
    # 
    # the pytivos section is where you identify your pytivo processes.  The tags are numbered as above - replace the X
    # with a digit starting from 1 andproceeding sequentially from there.  You MUST provide config - which is a full
    # path to the pyTivo.conf file, and ip - which is the ip address of the machine on which pytivo is running.  If 
    # the config file does NOT specify a port number for pytivo, then you MUST specify it here.  pytivoX.skip is a 
    # comma-delimited list of shares that you do NOT want to include here - do NOT use extra spaces in this list.
    # pytivoX.sep is the file path separator for the machine on which pytivo is running - if this is omitted, then
    # the seperator character for the machine on which vidmgr is used.
    #
    [pytivos]
    pytivo1.config=C:\Users\Public\Documents\pyTivo\pyTivo.conf
    #pytivoX.sep=
    pytivo1.ip=192.168.1.125
    pytivo1.port=9033
    #pytivoX.skip=
    
    
    
    #
    # now come the virtual shares - there can be an arbitrary number of these.  Whatever text you put between the square
    # brackets as the section name will become the text that appears on the navigation screen.  Each virtual share MUST
    # have a specification for which files to include.  Additionally, you can override sort and display options, and you
    # can specify how files should be grouped
    #
    [virtual share name X]
    
    #
    # there are three possible ways to indicate which files to include.  You must use exactly 1 of them for each virtual share:
    #
    # 1. specify which metadata tags are used to divide videos up into groups:
    #
    #tags=tag1 tag2 tag3 ... tagn
    #
    # each video is searched for the specified tags.  If a video does not have ANY of these tags, it is skipped.  If it has ANY
    # of the tags, then the video file will be inserted into a group for each value.  For example, if the tag was vActor, then
    # for each actor in a file, that file would be inserted into a group with that actor's name as the group name.  As other
    # videos are found with this same actor, they will be added to the existing group.  What you end up with is a main menu choice
    # for the virtual share (the text in the brackets) and when you choose it, you will see all the actors found in the metadata
    # as separate "folders".  If you then navigate into those folders, you will see all the videos that each actor is in.  In addition
    # to all of the normal metadata tags, including your own, you can use titleNumber which is the title number for DVD titles.
    #
    #
    # 2. specify metadata VALUES that must be matched for a video to be included:
    #
    #values = tag:val,val.../tag:val,val...
    #
    # each video is searched for the specified tag(s).  If a video does not contain any of the tags, it is skipped.  If it DOES
    # contain a tag, then the value for that tag MUST be one of the values listed.  If it's not, then the video is skipped.  If 
    # multiple tags are specified, a video will match only if 1) it contains ALL of the tags, and 2) each value for EVERY tag
    # is in the specified list.  Spaces are significant for the values.  Do not use any unnecessary spaces in the specification.
    # As an example, values=isEpisodic:true,True,TRUE  will include ALL videos for which the value for isEpisodic is true, True, 
    # or TRUE.  As with tags, the metadata tags can be any of the normal tags, inclding your own, or titleNumber which is the
    # title number for DVD videos.
    #
    #
    # 3. include ALL videos unconditionally:
    #
    #values=all
    #
    # this is useful in conjunction with the other options below.  For example if you want a share that includes all videos
    # sorted by record date.
    #
    
    #
    # within the videos selected for a virtual share, you can add one layer of grouping.  This is provided by the groupby
    # option.  The tags option above already offers a layer of grouping, so this option is probably more useful for the
    # values option, but it CAN be used with tags.
    #
    # to use this option, specify a SINGLE metadata tag.  For each matching video, the value for this tag is used to create/identify
    #  a "folder" into which this video is placed.  If the video does NOT contain the tag, then the video is placed in the root
    # "folder".  As a good example, let's extend the isEpisodic example from above.  If you say "values=isEpisodic:true,TRUE,True"
    # all videos will show up in a single flat "folder".  They will be sorted, but it could be a large list.  If I
    # add "groupby=seriesTitle", then vidmgr will create "sub-folders" for each series title thus organizing the files.
    #
    #groupby=seriesTitle
    
    #
    # finally, it is possible to override the sort, sortdirection, display, and displaysep options for this virtual share
    # by simply specifying that option in the corresponding section.  If these are missing, then the global values will be used.
    #
    
      
    
    
     
  12. jbernardis

    jbernardis New Member

    1,072
    0
    Oct 21, 2003
    Princeton NJ

    You didn't answer my question about any other output, but I found a problem in your ini file. The following line:

    [virtual share name X]

    introduces a virtual share but doesn't have any specifications below it. All virtual shares need either a tags= or a values= line.

    Based on the name, I assume you don't want any virtual shares. If this is the case, then you need to comment out that line too
     
  13. Tobashadow

    Tobashadow Read over there --->

    2,339
    0
    Nov 11, 2006
    I commented the line out and same exact error.

    Sorry for being such a bother on this.

    I really hope this is what you want as far as "output" goes.

    At this point i am starting the hme program

    [​IMG]

    This is when i enter the Music, Photos section with the remote.

    [​IMG]

    When i select the program i get a black screen and this is the final output.

    [​IMG]
     
  14. jbernardis

    jbernardis New Member

    1,072
    0
    Oct 21, 2003
    Princeton NJ
    OK - so there is no information there, but the question still exists why cleanup is being called.

    Can you build the cache directly? Go into the vidmgr and type "python BuildCache.py" and see if it builds the cache.

    What's really concerning me is that I don't see ANY messages about not finding the cache and attempting to build it. It doesn't look to me like it is getting into the startup logic at all.

    The crash doesn't happen at program startup - it happens when you choose it from the menu. That means that it gets through reading the configuration file OK. The only real reason if could fail at this point is if it couldn't find an HD resolution to work in. You DO have an HD Tivo? right?

    I have also included a version of __init__.py with some debugging statements in it. (I had to add a .txt suffix for the forum). Save your original file, and put this file into the vidmgr directory and restart the app and let me know what output you get.

    BTW - I fixed the vcChanged error message in this file, so you shouldn't see that anymore.
     

    Attached Files:

  15. Tobashadow

    Tobashadow Read over there --->

    2,339
    0
    Nov 11, 2006
    No im not running a HD tivo is that a issue for this program i do not see it stated that a HD tivo is required.
     
  16. jbernardis

    jbernardis New Member

    1,072
    0
    Oct 21, 2003
    Princeton NJ
    Here is a paragraph from the readme file:

    Code:
    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.  One implication of this - if you plan on 
    retaining any of your HD files from the previous version of Vidmgr, then the "HD" needs to be removed
    from the file name.
    This was a tough decision, but when I was maintaining version 1, it got extremely unwieldy because there is such a great deal of difference in terms of what can be displayed that the program really had two distinct personalities. This made debugging and enhancing a real nightmare. When I moved to version 2, I made the decision to limit it to HD.

    Sorry about that. If you have SD, you need to stay back on version 1.
     
  17. Tobashadow

    Tobashadow Read over there --->

    2,339
    0
    Nov 11, 2006
    Ok is there anything special i need to do to get version 1 up and running?
     
  18. jbernardis

    jbernardis New Member

    1,072
    0
    Oct 21, 2003
    Princeton NJ
    It's very much the same as what you did for version 2. Follow the version 1 link in my signature below.

    The config information is in the pyhme config.ini file. The distribution has examples in a config.merge file. Just read the readme file carefully.

    Virtual shares are not a feature of version 1. One recommendation I would make based on user responses is to make sure you are using the blue skin. I think I changed it to be the default, but I can't really remember.
     
  19. Tobashadow

    Tobashadow Read over there --->

    2,339
    0
    Nov 11, 2006
    Ok i removed all the Version 2 items and got all of version 1 installed and edited the config file in the base hme area to the same settings as above using the examples in the merge config file, nothing more nothing less and now it is getting stuck on registering vidmgr.

    It just sits there.
     
  20. jbernardis

    jbernardis New Member

    1,072
    0
    Oct 21, 2003
    Princeton NJ
    I'm not sure what ypu mean by it just sits there. registering vidmgr SHOULD be the last thing you see until you start working with the remote control.

    I can't help if you don't give me more information than that.
     

Share This Page