Posts: 74
Joined: Jun 2013
Reputation:
0
Realised something else today. The player worked fine with multiple off and on cycles today then this evening when it was turned on the settings yet again went back to default (databases stay in tact). Exited xbmc, used file manager to view the guisettings and advanced settings xml's and the guisettings seems to be the default one (or close to it) and more interestingly the advanced settings xml file no longer begins or ends with an advancedsettings tag, instead ot has reverted to just settings again.
So it seems as though the two settings files are either getting overwritten with default (or semi default) ones or they are getting reverted to previous (original) versions.
What would be doing this? And why? Would it be xbmc (surely yes?) or the media player? And howmthe heck are these files changing?
Is there any way to fix this? Surely someone has run into this rather major issue previously?
Posts: 96
Joined: Mar 2008
Reputation:
0
i dont have the box, just ordered it should be here in around 10 days, its coming from china so youll have to wait if you expect a fix from me.
My idea is the following, you change your settings however you want and when you REBOOT from within xbmc, with the power button thats on the left bottom side the script will detect that and make a copy of guisettings.xml and advancedsettings or whatever the files are and copy them to the folder where the plugin i make go.
So it does a regular copy to that folder thats of course a writeable folder.. then you have the proper settings SAVED whenever you do a PROPER REBOOT. After that this same plugin will autoboot at startup or login, that means your internal SD card should be loaded by now, because all the operating system has now booted to the point where xbmc is at startup or login so its loaded. If this doesnt work we can add a 5 second delay or 20 or whatever we need.
When the plugin loads i will make a copy to the PROPER path of the saved files, thus overwritting the newly created settings by xbmc. The settings should stick because i have a hard copy of your last settings all the time in my plugin folder, if you need to make changes you will have to make the changes and make a proper reboot and that should have you set.
i dont have the box, but this seems pretty obvious to me.
Posts: 74
Joined: Jun 2013
Reputation:
0
Yea mate that sounds perfect.
Although, one thing: If the plugin runs at startup (of XBMC) with or without a delay will XBMC not just load the stuffed up/default settings first as the app boots? And then when the plugin kicks in and overwrites (or attempts to overwrite) the settings file(s) wouldn't this crash XBMC as the file would have been/or being read?
Would the overwrite script not have to run with the boot up of the actual media player device not the XBMC app/software? So when XBMC is loaded it pulls the freshly overwritten settings files on load as the settings only seem to stuff up with random power cycles of the unit not the app/software. Running this script as the device boots (after a timer so SD card is fully loaded) and then auto booting XBMC would be sweeeeeet!
Posts: 96
Joined: Mar 2008
Reputation:
0
i dont have the device and i dont know what will happen, its all about testing, we wont know until we test it..
but we can tweak accordingly...
Posts: 74
Joined: Jun 2013
Reputation:
0
Ok. I have been reading up on scripts in Android I could make a start with a little help. I have copied the code to copy the backed up guisettings and advancedsettings files to the real XBMC locarion and overwrite whatever is in there. I believe the app Autostart can boot scripts at startup so will download that when home. Question is, could you tell me what to put in the script to autorun XBMC at completion? And is there a better way to run the script on device boot that could implement a delay to be sure sd card is fully loaded rather than using an app?
Cheers.
Posts: 830
Joined: Jan 2012
Reputation:
5
automateit can run apps on startup with a delay.
Posts: 96
Joined: Mar 2008
Reputation:
0
nzhardcore, i would prefer to have my device with me first since i dont want to write shit code thats untested.
Actually there doesnt need to be a delay, just wait for the SD to be available and the moment its available let xbmc boot.
Posts: 74
Joined: Jun 2013
Reputation:
0
Automateit doesn't work and isn't available for download..
adrianc1982 - ok that's fair enough I suppose even though I am not going to distribute it or publish it... so as long as it worked is all I would be worried about..
Anyhoo, could you tell me what code to use to get the script to only run after SD card is loaded (so the files are available to be overwritten) and by the time it has finished copying them XBMC can load straight away so what code is used to launch the app at the end of the script?
Thanks.
Posts: 96
Joined: Mar 2008
Reputation:
0
got my sample today nzhardcore, im a bit tired today and gf wants to go out to the movies, but i promise ill sit down tomorrow morning and write a few lines of code, i promise ill post the plugin just for you to install it via the addon manager. Im using a gbox midnight with statis 0.2b the linux version so im not loading the android operating system, but im going to try to fix this within xbmc.. should work on android os, or linux or whatever. Seeya tomorrow.