[Plugin] Plex Streams


Recommended Posts

12 hours ago, Nomad347 said:

Feature request: Could you add all/selectable servers to the Display Dashboard Widget instead of just the one?

Amazing work so far.

Thank you...

Yeah, now that I have it pulling devices the right way and not slowing down loading of the dashboard and streams page, let me see about displaying streams from any combination of servers.

 

Keep the feedback and suggests coming!

Link to comment

after the last update i cant add a plex token anymore.

when using the get plex token button and login in i get the following error in console

plex.js:16 Uncaught TypeError: Cannot read property 'split' of undefined
    at getServers (plex.js:16)
    at Object.success (plex.js:206)
    at i (dynamix.js?v=1583697979:4)
    at Object.fireWith [as resolveWith] (dynamix.js?v=1583697979:4)
    at z (dynamix.js?v=1583697979:4)
    at XMLHttpRequest.<anonymous> (dynamix.js?v=1583697979:4)

 

ps: before the update i could add the token but the plugin would never load the server.

Link to comment
43 minutes ago, mangavalk said:

after the last update i cant add a plex token anymore.

when using the get plex token button and login in i get the following error in console


plex.js:16 Uncaught TypeError: Cannot read property 'split' of undefined
    at getServers (plex.js:16)
    at Object.success (plex.js:206)
    at i (dynamix.js?v=1583697979:4)
    at Object.fireWith [as resolveWith] (dynamix.js?v=1583697979:4)
    at z (dynamix.js?v=1583697979:4)
    at XMLHttpRequest.<anonymous> (dynamix.js?v=1583697979:4)

 

ps: before the update i could add the token but the plugin would never load the server.

Ok I will look into this today

Link to comment
2 hours ago, mangavalk said:

after the last update i cant add a plex token anymore.

when using the get plex token button and login in i get the following error in console


plex.js:16 Uncaught TypeError: Cannot read property 'split' of undefined
    at getServers (plex.js:16)
    at Object.success (plex.js:206)
    at i (dynamix.js?v=1583697979:4)
    at Object.fireWith [as resolveWith] (dynamix.js?v=1583697979:4)
    at z (dynamix.js?v=1583697979:4)
    at XMLHttpRequest.<anonymous> (dynamix.js?v=1583697979:4)

 

ps: before the update i could add the token but the plugin would never load the server.

This is now fixed by version 2020.06.20

Edited by dorgan
Link to comment
21 minutes ago, dorgan said:

This is now fixed by version 2020.06.20

 

Thank you, however there is an issue that appeared after the 06.19 version for me that is still persistent, the dashboard widget is stuck in "Retrievening stream data..." If I click on the stream icon in the widget it show the correct data but the widget simply refuses to update. Tried different browsers, Edge and Chrome with the same result.

Link to comment
8 minutes ago, bunkermagnus said:

 

Thank you, however there is an issue that appeared after the 06.19 version for me that is still persistent, the dashboard widget is stuck in "Retrievening stream data..." If I click on the stream icon in the widget it show the correct data but the widget simply refuses to update. Tried different browsers, Edge and Chrome with the same result.

I will look into this as well.  Have to run some errands, but will take a look later today.

  • Like 1
Link to comment

One more issue, the one from before.

 

plex.js:24 Uncaught TypeError: Cannot read property 'uri' of null
    at plex.js:24
    at Array.forEach (<anonymous>)
    at Object.<anonymous> (plex.js:23)
    at i (dynamix.js?v=1583697979:4)
    at Object.fireWith [as resolveWith] (dynamix.js?v=1583697979:4)
    at z (dynamix.js?v=1583697979:4)
    at XMLHttpRequest.<anonymous> (dynamix.js?v=1583697979:4)

I looked into the code, there is a proton object inside the server list. so that makes the script break.

Link to comment
25 minutes ago, mangavalk said:

One more issue, the one from before.

 


plex.js:24 Uncaught TypeError: Cannot read property 'uri' of null
    at plex.js:24
    at Array.forEach (<anonymous>)
    at Object.<anonymous> (plex.js:23)
    at i (dynamix.js?v=1583697979:4)
    at Object.fireWith [as resolveWith] (dynamix.js?v=1583697979:4)
    at z (dynamix.js?v=1583697979:4)
    at XMLHttpRequest.<anonymous> (dynamix.js?v=1583697979:4)

I looked into the code, there is a proton object inside the server list. so that makes the script break.

What screen are you on when seeing this error?  Dashboard, settings or streams?

Link to comment
function getServers(containerSelector, selected) {
    var url = '/plugins/plexstreams/getServers.php?useSsl=' + $('input[name="FORCE_PLEX_HTTPS"]:checked').val();
    var $host = $(containerSelector);
    $host.hide();
    $('.lds-dual-ring').show();
    selected = selected.split(',');
    $host.html('');
    $.get(url).done(function(data) {
        serverList = data.serverList;
        for (var id in serverList) {
            if (serverList.hasOwnProperty(id)) {
                var server = serverList[id];
                serverList[id].Connections.forEach(function(connection) {
		    if(connection != null)
                        $host.append('<input type="checkbox" onchange="updateServerList(\'HOST\')" name="hostbox" id="' + connection.uri + '" data-id="' + id + '"' + (selected.indexOf(connection.uri) > -1 ? ' checked="checked"' : '' ) + ' value="' + connection.uri + '"/> <label for="' + connection.uri + '"> ' + server.Name + ' (' +  connection.address + ':' + connection.port + ')' + (connection.local === '0' ? ' - Remote' : '') + '</label><br/>');
                });
            }
        }
        $host.show();
        $('.lds-dual-ring').hide();
    });
}

