Kodi Community Forum

Full Version: Having Issues Redirecting Thumbnails to SD Card
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Hey Guys -

I'm trying to get XBMC/Kodi set up on my Nvidia Shield Tablet. The tablet runs KitKat, has 16gb of internal storage, plus I have added a 64gb microSD card to it. I've tried probably 15 different iterations of advancedsettings.xml, but simply can't get it to work! Below are the details for what I've tried. First, though, a few specs about the device:

Device Specs
- Nvidia Shield Tablet
- Android Version: 4.4.2
- Build Number: KOT49H.24526_447.6867
- Path to userdata: "/storage/emulated/0/Android/data/org.xbmc.xbmc/files/.xbmc/userdata
- Path to Target Folder I Created on SD Card: "/storage/sdcard1/xmbc" (Empty)

What I've Tried
I created an "advancedsettings.xml" file in the userdata folder (alongside the other primary xml files.) When I've said I've tried different things, I mean that I've edited the file in different ways to try to get it to work. Each time I try something new, I force close XBMC, reopen it, add a new source, and check to see if it's writing files in the new target folder on the SD Card.

I know that XBMC is seeing "advancedsettings.xml" as it's log file (attached) shows the redirection at the beginning.

Below are the last two I've tried without luck...
#1 - I created the folders for the <to> path beforehand. When I add a new source, the thumbnails are grabbed and shown in XBMC, but the target folder I designated below is empty.
Code:
<advancedsettings>
<pathsubstitution>
  <substitute>
    <from>special://masterprofile/Thumbnails</from>
    <to>/storage/sdcard1/.xbmc/userdata/Thumbnails</to>
  </substitute>
</pathsubstitution>
</advancedsettings>

#2 - Same as above, but I read to remove the Substitute tags as there's a bug. Same results
Code:
<advancedsettings>
<pathsubstitution>
    <from>special://masterprofile/Thumbnails</from>
    <to>/storage/sdcard1/.xbmc/userdata/Thumbnails</to>
</pathsubstitution>
</advancedsettings>

