Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feature : mysql XBMC #212

Closed
an0Nym0us63 opened this issue Sep 10, 2012 · 30 comments
Closed

Feature : mysql XBMC #212

an0Nym0us63 opened this issue Sep 10, 2012 · 30 comments

Comments

@an0Nym0us63
Copy link

Is there a way of having maraschino sync with a mysql database (for recentlya added views) as my PC with xbmc isnt always on but my nas with mysql database is always on.

It would be great as we have a package for installing maraschino on synology nas

@mrkipling
Copy link
Owner

I'm afraid not, at least not currently. Maraschino makes calls to the XBMC API which gives it information about the library, regardless of whether the library uses the default local database or an external MySQL database. Unfortunately this requires XBMC to be running.

@an0Nym0us63
Copy link
Author

this could be a great feature as i think a lot of people installed maraschino on synology nas and use a mysql database.

Or maybe i can make my plex (on my nas) sync with mysql databse and then tell maraschino to have information from plex (as i saw a pull request foir plex support)

The question is can i make plex sync with mysql ??

But i think the feature could be great

@mrkipling
Copy link
Owner

I'm certainly open to the idea - I can see how it would be useful to some!

Not sure about Plex and MySQL I'm afraid (as I don't use it).

@an0Nym0us63
Copy link
Author

youre right i just checked the databases doesn't have the same structure for plex and xbmc.

ONly solution : ' Hope you could do something directly on a mysql database and some sql querys to gain all those information"

As i love maraschino but have no use of library informations as everithing for me is on my nas (headphones, transmission, couch, sab sickbeard) and i only put on my home media computer when i want to watch something)

Thanks for your replies

@N3MIS15
Copy link
Collaborator

N3MIS15 commented Sep 13, 2012

Ive been wanting to show the 'last known' recently added for when the server is unreachable. But i never got around to it because I run a shared-lib server on my ubuntu server now, so my database is always accessable via json api..

Would 'last known' be helpful to you?

@mrkipling
Copy link
Owner

N3MIS15, that's a pretty good idea. Are you suggesting:

  • Using the XBMC API by default
  • Storing the 25 most recent episodes and 25 most recent movies in Maraschino's database when we've successfully retrieved the data from the API
  • Only ever using the information in the database if we can't connect to the XBMC API (so, try: connect to xbmc; except: get info from database instead, i.e. the last known info)

This could work, and be very handy! We'd also probably want to add a "not_connected_to_xbmc" class to the body or something so that we can disable click-to-play on the recently added modules.

@N3MIS15
Copy link
Collaborator

N3MIS15 commented Sep 13, 2012

Yep, thats exactly what I'm suggesting :)

@mrkipling
Copy link
Owner

+1, let's do this!

@an0Nym0us63
Copy link
Author

I think it could à quite great alternative way

Cordialement

Le 13 sept. 2012 à 11:49, David Gray notifications@github.com a écrit :

Yep, thats exactly what I'm suggesting :)


Reply to this email directly or view it on GitHub.

@an0Nym0us63
Copy link
Author

i saw a commit, is this implemented (i saw in the code that it is related to this), i will test tonight

@mrkipling
Copy link
Owner

If you're referring to a1cc533 then I don't think that is related to this feature.

@an0Nym0us63
Copy link
Author

it seems like the beginning of that ??

This idea is great and will be cool. As even if xbmc is shut down maraschnino will keep showing last known recently episodes and movies and so on

Is marashino working good with couchpotato v2?

@mrkipling
Copy link
Owner

I doubt it, as it wouldn't have been committed to master (new features are created on a separate branch and merged in once tested). Anyway, I've asked what that commit is, as I'm not sure myself :)

@mrkipling
Copy link
Owner

Ahhh I remember what this is - it's the ability to select which XBMC server a module should be querying. So your recently added episodes module could display stuff from your living room HTPC and your recently added movies module could display stuff from your bedroom HTPC. At least I think so.

@an0Nym0us63
Copy link
Author

ah ok i understand .