Added this change in plex.js fixes it :)

Link to comment
2 hours ago, mangavalk said:

One more issue, the one from before.

 


plex.js:24 Uncaught TypeError: Cannot read property 'uri' of null
    at plex.js:24
    at Array.forEach (<anonymous>)
    at Object.<anonymous> (plex.js:23)
    at i (dynamix.js?v=1583697979:4)
    at Object.fireWith [as resolveWith] (dynamix.js?v=1583697979:4)
    at z (dynamix.js?v=1583697979:4)
    at XMLHttpRequest.<anonymous> (dynamix.js?v=1583697979:4)

I looked into the code, there is a proton object inside the server list. so that makes the script break.

This is now fixed in 2020.06.20a

Link to comment
4 hours ago, bunkermagnus said:

 

Thank you, however there is an issue that appeared after the 06.19 version for me that is still persistent, the dashboard widget is stuck in "Retrievening stream data..." If I click on the stream icon in the widget it show the correct data but the widget simply refuses to update. Tried different browsers, Edge and Chrome with the same result.

this is now fixed with 2020.06.20a

Link to comment

sorry to bother but:
 

plugin: downloading: https://raw.githubusercontent.com/dorgan/Unraid-plexstreams/master/archive/plexstreams-2020.06.20a-x86_64-1.txz ... failed (Invalid URL / Server error response)
plugin: wget: https://raw.githubusercontent.com/dorgan/Unraid-plexstreams/master/archive/plexstreams-2020.06.20a-x86_64-1.txz download failure (Invalid URL / Server error response)

 

edit: works now:)

Edited by mangavalk
Link to comment
13 minutes ago, mangavalk said:

sorry to bother but:
 


plugin: downloading: https://raw.githubusercontent.com/dorgan/Unraid-plexstreams/master/archive/plexstreams-2020.06.20a-x86_64-1.txz ... failed (Invalid URL / Server error response)
plugin: wget: https://raw.githubusercontent.com/dorgan/Unraid-plexstreams/master/archive/plexstreams-2020.06.20a-x86_64-1.txz download failure (Invalid URL / Server error response)

 

Oooo, oh no, guess it would help if i pushed the packages out there.  Should be working now.

  • Like 2
Link to comment
21 minutes ago, Pducharme said:

Seems to work fine.  

 

Small request:  Can you add the full User Name of the users using the streams ?  Just a big "F" or big "S" for lets say "Frank" or "Susan" is not useful when you also have a "Sylvain" and "Frodo" user... :)

That letter is the user avatar given by Plex when the user doesnt set their own avatar.  Also if you hover over that icon, it should show the full username.

Link to comment
On 6/26/2020 at 9:22 AM, dorgan said:

New update this morning.  Streams now fully update old and new on both the dashboard and stream page.

Thanks @dorgan for the nice Plugin.

 

I stumbled upon this looking for dashboard widgets.

 

I do see an issue on the PLEX_STREAMS tab when I open the details by clicking on playing media name. Image👇

 

image.thumb.png.38f0086136cd7e9c21d2e0591268a21d.png

 

Although below this the media info is still displayed. Not sure what is needed here.

 

Also, using SSL seems a bit slower than otherwise.

 

Also, the dashboard widget text goes outside the bounds. Image 👇

 

image.thumb.png.1c1ada8683cb8ed7563dbd6fa678eb21.png

 

Cheers!

Edited by Shomil Saini
SSL/Dashboard_Text
Link to comment
13 minutes ago, Shomil Saini said:

Thanks @dorgan for the nice Plugin.

 

I stumbled upon this looking for dashboard widgets.

 

I do see an issue on the PLEX_STREAMS tab when I open the details by clicking on playing media name. Image👇

 

image.thumb.png.38f0086136cd7e9c21d2e0591268a21d.png

 

Although below this the media info is still displayed. Not sure what is needed here.

 

Also, using SSL seems a bit slower than otherwise.

 

Also, the dashboard widget text goes outside the bounds. Image 👇

 

image.thumb.png.1c1ada8683cb8ed7563dbd6fa678eb21.png

 

Cheers!

Hmmm looks like a couple different bugs.  I'll look into these this week.

  • Thanks 1
Link to comment
15 hours ago, Shomil Saini said:

Thanks @dorgan for the nice Plugin.

 

I stumbled upon this looking for dashboard widgets.

 

I do see an issue on the PLEX_STREAMS tab when I open the details by clicking on playing media name. Image👇

 

image.thumb.png.38f0086136cd7e9c21d2e0591268a21d.png

 

Although below this the media info is still displayed. Not sure what is needed here.

 

Also, using SSL seems a bit slower than otherwise.

 

Also, the dashboard widget text goes outside the bounds. Image 👇

 

image.thumb.png.1c1ada8683cb8ed7563dbd6fa678eb21.png

 

Cheers!

Warning issue should now be resolved, with version 2020.06.30b.  Also, so should the dashboard display, but let me know if not and I will down grade to previous version of unraid without translation support

Link to comment

Handy little gem!  I did notice that after a stream is finished and/or user is logged off, on the Dashboard, the section still shows the active user(s) with a playback well exceeding the length of the stream.  IE: A TV show with 43:15 runtime, the user has logged off ages ago, and the dashboard still shows as logged in, playback going on at 2:13:18 for the 45min show...

Link to comment

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.