Anybody want to make an Internet Video Pusher helper app for EWz?

Discussion in 'Developers Corner' started by davidblackledge, Mar 15, 2015.

  1. davidblackledge

    davidblackledge Registered lÜser

    563
    36
    Sep 9, 2008
    NM
    Thanks!
    I'll probably extract what I need to a jar file if I can, and if it's in good shape, I'll hand it back to you for distribution to others. Because there are so many of us ;]
     
  2. ntlord

    ntlord Member

    184
    1
    Nov 30, 2013
    I'll have to look into this. I misunderstood what you were looking for originally, and I'm not sure plex can do that (i.e. add content on the fly). Although what do you think of this:

    1. So generally speaking, plex searches folders for videos. The folders that plex searches can be tied to media categories on plex. We could set up a new category, point it to a temporary enterwebz folder.

    2. I could write a small java daemon that would do a curl on the url you pass, and download the content. Send a folder refresh to plex, which would add the content.

    3. The daemon could then get the transcoding URL from plex, and pass it back to enterwebz

    The problem with this approach is that it would have to download the content fully to plex to "add it."

    Another approach might be to use "plex channels," which Plex can also transcode. Plex also has the ability to transcode content found on the web (e.g. youtube, etc.) I don't know much about this though, but its possible this could be used. Off the top of my head, we could create an enterwebz channel that would be attached to a very simple (locally hosted) web page that would display the content you sent over.
     
  3. davidblackledge

    davidblackledge Registered lÜser

    563
    36
    Sep 9, 2008
    NM
    Hmm... ok, that would work for the "push" option at least. In fact, since the Plex app is coming soon, it might make sense to not even do a push. Instead make this a THIRD option for EWz users - first two I still need some non-plex help with (transcoding player, transcoding pusher) and this option is a Plex Adder...then they go to Plex to watch the video (basically the same as the transcoding pusher, but only using the Plex app).

    So... I think we want a new plan:
    I can make an HME app that says "Click continue to add this video to your Plex queue."
    When they click continue it just calls your code and says "Video added. Go to the Plex app to view it." (and if it makes sense "If it requires transcoding, it will not be ready immediately.")
    I think I'd also be able to include a button of "launch Plex App" (and another to "return")

    Your code would just do whatever you think is a good way to make the video available in the Plex app... a TiVo channel, an Enter Webz channel, an ntlord channel, or whatever ;] Ideally it could return some sort of success or other status information (maybe something that says what/where it will appear as) that could be displayed by the HME app.

    And again, if you can figure a way for me to provide vimeo and youtube ids to you so you can queue them as well, that'd be great.
     
  4. davidblackledge

    davidblackledge Registered lÜser

    563
    36
    Sep 9, 2008
    NM
    So I made a modified copy of the TiVoListener, but other than that I just import streambaby.jar for Mind because it was a little too intertwined for me to extract easily.
    Using just that jar and no current streambaby installation:
    Code:
    Mind mind = new Mind();
    EWzMediaHelperFactory f = (EWzMediaHelperFactory) getBApp().getFactory();
    
    // login and push
    if (mind.login(f.getLogin(), f.getPassword())) {
        if (mind.pushVideo(h)) {
    
    but my login call is failing with:
    Code:
    javax.net.ssl.SSLHandshakeException:
    java.security.cert.CertificateException: Certificates does not conform to algorithm constraints
    at the line
    Code:
    BufferedReader in = new BufferedReader( new InputStreamReader(con.getInputStream()));
    Does that mean anything to you?

    While I have you, where does that little logging system you use put its logs by default?
     
  5. moyekj

    moyekj Well-Known Member

    12,157
    809
    Jan 23, 2006
    Mission...
    Newer Java releases made https certificates harder to deal with. From:
    https://sourceforge.net/p/streambab...redappeal/tivo/streambaby/StreamBabyMain.java
    You need this to change security policy to prevent using algorithms that don't work with tivo.com site:
    Code:
         // This is to workaround issue that started with Java 7 update 40 which sets
         // this property to "MD2, RSA keySize < 1024" and prevents authentication
         // from working
         // Debug issues using following when running java: -Djavax.net.debug=all
         // Search for: "Cipher Suite: ..."
         // Java 8 picks this not working one by default: SSL_RSA_WITH_3DES_EDE_CBC_SHA
         // Java 7u40 picks this not working one by default: TLS_RSA_WITH_AES_128_CBC_SHA
         // This one works: SSL_RSA_WITH_RC4_128_SHA
         // Don't know how to enable specific suites, so for now I disable ones that don't work
         Security.setProperty("jdk.certpath.disabledAlgorithms","TLS_RSA_WITH_AES_128_CBC_SHA, SSL_RSA_WITH_3DES_EDE_CBC_SHA");
    
    I didn't implement the logging stuff, but log files goes to same location as streambaby.jar.
     
  6. davidblackledge

    davidblackledge Registered lÜser

    563
    36
    Sep 9, 2008
    NM
    Thanks, that did it. I also had to replace your Log class with a copy that uses Java Logging instead of that Simple Log thing since I guess that was in another jar file.

    That said, so far no attempts have actually downloaded (it works, but there is an error in the TiVo's history that it wasn't downloaded because it couldn't be found)

    Trying to launch the video player inline from another inline launched app is failing so far, too. I'm ready to stop trying for a while.
    Thanks for the help, anyhow.
     

Share This Page