Is there any idea on when this could be available for test ?

@mrkipling
Copy link
Owner

This feature? No idea I'm afraid, it's currently just an idea that is being discussed. It's a good idea though so I'm sure that somebody will implement it in due course!

@abrenoch
Copy link

I was thinking of this issue and had a thought.. Perhaps this would be better handled by a separate python script (running on the mysql machine) that uses xbmc's credentials to access the mysql library, and is capable of returning that library data when it is called from a program such as marashino..

Using something like that in combination with N3MIS15's module tweaks seems like it could accomplish this fairly well, not to mention any other projects that could run into this issue..

But then again that could be a taller order than I realize.. just a suggestion though!

@mrkipling
Copy link
Owner

@abrenoch Not sure that I fully understand, sorry. Would the Python script that you are proposing basically be replicating the XBMC API? Again, I may have totally misunderstood what you mean, sorry!

@N3MIS15
Copy link
Collaborator

N3MIS15 commented Sep 14, 2012

http://forum.xbmc.org/showthread.php?tid=132919

@abrenoch read up on that forum post. I run a headless XBMC server that has access to my mysql db 24/7. It also supports json, so i can update the database from other apps like Maraschino or sickbeard.

@N3MIS15
Copy link
Collaborator

N3MIS15 commented Sep 14, 2012

BTW, i also have the last known working for recently added episodes on a local install. it pull the last know information for the current server from the database. The only thing i don't have working yet is caching the images for offline use (but i have done this before so it shouldn't be a big deal).

Once i get the images sorted, its just a case of porting it over to movies and albums and i will sent over a PR.

@abrenoch
Copy link

@mrkipling Yup! That is more or less what I was eluded to, although not worded so well (I should probably go to bed lol)

@N3MIS15 my goodness, this certainly seems to be more or less exactly what I was thinking of! I'll have to look into this..

@mrkipling
Copy link
Owner

@abrenoch I'm not sure that recreating XBMC's API ourselves is the best idea... it's a pretty gargantuan task as it, plus it's constantly being changed. I don't think that it's very feasible unfortunately (although I would LOVE it if somebody could prove me wrong!)

Simply recording the most recently received data in Maraschino's database and falling back onto it if XBMC isn't reachable is reasonably trivial though, and would do a great job at providing (most?) of the functionality that is being asked for...

@an0Nym0us63
Copy link
Author

effectively, the greatest idea would be to have a kind of api wich could read the db fils even if xbmc is off.

but effectively the simpliest way could be having store the 25 last episodes, 25 last movies and 25 last albums, with their thumbnails.

So that when it can reach xbmc server it updates that.

And if it can't reach xbmc server it will show the last know (cache)

With this maraschino will always show something even if xbmc server is off

@N3MIS15
Copy link
Collaborator

N3MIS15 commented Sep 15, 2012

PR #215

@an0Nym0us63
Copy link
Author

yeah great i will test that very soon

@an0Nym0us63
Copy link
Author

i just tested the last commit and yes it seems to work but for me the text :" there was a problem ......... last known resulst" is to much. How about just a simple indicator (such as a red cross or simply "*"so that it doesn't take too much space?

@an0Nym0us63
Copy link
Author

and something strange when connected to xbmc i have no images ofr albums, episodes and movies, but when offline they appear

@N3MIS15
Copy link
Collaborator

N3MIS15 commented Sep 19, 2012

the image problem "should" be fixed now. The reason i went for the text was to let user not in the know whats going on. I suppose a more simple indicator could be just as useful. Maybe some sort of offline symbol or something.

@mrkipling
Copy link
Owner

+1 for a symbol... perhaps the descriptive text explaining the situation
could go into a title tag or something?

@an0Nym0us63
Copy link
Author

yes +1 for the symbol becasue as i have the three recently in maraschino it actually takes muche space.

But a little symbol next to the title could be great : such as (Recently added movies X (red cross or somethink))

And just anotrher question maybe to avoid creating an issue.

Is this normal that for added movies all poster thumbs are truncated ?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants