GithubHelp home page GithubHelp logo

tivotogo.bundle's People

Contributors

jradwan avatar sander1 avatar tivoguy avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

tivotogo.bundle's Issues

tivolibre logic doesn't work on Windows?

When trying to use the tivolibre functionality on Windows, the download (or stream) "completes" almost right away (without doing anything):

download:

2018-06-03 18:19:37,322 (2d6c) :  DEBUG (logkit:13) - CMD: "C:\Users\username\AppData\Local\Plex Media Server\Plug-ins\TiVoToGo.bundle\Contents\Resources\win\curl.exe" "http://192.168.1.73:80/download/Colony.TiVo?Container=%2FNowPlaying&id=49643" --digest -s -u tivo:<MAK>5 -c "c:\users\username\appdata\local\temp/cookies.txt"
2018-06-03 18:19:37,334 (2d6c) :  DEBUG (logkit:13) - PIPED to: "C:\Program Files (x86)\Java\jre1.8.0_171\bin\java.exe" -jar "C:\Users\username\AppData\Local\Plex Media Server\Plug-ins\TiVoToGo.bundle\Contents\Resources\TivoDecoder.jar" -m <MAK> -o "C:\Users\Username\Videos\Colony - End of the Road.mpg" -
...
2018-06-03 18:19:44,487 (2d6c) :  INFO (logkit:16) - Download complete: C:\Users\Username\Videos\Colony - End of the Road.mpg

stream:

2018-06-03 18:21:58,213 (13a4) :  DEBUG (logkit:13) - CMD: "C:\Users\username\AppData\Local\Plex Media Server\Plug-ins\TiVoToGo.bundle\Contents\Resources\win\curl.exe" "http://192.168.1.73:80/download/Colony.TiVo?Container=%2FNowPlaying&id=49643" --digest -s -u tivo:<MAK> -c "c:\users\username\appdata\local\temp/cookies.txt"
2018-06-03 18:21:58,221 (13a4) :  DEBUG (logkit:13) - PIPED to: "C:\Program Files (x86)\Java\jre1.8.0_171\bin\java.exe" -jar "C:\Users\username\AppData\Local\Plex Media Server\Plug-ins\TiVoToGo.bundle\Contents\Resources\TivoDecoder.jar" -m <MAK> -
2018-06-03 18:21:58,233 (13a4) :  INFO (logkit:16) - Starting decoder
2018-06-03 18:21:58,710 (13a4) :  INFO (logkit:16) - Self-exit of tivodecode/curl
2018-06-03 18:21:58,710 (13a4) :  INFO (logkit:16) - tivodecode/curl terminated

All of the paths are correct, and if you copy/paste the "CMD" and "PIPED to" debug lines to a Windows command prompt they work just fine. So it seems to be something related to the paths (embedded spaces?) and how Python is handing them in the command-lines for Windows (this all works fine on Linux and obviously the existing tivodecode calls work fine ... so something related to the Java command-line?).

Hardcoded forward slash (/) causing issue on Windows?

Reported here.

"I don't think Windows is happy with mixing forward slashes with back slashes.

aka: "c:\users\xxxx\appdata\local\temp/cookies.txt"

There's a few places in init.py, where a file with a / is appended to a path that uses . It's pretty simple to kludge for windows users by changing / to \ where you see + "/cookies.txt and + "/cdata.pem, something more OS aware should be done for the real code."

Invalid use of /tmp/ on Windows

On a Windows platform, using /tmp/cookies.txt won't work:

2018-05-01 09:03:33,693 (1210) :  DEBUG (logkit:13) - CMD: C:\Users\D***\AppData\Local\Plex Media Server\Plug-ins\TiVoToGo.bundle\Contents\Resources\win\curl.exe http://192.168.1.178:80/download/The%20Crossing.TiVo?Container=%2FNowPlaying&id=23212 --digest -s -u tivo:xxxxxxxxxx -c /tmp/cookies.txt

Need to do a platform check and use a valid directory. Reported here.

"Playback error" trying to play recording (browser)

image

Reported originally here.

Only seems to happen in the browser? (mobile is currently broken and playback works fine through the channel on the TiVo itself in my testing).

Log just shows:

