jansmolders86 / mediacenterjs

A HTML/CSS/Javascript (NodeJS) based Media center
http://mediacenterjs.com
1.29k stars 243 forks source link

Should the new Google Music app be packaged with MCJS or remain a separate plugin? #165

Closed jansmolders86 closed 9 years ago

jansmolders86 commented 9 years ago

Seeing as I'm almost done with the Google Music app I'm wondering if I should pack it in with MCJS like YouTube or keep it a separate plugin?

What do you guys think?

Jon889 commented 9 years ago

I'd prefer adding it to the Music app. But as a separate app I think it should be a plugin as not everyone has Google Music but everyone has a hard drive and most people have music on them.

Also I think there should be a more general way of adding settings for apps. Perhaps have each app have it's own settings? Or define the settings in each app and then include them in the main settings app

jansmolders86 commented 9 years ago

I'd rather have that as well but I'm not sure how to go about it yet. I like the iOS approach of having all the settings in one place.

Jon889 commented 9 years ago

I hacked together a concept on the Netflix branch for combining sources into one app. Yes the settings all in one place is nice, but as far as I know someone can't make an app, and add settings without modifying the main MCJS code/repo?

th3l0g4n commented 9 years ago

I would ship it as a separate App, keeping the core of the MediaCenter is slim as possible. You guys put already much effort in providing an AppMarket, why not using that.

Regarding the settings aspect. It should be possible that each app is exposing some kind of "setting interface", meaning that whenever the user is opening the settings page of MCJS, the core is visiting all installed apps collecting setting information that the app supports. These information then can be displayed on the settings page in different app sections. I think CouchPotatoServer must be using this approach as it supports various plugins but the settings are all available in one place.

@Jon889 I have seen that Netflix is exposing an API: http://developer.netflix.com/docs/REST_API_Conventions#0_pgfId-1022614. Didn't take a closer look but it might help developing the app.

TheBenji commented 9 years ago

Doesn't the netflix API shuts down on Nov 14th? http://developer.netflix.com/blog/read/Retiring_the_Netflix_Public_API

th3l0g4n commented 9 years ago

You are perfectly right. I missed that info :/ Thanks for pointing that out.

Jon889 commented 9 years ago

When I say adding it into the existing apps I still mean distributing them separately, just instead of the app appearing in the home screen it appears inline inside the relevant core app

th3l0g4n commented 9 years ago

Well ok, that sounds perfectly reasonable. But i can image that this would add another level of complexity to the app management and also development process. Imagine someone wants to add Spotify, LastFM or simply Internet Radio as a provider. Dealing with these as individual Apps seems to fit more into the current MCJS implementation.

Jon889 commented 9 years ago

Yeah, it's just an idea it just seems like every media centre/OS seems to go down the app route, I don't know about you but when I (and some of my friends I've asked) want to watch a film or listen to music where it comes from isn't as important as how much it costs and to some extent how good quality it is.

The way I was seeing it was that the UI would be handled by MCJS and there'd just be a common protocol for providing the data for the media items. So because the UI would be handled by the core app then it would be less work for the person making the provider. Actually quite similar to how you describe having a common interface for settings.

th3l0g4n commented 9 years ago

That sounds really good. I would sign the approach in consuming media nowadays. It isn't really about the fact "Which movies/music/... is available" but more "What do i want to watch/listen to". No matter where it comes from, as you already said.

I can imagine that there is some kind of "Watchlist" feature implemented where you can save things you want to see in the future. And if you provide a local folder for e.g. movies, MCJS will tell you: "Hey man you wanna see that? You already have it!" or something like that. Same could be possible with some kind of global searchbar, where you can search for terms and the installed plugins will provide suitable results, either local or remote (i think this already exists as ticket).

Either way, i would be happy to contribute to the project in some way if time permits it.

jansmolders86 commented 9 years ago

This is a really great out of the box way of approaching it! I really love it!

The only worry I have is the stability and speed of the various services seeing as some are painfully slow, or have wonky API's which might have a cascading effect on the entire system. The other interesting bit is like @th3l0g4n said a way to visualize this border-less providing of content.

Nevertheless I would love to explore this idea further! Any thoughts on how to handle the issues I addressed?

Again guys, I love the enthusiasm and forward thinking! Really great!

Jon889 commented 9 years ago

The way I thought of getting around the slower APIs etc would be to cache the the results in the database, for example the My List on Netflix would be stored in the database along side local movies. However this means that sources would have to conform to the database scheme and some sources may have information unique to that source that they want/need to store. So each source could have it's own database, or just store additional data in its own database linking to the items in the main database by id.

However this would be work. So i think a more ideal solution would be just for each source to provide data as if everything is live and have one caching system implemented by MCJS. As in the app will ask each source for its items and the cache system will return the results that were returned the last time and then there will be a second callback with the lastest/live results

jansmolders86 commented 9 years ago

That sounds like a great solution Jon! So, would you completely abandon the current setup? Or offer this as an alternative?

th3l0g4n commented 9 years ago

It would be quite sad to completely replace the current system as so much effort was already put into it.

How about this approach: There exist several types of plugins: the ones providing a visual frontend to the user (which is the current behaviour) and the ones operating in the background, adding functionality to the former. So when for example a music seach is being performed, the music plugin captures this request and forwards it to all "internal" plugins which in return provide their information regarding that request. This could be achieved by introducing a special event system. Plugins could listen to events fired by other plugins or even the mcjs-core to provide usefull information, actually pretty much it is done in the express framework.

I could play around and produce a prototype to see how this would work.

jansmolders86 commented 9 years ago

I just merged a branch allowing plugins to "inject" their settings to the settings panel via a simple JSON.

I've added documentation for it here: https://github.com/jansmolders86/mediacenterjs/wiki/Developer-manual:-app-framework#settings

jansmolders86 commented 9 years ago

@th3l0g4n Go for it :) I would love to see a prototype!