Hellowlol / HTPC-Manager

A fully responsive interface to manage all your favorite software on your Htpc.
MIT License
344 stars 48 forks source link

Feature request: PlexPy #460

Open yeyeoke opened 8 years ago

yeyeoke commented 8 years ago

I'd like to request a feature integration of PlexPy, would be great to have it integrated in HTPC-manager and I do believe PlexPy has a working api.

Hellowlol commented 8 years ago

Ye, i know. I have played some with it:) My main problems is the css, i think plexpy looks so beautiful and i suck at css.

yeyeoke commented 8 years ago

Sadly my knowledge of CSS is worse than yours by far, that much I'm sure of.

Mosalar commented 8 years ago

I would also love to see you add this module.

JonSingleton commented 7 years ago

Wound up here trying to find this addon myself in the quest for the most magnificent pi3/mate media server manager.

I actually am rather fluent in css - I have done it for a living (among other things, unfortunately no python knowledge).

If needed I am happy to put forth some help on the css side of things. If you handle the API and throw all the necessary elements into the page (without formatting etc) I SHOULD be able to get it set up nice and tidy.

Hellowlol commented 7 years ago

I can do the python part, im just as bad with js as css do would have to do that aswell :P.

If you want i can make skeleton you can play with. What do you need?

JonSingleton commented 7 years ago

I'd imagine to most used options would be the fields from notification settings, notification setup, and monitoring settings. I can't see any reason to have anything in it that has to do with plexpys display or anything just General plexpy settings that aren't already included in the Plex module.

Myself personally I'd be fine with just the notification options etc, but anything more you feel should be available is fine too, if you do that I'd like to get it out as a full module for anyone who wants it 😀

On Friday, October 7, 2016, Hellowlol notifications@github.com wrote:

I can do the python part, im just as bad on the js :P.

If you want i can a skeleton you can play with. What do you need?

— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/Hellowlol/HTPC-Manager/issues/460#issuecomment-252262836, or mute the thread https://github.com/notifications/unsubscribe-auth/ATTHqVQhDC2dPkG2cMpqWQHZT3XX6IXDks5qxlMygaJpZM4IN-Pz .

Sent from my iPhone

Hellowlol commented 7 years ago

@JonSingleton You can play with https://github.com/Hellowlol/HTPC-Manager/tree/plexpy_sekel

It has all the same methods as plexpy api, all json response should work. it still need some work for images etc, but its a start.

JonSingleton commented 7 years ago

I'll give this a gander today or tonight. Fast work, were you working on this already?

On Saturday, October 8, 2016, Hellowlol notifications@github.com wrote:

@JonSingleton https://github.com/JonSingleton You can play with https://github.com/Hellowlol/HTPC-Manager/tree/plexpy_sekel

It has all the same methods as plexpy api, all json response should work. it still need some work for images etc, but its a start.

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/Hellowlol/HTPC-Manager/issues/460#issuecomment-252422034, or mute the thread https://github.com/notifications/unsubscribe-auth/ATTHqU9sz-ymf6r1YTsP3dDzpTeaxgckks5qx4yBgaJpZM4IN-Pz .

Sent from my iPhone

Hellowlol commented 7 years ago

No, I just made it since you showed interest. The modules has a lot in common so it's fast to add the Python part.

The endpoints correspond to plexpy API. So if you want the plexpy log you can:

Host:port/plexpy/get_logs?param=value1&param2=value2

WzL commented 7 years ago

Is there some progress here? Can i help with some testing?

JonSingleton commented 7 years ago

I've been unable to review or test in any way. Busy season at work, and being hourly makes for a fantastic paycheck. You should just be able to test that branch.

On Thursday, November 3, 2016, WzL notifications@github.com wrote:

Is there some progress here? Can i help with some testing?

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/Hellowlol/HTPC-Manager/issues/460#issuecomment-258174821, or mute the thread https://github.com/notifications/unsubscribe-auth/ATTHqc0zVfdOLsQf0Rp7m51Jm6d0n0pLks5q6fxwgaJpZM4IN-Pz .

Sent from my iPhone

Hellowlol commented 7 years ago

There is no progress. The entire front end is missing. The backend need to be secured but the branch was just to get the ball rolling

blackley commented 7 years ago

I can help with the css

Hellowlol commented 7 years ago

Awesome, i still have to do the html and the js, i dont wasnt to do that :P. The branch supports everything that plexpy supports

Hellowlol commented 7 years ago

https://github.com/Hellowlol/HTPC-Manager/issues/513

Hellowlol commented 7 years ago

https://github.com/Hellowlol/HTPC-Manager/issues/350

strikerjjb commented 7 years ago

When switching to this branch and trying to run Htpc.py multiple errors appear. Pulled it down so I could look at the HTML and CSS front end.

