2012-09-26, 05:52 PM
(This post was last modified: 2012-09-26, 06:00 PM by wileecoyote.)
I was playing with the channel icon locations and found out how to find the userdata folder for Windows. I expanded your code to write to the addon_data\pvr.nextpvr folder as such...
You might expand it to create/write to a channel_icon folder in the pvr.nextpvr folder.
I didn't know where the folders are in Linux or OSX so I left those blank for now.
Edit: I forgot to mention that this code works on Windows 8 as well.
Code:
#ifdef TARGET_WINDOWS
// find directory for storing channel icons
m_channelIconDirectory = getenv("APPDATA");
m_channelIconDirectory += PATH_SEPARATOR_CHAR;
m_channelIconDirectory += "XBMC";
m_channelIconDirectory += PATH_SEPARATOR_CHAR;
m_channelIconDirectory += "userdata";
m_channelIconDirectory += PATH_SEPARATOR_CHAR;
m_channelIconDirectory += "addon_data";
m_channelIconDirectory += PATH_SEPARATOR_CHAR;
m_channelIconDirectory += "pvr.nextpvr";
m_channelIconDirectory += PATH_SEPARATOR_CHAR;
#elif defined (TARGET_LINUX) || defined(TARGET_DARWIN)
#elif defined(TARGET_OSX)
#endif
You might expand it to create/write to a channel_icon folder in the pvr.nextpvr folder.
I didn't know where the folders are in Linux or OSX so I left those blank for now.
Edit: I forgot to mention that this code works on Windows 8 as well.