Easier to use pyTivo

Discussion in 'TiVo Coffee House - TiVo Discussion' started by Dan203, Jan 23, 2017.

  1. Dan203

    Dan203 Super Moderator Staff Member TCF Club

    49,125
    5,173
    Apr 17, 2000
    Nevada
    Just uploaded a new build with the code signing certificate. Also linked to Microsoft Partner Program so that it knows I'm a valid developer and should recognize the certificate and hopefully stop the "Windows has protected you" message you get when you attempt to install it. Although it says it can take a while to build up a "reputation" and get that to go away.

    I also made a very minor change to how "check for updates" works. It's now using a PHP script to determine if you have latest version rather than a text file I have to update manually every time I upload a new build. I will push this same change to the Mac soon as well, but since there are no other changes I don't want to bother them with an update just for this. So whenever I have a new build for them I'll add it.
     
    richsadams, kpeters59 and elprice7345 like this.
  2. HerronScott

    HerronScott Well-Known Member

    7,178
    1,019
    Jan 1, 2002
    Staunton, VA
    Thanks Dan! Just FYI, still got this but it knows you are the publisher!

    upload_2019-12-24_9-4-45.png

    Scott
     
  3. ClearToLand

    ClearToLand Old !*#$% Tinkerer!

    1,064
    157
    Jul 9, 2001
    Central Jersey
    Robert?
     
    mlippert likes this.
  4. Dan203

    Dan203 Super Moderator Staff Member TCF Club

    49,125
    5,173
    Apr 17, 2000
    Nevada
    Yeah that's my legal name. For some reason my parents named me after my Dad and then decided yo call me by my middle name my entire life.

    I tried to get the certificate people to use Dan Haddix as the "company" name but they're super strict and wouldn’t allow that
     
    ClearToLand and mlippert like this.
  5. KevTech

    KevTech Active Member

    346
    172
    Apr 15, 2014
    What I do after I download an executable file and I know the file is OK I right click the file > properties > unblock > apply.

    This will stop SmartScreen from blocking the file.

    block.jpg
     
    ClearToLand likes this.
  6. Dan203

    Dan203 Super Moderator Staff Member TCF Club

    49,125
    5,173
    Apr 17, 2000
    Nevada
    I think that kind of data is sent to MS and increases my "reputation" so this will stop automatically in the future. Or at least it should.
     
  7. ADG

    ADG Allan

    2,576
    240
    Aug 19, 2003
    New Jersey, USA
    The latest release is creating two folders in c: drive that were never there before with any earlier versions. They only appear when the app is running. Is this by design?
     
  8. KevTech

    KevTech Active Member

    346
    172
    Apr 15, 2014
    I noticed this as well.

    Prior versions the files were created in Users\username\AppData\Local\Temp and this version they are created in the root of the drive.
     
  9. Dan203

    Dan203 Super Moderator Staff Member TCF Club

    49,125
    5,173
    Apr 17, 2000
    Nevada
    Is that actually working! I didn’t think it did and actually complained to the pyinstaller people.

    So it's intentional. The reason is the tray app. The way the python code works is I use a program called pyinstaller which converts all the python code and the python runtime into an exe that can just be launched like any normal program. It does this by temporarily extracting these to the temp folder and running from there. Problem is the tray app can sometimes run for a long time. And Windows will "clean up" any files in the Temp folder that haven’t been touched in a while. This means some of the python files, and the logos/graphics, that are mainly only touched when the program first launches are considered stale and deleted by Windows. Which creates erratic behavior.

    In one of the newer versions of pyinstaller they added a flag that supposed to allow you to move the temp files to a different location. It's not well documented so I played with it for a bit and couldn’t seem to get it to work, so I gave up on it. But because it didn’t seem to actually do anything I just left the line of code in there. Apparently I was wrong and it's doing something on some systems. I need to figure out what exactly it's doing and how I can get consistent results so I can make this a predictable change.

    So fair warning, there may be yet another update incoming in the next few days. Sorry.
     
    kpeters59 and mlippert like this.
  10. ken_man

    ken_man New Member

    6
    0
    Oct 31, 2017
    WI
    I updated to the latest version and downloads are just hanging in the download queue. I noticed the below in the log file. Is this what's causing the downloads to get stuck in the queue? Any idea how to fix?

    Code:
    WARNING:pyTivo.config:tivodecode not found
    WARNING:pyTivo.config:tivodecode not found
    The exe can not be modified after it generated.
    INFO:pyTivo.togo:[Errno 22] Invalid argument
    Unhandled exception in thread started by <unbound method ToGo.process_queue>
    ERROR:pyTivo:Exception in pyTivo
    Traceback (most recent call last):
      File "plugins\togo\togo.py", line 935, in process_queue
      File "plugins\togo\togo.py", line 759, in get_tivo_file
    IOError: [Errno 22] Invalid argument
     
  11. Dan203

    Dan203 Super Moderator Staff Member TCF Club

    49,125
    5,173
    Apr 17, 2000
    Nevada
    Are you using a standard user account? I think the mistake mentioned above that's extracting the code to just C might be causing access errors for people with standard user accounts. I'm going to have to move it back to temp.
     
  12. ADG

    ADG Allan

    2,576
    240
    Aug 19, 2003
    New Jersey, USA
    That would be great.

    Also, when there is a new release to your program there is a persistent nag every day until I update it. I'd like the option to pass on an update if everything is working the way I want it to. I can always change my mind later.

    Thanks again for all your work!!!
     
  13. ken_man

    ken_man New Member

    6
    0
    Oct 31, 2017
    WI
    No, I'm using an administrator account. I am seeing two folders being created on the C drive.
     
  14. Dan203

    Dan203 Super Moderator Staff Member TCF Club

    49,125
    5,173
    Apr 17, 2000
    Nevada
    Could be antivirus or something blocking the download. Although not sure why they wouldn't show in the queue. The queue is internal to pyTivo and I haven't touched that code in any of the recent updates.
     
  15. ken_man

    ken_man New Member

    6
    0
    Oct 31, 2017
    WI
    I'll do some digging later tonight. They are showing in the queue but they just sit there, nothing happens. I did try some setting changes and was able to get a couple shows downloaded but they saved as .tivo files, in the past they've saved as .ts files.
     
  16. ThAbtO

    ThAbtO TiVoholic by the bay TCF Club

    11,262
    826
    Apr 6, 2000
    SF Bay Area
    All Tivo downloads are .TiVo files, its when they are decrypted that become either .MPG (PS download) or .TS (TS download).
     
  17. Dan203

    Dan203 Super Moderator Staff Member TCF Club

    49,125
    5,173
    Apr 17, 2000
    Nevada
    OK that could be the decrypting. I'm signing all the exes in the new build, maybe the tivolibre one doesn’t like being signed.
     
  18. Dan203

    Dan203 Super Moderator Staff Member TCF Club

    49,125
    5,173
    Apr 17, 2000
    Nevada
    Confirmed. The program I used to generate the EXE from the java tivolibre does not allow you to alter the file in any way after it's created, including signing it. And it doesn't have it's own built in signing feature, so I'll just have to revert to not signing that one.
     
  19. Dan203

    Dan203 Super Moderator Staff Member TCF Club

    49,125
    5,173
    Apr 17, 2000
    Nevada
    OK another update uploaded. This fixes the issue with the temp files being extracted to C, fixes the issue with tivolibre being signed and not working, and adds a new button to the upgrade prompt that will allow you to ignore the update.

    The new ignore update option will just ignore this specific version. If there is another update in the future you'll still get prompted for that.

    I *might* release a Mac update just to add that feature and make the minor version check change I made in 1.6.21 for Windows. But not sure if that's enough to bother Mac users with.
     
  20. UCLABB

    UCLABB Well-Known Member

    4,513
    1,103
    May 29, 2012
    Riverside, CA
    My apology for being lazy as I imagine the answer is already somewhere here. When I go to upgrade it says I must close the program, I do that, but still no dice. I also closed a couple of processes, but still no go.
     

Share This Page