Traceback (most recent call last): File "Htpc.py", line 264, in <module> main() File "Htpc.py", line 249, in main load_modules() File "Htpc.py", line 111, in load_modules htpc.ROOT.plexpy = Plexpy() File "C:\Users\jbart\HTPC-Manager\modules\plexpy.py", line 35, in __init__ self._build_methods() File "C:\Users\jbart\HTPC-Manager\modules\plexpy.py", line 66, in _build_methods r = cls._fetch(**{'cmd': 'docs'}) File "C:\Users\jbart\HTPC-Manager\modules\plexpy.py", line 95, in _fetch r = requests.get(url) File "C:\Users\jbart\HTPC-Manager\libs\requests\api.py", line 69, in get return request('get', url, params=params, **kwargs) File "C:\Users\jbart\HTPC-Manager\libs\requests\api.py", line 50, in request response = session.request(method=method, url=url, **kwargs) File "C:\Users\jbart\HTPC-Manager\libs\requests\sessions.py", line 451, in request prep = self.prepare_request(req) File "C:\Users\jbart\HTPC-Manager\libs\requests\sessions.py", line 382, in prepare_request hooks=merge_hooks(request.hooks, self.hooks), File "C:\Users\jbart\HTPC-Manager\libs\requests\models.py", line 304, in prepare self.prepare_url(url, params) File "C:\Users\jbart\HTPC-Manager\libs\requests\models.py", line 365, in prepare_url raise InvalidURL("Invalid URL %r: No host supplied" % url) requests.exceptions.InvalidURL: Invalid URL u'http://:/api/v2?apikey=&cmd=docs': No host supplied

Hellowlol commented 7 years ago

You need to enter plexpy API credentials on the settings page. There is no HTML or CSS. It's only backend code.

strikerjjb commented 7 years ago

That would make sense but Htpc.py won't even complete build/run to allow a user to get to the front end to change it as the web server never initiates given the errors.

Hellowlol commented 7 years ago

Ok. It's a easy fix but I don't have time now. I'll ping you once it's done.

strikerjjb commented 7 years ago

All I started working on this and I was wondering what do people want to see on a plex py page? Right now a simple start I have is this: image

Hellowlol commented 7 years ago

I guess graphs/stats dunno. Nice start!

blackley commented 7 years ago

I would like to see details from the History page most importantly and details from the plexpy home page

strikerjjb commented 7 years ago

Alright I have the main javascript coded in for the poster view pretty much done. I will probably make a tabbed view and lay in a section each for history and collection stats. image

Example of Tabbed View: image

Hellowlol commented 7 years ago

Nice!

strikerjjb commented 7 years ago

@blackley Can you look at my last post and does the watch stats cover what you meant by plexpy homepage? History is next then I will talk to Hellowlol about getting this branch updated for folks to test.

strikerjjb commented 7 years ago

@Hellowlol I am getting close on this how do you want me to submit the code given this is a separate branch?

Hellowlol commented 7 years ago

just open a pr for the same branch ill take it from there.

mauirixxx commented 7 years ago

I don't have anything to add other than I'm very excited for this - I originally logged in to post a feature request for PlexPy to at least show "what's playing" - it looks like we'll have more then that!

Awesome! :D

Hellowlol commented 7 years ago

You know the plex module already has a what playing?

mauirixxx commented 7 years ago

i see now that it shows up in the Plex module automatically..

What I was hoping was to see was an option for the dashboard to see what's playing as well, either via PlexPy or Plex itself.

strikerjjb commented 7 years ago

@mauirixxx @Hellowlol I need to finish this first but then I could look at building something for the dash that could be similar to the first tab but modified for a dash.

strikerjjb commented 7 years ago

Alright have the table building with Sort and Search working: image

mauirixxx commented 7 years ago

that is awesome! I look forward to using your hard work :P

strikerjjb commented 7 years ago

All this has been merged into the plexpy branch. Change your branch and test if you have a chance. Open to feedback.

Hellowlol commented 7 years ago

Please dont use the plexpy branch. It isnt secure. It was just something i wipped together so somebody could start hacking on the boring parts.

I just update htpc manger and you will have access to the module in the master2 branch.

Hellowlol commented 7 years ago

Big thanks to @strikerjjb for putting this together!

mauirixxx commented 7 years ago

I just updated, working perfectly, thanks again @strikerjjb and @Hellowlol !

@Hellowlol would it be possible to add a PlexPy setting to the "dashboard" called "Show PlexPy Activity" (or something worded better) pulling data from the "get_activity" API command?

Should I do a new "Add PlexPy to dashboard" feature request, since adding PlexPy to HTPC-Manager is now a completed (time to close it?) feature request?

Again, thank yous are owed to both you guys :D

Hellowlol commented 7 years ago

The are a couple of reasons i havnt added any "live" data on the dashboard.

  1. Cherrypy isnt async
  2. Since it isnt async its easy to lockup the ui. Especially if you have wrong settings in your module.

So to prevent that the dash module would have to pull x time and stop after y failures.

Ideally htpc manager should be rewritten using a async frame work and drop support for anything bellow 3.5. But i cant bare to redo the ui :D

mauirixxx commented 7 years ago

understood.

thanks again though for your work :)

strikerjjb commented 7 years ago

@Hellowlol Lets talk about backend vs. frontend. I think now that this is in master2 we could talk about a new project. You thinking tornado? I am thinking Core UI or something similar

Hellowlol commented 7 years ago

Dunno what to use yet. If this where to be a new project i would drop python 2. I was thinking about sanic or pulsar. Core ui is nice, i give it a star today since it thought it looked awesome. To bad i cant do javascript.