Plextras.js icon indicating copy to clipboard operation
Plextras.js copied to clipboard

self hosted auto update

Open leram84 opened this issue 7 years ago • 5 comments

I just saw that new auto update feature! That looks awesome! I would love to host my own fork on my domain so i can auto update with my own settings. Would it be difficult to add a quick guide to the process?

The main reason im asking about this, is because i just updated plex to latest public release, and I can't seem to get plextras running again. I'm getting "failed to load resource" with a 404 (not found) status in console. If you have any idea what is causing this, i would appreciate the help, but i mainly would like to get a simple auto upgrade system in place so this isn't an issue everytime plex updates.

Thanks again!

leram84 avatar Apr 05 '17 17:04 leram84

Hiya - I whipped up this (been meaning to do it for a while)

It lets you set your own 'default values' gives you a parameterized URL which you can use in place of the default plextras one

I've updated the readme with a quick guide on how to use, enjoy!

http://andrewiankidd.co.uk/ext/mimefix/

andrewiankidd avatar Apr 05 '17 18:04 andrewiankidd

PS if you still get 404 post some screenshots (or email me!) and ill help

andrewiankidd avatar Apr 05 '17 18:04 andrewiankidd

Hey! Sorry for the late reply. I've been using startssl for my certs and they just went under so i've been scrambling to get my shit back online :/

Anyway.... ummm.... WOW! This is... AMAZING! Yeah, ok, i don't need the fork anymore lol, you've covered all my bases! A few things though:

  1. You left my imgur url in there hahaha.... somehow i doubt anyone else will want that shitty wallpaper :) But actually that brings me to 2

  2. If you are going to leave showCustomBackgroundImage in (which i think a lot of people would love) I would suggest getting rid of repeat-xy and make it stretch to fit entire screen (without distorting the ratio) and add an input field for the url in the gui (or even better: enable saving to a local directory... no need to post these online). But make sure cssBGColor is persistent so it shows behind semi transparent pngs. (personally i would stretch my logo over the entire bg and have my custom color behind it)

  3. ~~I'm not sure why, I've been combing through the .js and comparing it with mine, but for some reason in this new version, cssBGColor doesn't work when i set showCustomBackgroundImage to false... or maybe it doesn't work if set to true either, but the image was opaque so i can't tell the color of the background behind it.~~ EDIT: Ignore this... SORRY lol, it was totally working. I forgot i changed my color to the same grey you were using lol.

  4. I would suggest enabling setting customHeader to false in the gui. Its easy enough to comment those lines out (16, 17, and 150-196) but for people using the gui i would imagine many wouldn't know how.

  5. Auto Login is.... AWESOME! Really cool that that's even possible w js. Do you use Organizr? I'm wondering if there would be a way to add that code to that project so that users could log into org and have auth passed to plex. Probably outside the scope here, but just thought that would be something really cool to look into.

  6. Any reason you didn't leave the TopBarColor in there? It worked, and it was pretty cool!

  7. Thank for the offer to help. I just figured out my stupidity lol. I l didn't realize script src was (moved to?) /js lol, i had it in /resources (told you... ima noob lol) ... but that brings me to 8

  8. Storing the js in the cloud is great for updates (though I'll probably end up moving mine to c:/plextras if that is possible? (just for peice of mind about exposing sensitive info)) but what about index.html? Won't that still need to be manually adjusted after every update? I doubt there's an easy fix here, but just thought id throw it out there in case there is some way to inject that line automatically (im on win10 if that matters)

  9. Ok, and the last thing. I wasn't going to ask you this, but you seem interested in updating this project, so just a thought for another feature: The main reason im so obsessed with this to begin with was to make mobile more usable. The slimmed down sidebar is perfect and makes the homepage legible for the first time. This would probably be much more complicated, but it would be really cool if some similar adjustments could be made throughout the interface. While everything is now useable (i can locate/play whatever i need) the detail views are still useless for everything except clicking the thumb to begin playback (which is totally fine as is! But) this js could potentially make the entire app work like the appstore apps with some css/adjustments. I don't want to encourage people to use this on mobile as a way to avoid the appstore fee, but Its not a good enough reason to cripple the web app on mobile just to push people over to the appstore app. So i think something like this is still a good idea.... Like i said, Pie in the sky... just thought it was a cool idea to share.

Anyway, thanks again for all the handholding. It was really cool to see how git works from the other side... Even if you did make my fork completely irrelevant :-P Let me know if you need any more info/testing from me.

Later!

leram84 avatar Apr 07 '17 20:04 leram84

Hey!

1&2. I'll be adding options for more background stuff, I'm swamped with other crap just now but adding in the GUI seemed like it was worth the time investment cos a lot of folk were messaging me asking about changing default settings

  1. Can do

  2. I saw someone on reddit ask about it, for organizr I think - I don't use it personally but it seemed like a simple solution. Integration would most likely be possible but would require changes on organizr + plextras

6, I completely forgot to add it in, probably will when I do the bg changes.

  1. It doesn't matter where the file is really :) just so long as the browser has access to it, it can probably be anywhere in the web folder

  2. You can store it locally just fine, just use the GUI to generate and then you've got your custom source ready to go, just save it to plextras.js, or use the default one on github as always. For the index.html updates, would probably require someone writing a script to auto-inject the script - I don't update my PMS very often as it's always under use so it's not much of a problem for me

  3. added 'biggerThumbnailsOnMobile' - https://i.imgur.com/7pFmaVU.png

andrewiankidd avatar Apr 08 '17 11:04 andrewiankidd

Awesome!!

Ok so:

It doesn't matter where the file is really :) just so long as the browser has access to it, it can probably be anywhere in the web folder

I definitely want to move it out of /resources since that folder gets overwritten on plex update, but it doesn't seem to be working the way i thought it would. I tried <script src="C:\nginx-1.11.5\html\js\Plextras.js"></script> But no joy.

added 'biggerThumbnailsOnMobile' - https://i.imgur.com/7pFmaVU.png

Incredible!! That is perfect! bigger thumbs is great... but its the vertical alignment that will make the view actually work. I really want to test that out in org, since org is running iframes, it sets the zoom level based on the top bar of the app, not of whatever is being iframed. the result is that plex starts off zoomed in much more than if u opened it on its own in a browser. I'm pretty sure this setup will work perfectly... and might even end up looking a little better than in your SS!

And after playing around with this heavily now, there is only one other feature request that i have, but i think its kind of important, so didn't want to leave it out. I forked plexbgartwork to increase the opacity, and it looks GLORIOUS :) the only problem i realized while testing is that plex is set to "hide artwork" by default! I don't know why that button even exists!! why would anyone ever turn off artwork in plex?? Anyway, im wondering if there would be a way to set it to "show artwork" by default... or even force-show, and remove the button altogether? Don't want to have to explain how to turn it on w every new setup... poor user experience.

And that's it... i swear im done now! :) :) :)

leram84 avatar Apr 08 '17 16:04 leram84