Skip to content

Commit

Permalink
tsbuffer directory: Allow escaping from special://userdata
Browse files Browse the repository at this point in the history
Kodi's file browser doesn't allow escaping from special://whatever. To
circumvent this, we simply change the default value to empty ("").
In case the user doesn't change the directory, we still set the
original default value in the PVR code.

Fixes #3
  • Loading branch information
manuelm committed Mar 31, 2016
1 parent a5fef21 commit 7fe9b33
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion pvr.dvbviewer/resources/settings.xml
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
<!-- advanced -->
<category label="30101">
<setting label="30020" id="usetimeshift" type="bool" default="false" />
<setting label="30021" id="timeshiftpath" type="folder" default="special://userdata/addon_data/pvr.dvbviewer" option="writeable" enable="eq(-1,true)" />
<setting label="30021" id="timeshiftpath" type="folder" default="" option="writeable" enable="eq(-1,true)" />

<setting id="sep3" type="sep" />
<setting label="30030" id="usertsp" type="bool" default="false" enable="eq(-3,false)" />
Expand Down
2 changes: 1 addition & 1 deletion src/client.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,7 @@ void ADDON_ReadSettings(void)
if (!XBMC->GetSetting("usetimeshift", &g_useTimeshift))
g_useTimeshift = false;

if (XBMC->GetSetting("timeshiftpath", buffer))
if (XBMC->GetSetting("timeshiftpath", buffer) && !std::string(buffer).empty())
g_timeshiftBufferPath = buffer;

if (!XBMC->GetSetting("usertsp", &g_useRTSP) || g_useTimeshift)
Expand Down

0 comments on commit 7fe9b33

Please sign in to comment.