Jump to content
dorgan

[Plugin] Plex Streams

147 posts in this topic Last Reply

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!

Share this post


Link to post

Big update, plugin now supports multiple servers and displaying all of them at the same time.

Share this post


Link to post

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.

Share this post


Link to post
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

Share this post


Link to post
Posted (edited)
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

Share this post


Link to post
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.

Share this post


Link to post
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.

Share this post


Link to post

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.

Share this post


Link to post
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?

Share this post


Link to post
24 minutes ago, dorgan said:

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

settings

Share this post


Link to post
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 :)

Share this post


Link to post
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

Share this post


Link to post
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

Share this post


Link to post
Posted (edited)

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

Share this post


Link to post
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.

Share this post


Link to post

Pushed out a new update, so that the streams, the existing streams will get their time played, transcoding and other status updated on the fly.  I will have new streams added to the page in a future release.

Share this post


Link to post

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... :)

Share this post


Link to post
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.

Share this post


Link to post

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

Share this post


Link to post
Posted (edited)
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

Share this post


Link to post
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.

Share this post


Link to post
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

Share this post


Link to post

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

Share this post


Link to post

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.