[LINUX] xbmc server: possible quick implementation? - Printable Version
+- XBMC Community Forum (http://forum.xbmc.org)
+-- Forum: Development (/forumdisplay.php?fid=32)
+--- Forum: Development (/forumdisplay.php?fid=93)
+--- Thread: [LINUX] xbmc server: possible quick implementation? (/showthread.php?tid=114612)
- Croaker - 2011-11-17 16:06
pko66 Wrote:Hey spiff, bladesuk1, first my apologies for stepping to "explain" bladesuk1 modifications to spiff, maybe is not my place, but just trying to help...
Just want to second that as it describes my situation 100%
- ubuntu server with MySQL, transmission, tvheadend, smb-shares, ...
- office-pc with embermm (and XBMC Eden testing, so not compatible with the others)
- 2 other XBMC boxes (Dharma for now, more to come, perhaps 1 OpenElec when they reach Eden)
so when new media arrives i have to
- unpack and move to correct folders (not automated this, not XBMC stuff)
- run renamer tool (also not XBMC stuff)
- run embermm and scrape (generates NFO+images)
- go to living room or get laptop running (start XBMC)
- start library update
as my collection grows nearly every day i have to perform those steps often and as the amount of data grows, some steps take a significant amount of time (1000+ movies, 20+ series about 5 modified often)
another crappy thing is this:
- new episodes arrive, but only english NFO data available, so take this for now
- XBMC shows en
- a week later german info is available, so getting that
- XBMC needs refresh and that kills the 'latest episodes' listing as the already watched go to the top of the list
this applies to movies too.
that's exactly what i'm aiming for... - bladesuk1 - 2011-11-17 16:44
it's exactly the situation you're talking about (albeit i'm not yet sharing thumbnails, but that's on the cards when i get some time). i'm basically trying to stop all of the graphical stuff from starting up by using a command line switch. yes, it's still a full installation of xbmc, but i'd hope that the scrapers and database interaction would be able to run headless... keep your fingers crossed!
yes, it would be nicer if all i was doing was running something to populate a database (the scraper utilities and so on) without any additional code overhead, but this side of the code isn't something that can currently be run independently as it stands. also, the database structures and so on change pretty much with every revision (what are we on, db revision 57 now or something like that?), so there's no way in hell you'd want to start writing a new entirely separate codebase to interact with those database changes as then you're maintaining the same code in two places. you'd have to essentially split the database management side of things off entirely and re-architect xbmc to use that project for the media server instead for that to work. occam's razor (for me) suggests keeping the code in the same place, and basically just not running anything that isn't required to do this and only this.
my initial post isn't up-to-date any more - the git revision was different to the dharma code i was looking at, so i've tried to switch to the git codebase instead. i'm most of the way there, but last time i tried it didn't start, and now i can't get the damn thing to compile. i'm pulling from git again, and i'm going to try from there to see what i can do. i'll let you know what happens
- Croaker - 2011-11-18 13:05
well, i've got *something* working... - bladesuk1 - 2011-11-18 16:57
haven't been able to test it as i'm currently remote, but *something* is running without a gui and hasn't fallen over for a while. if anyone else is in a position to try it out and see if it does what's expected, then by all means give it a go and let me know how you get on.
apply the patch, compile, and start it with xbmc --no-test --server and see what happens, i suppose!
anyways, here's the pastebin link:
i've managed to get a little bit of testing done... - bladesuk1 - 2011-11-18 18:12
and it looks like the webserver's running along with the eventserver, and it's connecting to the database. however, the jsonrpc side of things isn't starting up at the moment according to the logs:
ERROR: JSONRPC Server: Failed to bind serversocket
of course, there's no mention of which socket it's trying to use, and i've no idea if that's configurable anyway. still, it's a start, and proves that the general idea seems to be workable. if i can get the jsorpc server to start up, that should give us the back-end server that we want to play with
i'm still getting masses of mysql server connections, mind - don't know what the hell's going on with that, but it might be a known bug:
- Montellese - 2011-11-18 18:18
bladesuk1 Wrote:ERROR: JSONRPC Server: Failed to bind serversocket
The standard TCP port used by the JSONRPC TCP server is 9090 and you can change it through advancedsettings.xml (see http://wiki.xbmc.org/index.php?title=Advancedsettings.xml#.3Cjsonrpc.3E).
But even if the JSONRPC TCP server does not start you can still access JSONRPC through HTTP (see http://wiki.xbmc.org/index.php?title=JSON_RPC#HTTP).
thanks for that... - bladesuk1 - 2011-11-18 19:17
i'd actually managed to find that out with a bit of digging and realised i already had something running on that port. bit of tweaking managed to get that sorted out and jsonrpc is now running happily, by all accounts.
the next question, of course, is whether anything actually works
so far, i've verified that i can shut it down from the web interface (using, i assume the event server) so that's looking good. i need to trigger a library update next, but i'll be configuring all of my sources to match the other xmbc instances on my network first. not too bothered about trashing that - in the absolute worst case, it can be rebuilt from the metadata stored with the media files themselves. i've plugged mediafrontpage in front of it, and that seems to be able to see and stop the server, too, although i've not had a chance to test the library side of it yet.
anyone else used the patchfile to get it working for yourself yet? or has anyone found anything more out about the broken mysql connections side of things?
- bladesuk1 - 2011-11-19 18:01
well, it actually appears to be working as expected - i've got mediafrontpage talking to this back-end server quite happily, the json-rpc side of things included.
next trick will be putting together a daemon script to stop/start it cleanly, but other than that, i'm happy. i'm struggling to get curl to call the http-rpc interface - unauthorised, apparently.
any idea how i go about submitting this for inclusion in the mainline codebase?
- gugahoi - 2011-11-21 02:43
bladesuk1 Wrote:well, it actually appears to be working as expected - i've got mediafrontpage talking to this back-end server quite happily, the json-rpc side of things included.
This is brilliant! I hope it gets implemented into the final Eden if it works as advertised! Thanks for this!
- Robotica - 2011-11-21 03:23
You can create a pull request on github for inclusion... Great No-GUI-approach to have some extra xbmc power.. And can you tell something about the impact on system resources? And given your topic title, is this Linux-only?