2019-07-20 11:52:49,641 (7fd0367fc700) :  DEBUG (runtime:717) - Handling request GET /video/tivotogo/:/function/CreateVideoClipObject?function_args=<snippety-snip>&includeConcerts=1&includeExtras=1&includeOnDeck=1&includePopularLeaves=1&includePreferences=1&includeChapters=1&includeStations=1&includeExternalMedia=1&asyncAugmentMetadata=1&checkFiles=1
2019-07-20 11:52:49,644 (7fd0367fc700) :  DEBUG (runtime:814) - Found route matching /video/tivotogo/:/function/CreateVideoClipObject
2019-07-20 11:52:49,645 (7fd0367fc700) :  DEBUG (runtime:125) - Calling function 'CreateVideoClipObject'
2019-07-20 11:52:49,646 (7fd0367fc700) :  DEBUG (__init__:178) - Starting a thread
2019-07-20 11:52:49,646 (7fd0367fc700) :  DEBUG (__init__:180) - Done starting a thread
2019-07-20 11:52:49,647 (7fd0377fe700) :  INFO (__init__:378) - Server already running or port in use
2019-07-20 11:52:49,648 (7fd0367fc700) :  WARNING (runtime:1065) - Generating a callback path for a function with no route: <function CreateVideoClipObject at 0x7fd05458c6e0>
2019-07-20 11:52:49,654 (7fd0367fc700) :  DEBUG (runtime:88) - Sending packed state data (109 bytes)
2019-07-20 11:52:49,655 (7fd0367fc700) :  DEBUG (runtime:924) - Response: [200] MediaContainer, 1708 bytes
2019-07-20 11:52:49,694 (7fd0367fc700) :  DEBUG (runtime:717) - Handling request GET /video/tivotogo/:/function/CreateVideoClipObject?function_args=<snippety-snip>&includeBandwidths=1&offset=-1
2019-07-20 11:52:49,698 (7fd0367fc700) :  DEBUG (runtime:814) - Found route matching /video/tivotogo/:/function/CreateVideoClipObject
2019-07-20 11:52:49,699 (7fd0367fc700) :  DEBUG (runtime:125) - Calling function 'CreateVideoClipObject'
2019-07-20 11:52:49,700 (7fd0367fc700) :  DEBUG (__init__:178) - Starting a thread
2019-07-20 11:52:49,700 (7fd0367fc700) :  DEBUG (__init__:180) - Done starting a thread
2019-07-20 11:52:49,701 (7fd0367fc700) :  WARNING (runtime:1065) - Generating a callback path for a function with no route: <function CreateVideoClipObject at 0x7fd05458c6e0>
2019-07-20 11:52:49,701 (7fd0377fe700) :  INFO (__init__:378) - Server already running or port in use
2019-07-20 11:52:49,707 (7fd0367fc700) :  DEBUG (runtime:88) - Sending packed state data (109 bytes)
2019-07-20 11:52:49,707 (7fd0367fc700) :  DEBUG (runtime:924) - Response: [200] MediaContainer, 1708 bytes

whereas a successful playback (via TiVo) looks the same except it continues with the encoder:

2019-07-20 11:54:20,389 (7fd0377fe700) :  DEBUG (runtime:717) - Handling request GET /video/tivotogo/:/function/CreateVideoClipObject?function_args=<snippety-snip>&includeBandwidths=1&offset=-1
2019-07-20 11:54:20,391 (7fd0377fe700) :  DEBUG (runtime:814) - Found route matching /video/tivotogo/:/function/CreateVideoClipObject
2019-07-20 11:54:20,391 (7fd0377fe700) :  DEBUG (runtime:125) - Calling function 'CreateVideoClipObject'
2019-07-20 11:54:20,392 (7fd0377fe700) :  DEBUG (__init__:178) - Starting a thread
2019-07-20 11:54:20,392 (7fd0377fe700) :  DEBUG (__init__:180) - Done starting a thread
2019-07-20 11:54:20,392 (7fd0377fe700) :  WARNING (runtime:1065) - Generating a callback path for a function with no route: <function CreateVideoClipObject at 0x7fd05458c6e0>
2019-07-20 11:54:20,392 (7fd017fff700) :  INFO (__init__:378) - Server already running or port in use
2019-07-20 11:54:20,395 (7fd0377fe700) :  DEBUG (runtime:88) - Sending packed state data (109 bytes)
2019-07-20 11:54:20,395 (7fd0377fe700) :  DEBUG (runtime:924) - Response: [200] MediaContainer, 1708 bytes
2019-07-20 11:54:20,724 (7fd0377fe700) :  DEBUG (runtime:717) - Handling request GET /video/tivotogo/:/function/CreateVideoClipObject?function_args=<snippety-snip>&includeBandwidths=1&offset=-1
2019-07-20 11:54:20,726 (7fd0377fe700) :  DEBUG (runtime:814) - Found route matching /video/tivotogo/:/function/CreateVideoClipObject
2019-07-20 11:54:20,727 (7fd0377fe700) :  DEBUG (runtime:125) - Calling function 'CreateVideoClipObject'
2019-07-20 11:54:20,727 (7fd0377fe700) :  DEBUG (__init__:178) - Starting a thread
2019-07-20 11:54:20,727 (7fd0377fe700) :  DEBUG (__init__:180) - Done starting a thread
2019-07-20 11:54:20,728 (7fd0377fe700) :  WARNING (runtime:1065) - Generating a callback path for a function with no route: <function CreateVideoClipObject at 0x7fd05458c6e0>
2019-07-20 11:54:20,728 (7fd017fff700) :  INFO (__init__:378) - Server already running or port in use
2019-07-20 11:54:20,734 (7fd0377fe700) :  DEBUG (runtime:88) - Sending packed state data (109 bytes)
2019-07-20 11:54:20,735 (7fd0377fe700) :  DEBUG (runtime:924) - Response: [200] MediaContainer, 1708 bytes
2019-07-20 11:54:20,784 (7fd0357fa700) :  INFO (__init__:324) - GET URL: http://192.168.1.72:80/download/News%20Ch8%20at%206PM.TiVo?Container=%2FNowPlaying&id=71429
2019-07-20 11:54:20,784 (7fd0357fa700) :  DEBUG (__init__:332) - CMD: "/usr/bin/curl" "http://192.168.1.72:80/download/News%20Ch8%20at%206PM.TiVo?Container=%2FNowPlaying&id=71429" --digest -s -u tivo:<snippety-snip> -c "/tmp/cookies.txt"
2019-07-20 11:54:20,789 (7fd0357fa700) :  DEBUG (__init__:337) - PIPED to: "/usr/bin/java" -jar "/var/lib/plexmediaserver/Library/Application Support/Plex Media Server/Plug-ins/TiVoToGo.bundle/Contents/Resources/TivoDecoder.jar" -m <snippety-snip> -
2019-07-20 11:54:20,794 (7fd0357fa700) :  INFO (__init__:346) - Starting decoder

With Plex removing support for plug-ins and channels, this could just be another sign of things breaking on the back-end and another nail in the coffin for this. ☚ī¸

Suggestions folder doesn't work

When choosing the Suggestions folder in the Plex channel, no shows are returned. The count is correct on the main screen.

image

image

2018-05-01 21:22:10,198 (7f629e7fc700) :  DEBUG (runtime:717) - Handling request GET /video/tivotogo/shows?url=https%3A%2F%2F192.168.1.72%3A443%2FTiVoConnect%3FCommand%3DQueryContainer%26Container%3D%252FNowPlaying%252F0&tivoip=192.168.1.72&showName=TiVo+Suggestions
2018-05-01 21:22:10,202 (7f629e7fc700) :  DEBUG (runtime:814) - Found route matching /video/tivotogo/shows
2018-05-01 21:22:10,203 (7f629e7fc700) :  INFO (__init__:80) - getTivoShowsByIPURL: https://192.168.1.72:443/TiVoConnect?Command=QueryContainer&Container=%2FNowPlaying%2F0&AnchorOffset=0

This:

https://192.168.1.72/nowplaying/TiVoConnect?Command=QueryContainer&Container=%2FNowPlaying%2F0&tivoip=192.168.1.72&showName=TiVo+Suggestions

doesn't seem to work anymore (the HTTPS browser interface is broken for Suggestions as well).