When running the last one above, the log said it loaded, but no go. Below's a snippet of the full log which may be downloaded here.
Code:
No settings file to load (special://xbmc/system/advancedsettings.xml)
Loaded settings file from special://profile/advancedsettings.xml
Contents of special://profile/advancedsettings.xml are...
                                            <advancedsettings>
                                              <pathsubstitution>
                                                <from>special://masterprofile/Thumbnails</from>
                                                <to>/storage/sdcard1/.xbmc/userdata/Thubnails</to>
                                              </pathsubstitution>
                                            </advancedsettings>
DEBUG: Configuring path substitutions

#3 - Different Source Path
I've also tried using "/storage/emulated/0/Android/data/org.xbmc.xbmc/.xbmc/files/userdata" instead of "special://masterprofile/" - Same results Sad

One more quick question...
While researching this, I've found many who redirect the Thumbnails to an SMB share over the network. My library is huge and I know it would take a lot of space. Am I right to assume that using the SD card will still be much faster than a share - even if using N over 5Ghz? Know if you can browse and use XBMC while thumbnails are loading or must you wait for all to load first?

Thanks Guys!
Code:
<advancedsettings>
    <pathsubstitution>
        <substitute>
            <from>/storage/emulated/0/Android/data/org.xbmc.xbmc/files/.xbmc/userdata/Thumbnails/</from>
            <to>/storage/external_storage/sdcard1/xbmc/Thumbnails/</to>
        </substitute>
    </pathsubstitution>
</advancedsettings>

Make sure to manually create the /storage/external_storage/sdcard1/xbmc/Thumbnails/ directory first.
i am having a very difficult time trying to substitute a path for the video cache. like bzowk ive read wiki a few times to say the least and combed over many threads.

is there a way to check if the path subs im using are correct? i am under the understanding the cashe folders and files are hidden. how would i see them on my external drive. the only success i have had is path substitutions for my userdata/database/ which changes the path of my "myvideo91" and "mymusic48" file.

here is a copy of my advancedsettings.xml and the code i have tried to use to get to work.

<advancedsettings>
<pathsubstitution>

<substitute>
<from>/sdcard/Android/data/org.xbmc.kodi/files/.kodi/temp/</from>
<to>/mnt/storage/emulated/legacy/external_storage/sda1/kodi_cache/</to>
</substitute>

<substitute>
<from>/sdcard/Android/data/org.xbmc.kodi/files/.kodi/userdata/Thumbnails</from>
<to>/mnt/storage/emulated/legacy/external_storage/sda1/kodi_thumbs/</to>
</substitute>

<substitute>
<from>/sdcard/Android/data/org.xbmc.kodi/files/.kodi/userdata/Database</from>
<to>/mnt/storage/emulated/legacy/external_storage/sda1/kodi_temp/</to>
</substitute>
</pathsubstitution>

<network>
<buffermode>1</buffermode>
<cachemembuffersize>0</cachemembuffersize>
<readbufferfactor>2.0</readbufferfactor>
</network>

</advancedsettings>


i appreciate any and all help. my objective would be to successfully cache all of my video to an external drive to with help with buffering. i am using a set top box with a depleted amount of local space.


one other item i have noticed is many people use "Thumbnails", i was under the understanding all code was to be in lowercase?


thank you
I've been asked to add this to the wiki, and I haven't had the chance to do so yet, but this will work for Kodi v14: https://github.com/koying/SPMC/wiki/How-...MC-data%3F
thank you ned, i appreciate your time and help.

based on the information and instruction i have created this. (i have reverted back to testing with gotham, hence the xbmc)

xbmc_env.properties (containing)

xbmc.data=</storage/emulated/0/external_storage/xbmc_data/>
xbmc.waitnetwork=yes

and placed it the root of my external drive


and made adjustments to my advancedsettings.xml


<advancedsettings>
<network>
<buffermode>1</buffermode>
<cachemembuffersize>0</cachemembuffersize>
<readbufferfactor>2.0</readbufferfactor>
</network>
<pathsubstitution>
<substitute>
<from>/sdcard/Android/data/org.xbmc.xbmc/files/.xbmc/temp/</from
<to>/mnt/storage/emulated/0/external_storage/sda1/xbmc_data/</to>
</substitute>
</pathsubstitution>
</advancedsettings>

am i on the right track in trying to change the path of
<cachemembuffersize>0</cachemembuffersize> ((now being stored to my local disk))
to
external_storage/sda1/xbmc_data/


hopefuly



thank you
Remove the pathsubs part of advancedsettings.xml. You won't need it if you use xbmc_env.properties. You'll also need to use Kodi v14 for this to work, or use SPMC (wiki) (which is v13 based right now). If you use Kodi you can still call it "xbmc_env.properties".
sweet.

thank you,
so i dont think i have quite got this working. im pretty sure it is because of my external paths are incorrect.

i have updated my xbmc_env.properties.xml to include this path.

xbmc.data=</storage/emulated/legacy/external_storage/sda1/kodi_data/> kodi_data being the directory on my usb drive.

i dont believe my first attempt at this file was successful as i never had the correct path, forgetting /sda1/. so this could work now...not sure...i dont know how to test it as prior to this path mistake i would look into my kodi_data directory and see a big fat 0 files.

however, because i am not convinced i have this working correctly i have also read a some more on path substitution because well 1. i have ocd and 2. i guess i really only want to store videocache files eg. videocache001, commoncache etc. and not all of the other userdata included with xbmc_env file.

i also believe with pathsubstitution i am making a mistake as well after reading more on path substitution i realize i have no protocol set in my path subs.which has led me to countless attempts similar to this

<from>/sdcard/android/data/org.xbmc.kodi/files/.kodi/temp/</from>
<to>/sdcard/external_storage/sda1/kodi_data/</to> and/or <to>/storage/emulated/legacy/external_storage/sda1/kodi_data</to>
or /0/

i dont believe, but i may be wrong /storage/emulated/0/.... is correct as it is a path created by file manager and i cant see the relation to kodi's file directory.

i do believe /storage/emulated/legacy/external_storage/sda1/kodi_data/ is the correct path, however, what would the protocol be?

i found an uploaded log file somewhere that suggested the the cached files were found at

/sdcard/Android/data/org.xbmc.kodi/files/.kodi/temp/ adding this seems correct but there is no protocol.

if the above line is true would not this line correlate the path suggested

/sdcard/externa|_storage/sda1/kodi_data/

would either of the lines be true with a protocal in front of them?

after looking on wiki. and trying to understand the special:// protocol it had led me to think this was true

<from>special://home/temp/</from>
<to> ?protocol?:// and i have no idea what would fallow </to>


special:// is the protocol...home the profile. which i assume substitutes the path /android/org.xbmc.kodi/files/.kodi/

would the correlating code <to> be represented by <to>special://external_storage/sda1/kodi_data/</to>


none the less, im completely confused. ive only had the box for a month, please bare with my ignorance as i have not written any code for probably twenty five years. it wasnt in .xml either as the internet wasnt even aruond back then...we had things like bbs's and c+. also i wouldnt even know where to begin if i am looking at the source to try and understand this better. sorry if im pissing off the experts.


sincerly,
confused and contemplating the solution would be to invest my money into a newer product with a larger local disk and enabling zero cache settings. life would be easier. no?
*sigh*
Remove the brackets from your xbmc.data line, and don't forget to create the directory beforehand.
forget everything i just wrote!!! ha, i got it. and it was right there in front of me the whole damn time! well not me but "GBANDIT", thank you gbandit. i am an iddiot!

gosh darnit! ha!! i flippin got it!

the correct code for a path substitution for caching the temp folder to your usb drive would be this...

<pathsubstitution>
<substitute>
<from>/storage/emulated/0/Android/data/org.xbmc.kodi/files/.kodi/temp/</from>
<to>/storage/external_storage/sda1/kodi_data/</to> <--- create this folder on your usb drive or rename kodi_data to your specific usb folder.
</substitute>
</pathsubstitution>

(2015-01-07, 09:02)Koying Wrote: [ -> ]*sigh*
Remove the brackets from your xbmc.data line, and don't forget to create the directory beforehand.

*sigh* ill bet thats an understatement!

truly sorry for this mess. ill just go watch some tv now and leave you guys alone.
i aint got nothing but a couple of stupid files. no filechache000.cache


i give up.
not giving up. how can i make this work


xbmc.data=/storage/external_storage/sda1/kodi_data

whereas kodi_data is a the directory on my usb drive

what am i still doing wrong because i cant find the directory being created .xbmc
It is called .kodi, not .xbmc anymore, and it is hidden by default due to starting with a dot.
Configure whatever file manager you use to show hidden files.
i am using the the file manager that comes preloaded with android 4,2. i believe it allows me to see the hidden folders. i am able to view all of the hidden folders relating to kodi.

maybe i dont need to do this im not sure.

my problem is this. i have just about 1gig of local space with my box. if i enable 0 cache (cachemembuffersize 0 ) would i be able to cache a 1080p file greater than 1gb. on the local disk.

or is this a non issue?
Sorry for hijacking this old thread, i have a big problem:
(shield 2.0 with 32 GB SD-card and Jarvis nightly Alpha4)
- i have copied the whole .kodi stuff to /storage/sdcard1/kodi/.kodi (i have even tried the stuff inside .kodi to /storage/sdcard1/kodi)
- i have created a xbmc_env.properties with "xbmc.data=/storage/sdcard1/kodi" or "xbmc.data=/storage/sdcard1/kodi/"
- i have checked twice, that my sdcard is realy /storage/sdcard1 and nothing others

Every time, i try to start Kodi it crashes imidiatly without a kodi.log in .../Temp

I don't know, what to do....any hints?

BTW, if i install kodi for new and have a xbmc_env.properties, should it create all the .kodi stuff on first run? (This crashes also for me)