2017-08-27, 14:46
So I hope this is a simple answer and I am just working to late and over thinking this.
In my script I have things being saved to userdata\addon_data\script.crow\processing
but I am using a os library and part of want I need is being retruned as C:\kodi\portable\userdata\addon_data\script.crow\processing
from my testing kodi does not like this but it works if I use special://profile/addon_data/script.crow/processing
being that different systems and ppl will have the location of kodi basically anywhere is there a simple way to convert the path that is returned my os lib to a kodi special protcoal path?
I am thinking split but if I split with '\' then it will not always work as the location thing.....
then I am thinking split at userdata.... that way I will have 2 variables and I can split the second varilble at \ and replace with / and the special protocol.
but when I look this up on how to do it I cant seem to get a clear answer or understanding if I can even split at a word...
any advice direction will be appreciated.
and with that good night.
In my script I have things being saved to userdata\addon_data\script.crow\processing
but I am using a os library and part of want I need is being retruned as C:\kodi\portable\userdata\addon_data\script.crow\processing
from my testing kodi does not like this but it works if I use special://profile/addon_data/script.crow/processing
being that different systems and ppl will have the location of kodi basically anywhere is there a simple way to convert the path that is returned my os lib to a kodi special protcoal path?
I am thinking split but if I split with '\' then it will not always work as the location thing.....
then I am thinking split at userdata.... that way I will have 2 variables and I can split the second varilble at \ and replace with / and the special protocol.
but when I look this up on how to do it I cant seem to get a clear answer or understanding if I can even split at a word...
any advice direction will be appreciated.
and with that good night.