Add season and episode info to file name when downloading

I'd love to be able to download the TV shows and have Plex pick them up but since there is no season or episode in the filename or metadata, Plex just ignores them. TheTVDB.com has a free API and Plex uses them for the TV info already.

Broken on mobile?

Not sure when this started, but the plugin doesn't seem to work through the Plex mobile app (at least on my iPhone). It just shows "no content" and I see this in the plugin log:

2019-03-28 16:08:08,419 (7f4e2dffb700) :  DEBUG (runtime:49) - Received packed state data (80 bytes)
2019-03-28 16:08:08,422 (7f4e2dffb700) :  DEBUG (runtime:814) - Found route matching /video/tivotogo
2019-03-28 16:08:08,423 (7f4e2dffb700) :  CRITICAL (runtime:889) - Exception (most recent call last):
  File "/usr/lib/plexmediaserver/Resources/Plug-ins-782228f99/Framework.bundle/Contents/Resources/Versions/2/Python/Framework/compoents/runtime.py", line 843, in handle_request
    result = f(**d)
  File "/usr/lib/plexmediaserver/Resources/Plug-ins-782228f99/Framework.bundle/Contents/Resources/Versions/2/Python/Framework/handlrs/base.py", line 111, in call
    result = self.func(*args, **kwargs)
TypeError: MainMenu() takes no arguments (1 given)

The plugin works fine in the browser (even the mobile browser) so it seems to be the Plex app.

Mind RPC call to retrieve metadata doesn't work on Windows?

When using the new Mind RPC functionality (to retrieve the episode name/number for proper Plex filename formatting) on Windows, the call fails:

2018-06-03 18:17:22,023 (1170) :  INFO (logkit:16) - URL: http://192.168.1.73:80/download/Colony.TiVo?Container=%2FNowPlaying&id=49643
2018-06-03 18:17:22,023 (1170) :  INFO (logkit:16) - Title: Colony - End of the Road
2018-06-03 18:17:22,025 (1170) :  INFO (logkit:16) - Search title  : Colony
2018-06-03 18:17:22,025 (1170) :  INFO (logkit:16) - Search episode: End of the Road
2018-06-03 18:17:22,025 (1170) :  INFO (logkit:16) - Executing episodeSearch
2018-06-03 18:17:22,038 (1170) :  CRITICAL (core:574) - Exception (most recent call last):
  File "C:\Program Files (x86)\Plex\Plex Media Server\Resources\Plug-ins-31d3c0c65\Framework.bundle\Contents\Resources\Versions\2\Python\Framework\components\runtime.py", line 843, in handle_request
    result = f(**d)
  File "C:\Users\username\AppData\Local\Plex Media Server\Plug-ins\TiVoToGo.bundle\Contents\Code\__init__.py", line 497, in downloadLocal
    remote = Remote(rpc_username, rpc_password)
  File "C:\Users\username\AppData\Local\Plex Media Server\Plug-ins\TiVoToGo.bundle\Contents\Code\__init__.py", line 715, in __init__
    self.ssl_socket = ssl.wrap_socket(self.socket, certfile=certfile_path)
  File "C:\Program Files (x86)\Plex\Plex Media Server\python27.zip\ssl.py", line 933, in wrap_socket
    ciphers=ciphers)
  File "C:\Program Files (x86)\Plex\Plex Media Server\python27.zip\ssl.py", line 580, in __init__
    self.getpeername()
  File "C:\Program Files (x86)\Plex\Plex Media Server\python27.zip\socket.py", line 228, in meth
    return getattr(self._sock,name)(*args)
error: [Errno 10057] A request to send or receive data was disallowed because the socket is not connected and (when sending on a datagram socket using a sendto call) no address was supplied

I'm wondering if this is related to issue #4 in that it's somehow path-related and how Python is handing long paths with spaces in it. In this case, the certfile_path which is where the cdata.pem file is located, necessary for the SSL connection to the TiVo Mind server (ex. C:\Users\username\AppData\Local\Plex Media Server\Plug-ins\TiVoToGo.bundle\Contents\Libraries\Shared\cdata.pem). This feature works fine on Linux.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤ī¸ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.