Kodi Community Forum
Solved allow to override HOME / XBMC_HOME ? - Printable Version

Kodi Community Forum (https://forum.kodi.tv)
+-- Forum: Development (https://forum.kodi.tv/forumdisplay.php?fid=32)
+--- Forum: Feature Discussion (read-only) (https://forum.kodi.tv/forumdisplay.php?fid=183)
--- Thread: Solved allow to override HOME / XBMC_HOME ? (/showthread.php?tid=183332)



allow to override HOME / XBMC_HOME ? - Koying - 2014-01-14

I see requests popping up to allow relocating the XBMC_HOME on Android, from the default and uneditable "external storage" as returned by android.

Seems a legit request to me, especially for devices having only a lump nand pseudo-sdcard which might fill up very fast with xbmc.

What's your thoughts on an advancedsetting (or plain setting, but that will probably be problematic) for this?

[EDIT]
I was speaking about HOME, really, i.e. userdata, but it's valid for XBMC_HOME, too, i.e. system data, which takes a solid amount of nand off /data from other apps.


RE: allow to override XBMC_HOME ? - Ned Scott - 2014-01-14

I like it. It's very easy to fill up 4 or even 8 GB of internal space with thumbnails of a large library.


RE: allow to override XBMC_HOME ? - Koying - 2014-01-14

advancedsetting is probably not a bright idea, because we read it from XBMC_HOME Wink
But we can find another way.

[EDIT]
A property file in a pre-defined location might do.


RE: allow to override XBMC_HOME ? - Montellese - 2014-01-14

My initial version of the android main implementation checked if there was an external storage available and automatically set XBMC_HOME to that. My reasons where the space being used and that files on an external SD are mostly easier accessible than those in the builtin flash (due to access restrictions etc).
Someome (maybe TheUni, I don't remember) removed that logic completely. I also don't remember the reason for sure but I think it was something about performance.

I'm not sure if this will work with either an advancedsetting or a plain setting as you first need to be able to find the advancedsettings.xml or guisettings.xml in the path pointed to by XBMC_HOME before being able to read its content. After that it's too late to change XBMC_HOME (AFAICT) unless you add some hack to kill the current application class and create a new one with a new XBMC_HOME.

EDIT: Hehe koying you realized it yourself in the meantime.


RE: allow to override XBMC_HOME ? - Koying - 2014-01-14

The idea would be to keep the default as it is, as I'm sure it fits the majority, but to give a "backdoor" for cases where using the nand is an hindrance.
As Ned points out, our home can easily become quite large.


RE: allow to override HOME / XBMC_HOME ? - Memphiz - 2014-01-14

We do somthing similar on sandboxed ios - for accessing the home via itunes ...

https://github.com/xbmc/xbmc/commit/459941386d6b559a8a92dd21afbc7de40706fed5

Can we detect somehow if a place is editable or not and then decide on our own for android (similar to what i do on ios there?)


RE: allow to override HOME / XBMC_HOME ? - Koying - 2014-01-23

See 4076 (PR)
Apparently, something similar exists on Pivos, which rings a distant bell Wink : http://forum.xbmc.org/showthread.php?tid=184221


RE: allow to override HOME / XBMC_HOME ? - davilla - 2014-01-23

(2014-01-23, 15:02)Koying Wrote: See 4076 (PR)
Apparently, something similar exists on Pivos, which rings a distant bell Wink : http://forum.xbmc.org/showthread.php?tid=184221

Pivos/Linux only and this is setup by the Linux side on boot with no code mods in XBMC itself.