Skip to content

Commit

Permalink
Merge pull request #706 from phunkyfish/fix-default-settings
Browse files Browse the repository at this point in the history
Set default settings correctly and update settings migration
  • Loading branch information
phunkyfish authored Feb 13, 2023
2 parents 2787262 + 7a3b6f2 commit db326dc
Show file tree
Hide file tree
Showing 4 changed files with 24 additions and 19 deletions.
2 changes: 1 addition & 1 deletion pvr.iptvsimple/addon.xml.in
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<?xml version="1.0" encoding="UTF-8"?>
<addon
id="pvr.iptvsimple"
version="20.8.0"
version="20.8.1"
name="IPTV Simple Client"
provider-name="nightik and Ross Nicholson">
<requires>@ADDON_DEPENDS@
Expand Down
3 changes: 3 additions & 0 deletions pvr.iptvsimple/changelog.txt
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
v20.8.1
- Set default settings correctly and update settings migration

v20.8.0
- Add support for multiple instances each supporting their own M3U/XMLTV and settings

Expand Down
22 changes: 11 additions & 11 deletions src/iptvsimple/InstanceSettings.h
Original file line number Diff line number Diff line change
Expand Up @@ -237,7 +237,7 @@ namespace iptvsimple
PathType m_m3uPathType = PathType::REMOTE_PATH;
std::string m_m3uPath;
std::string m_m3uUrl;
bool m_cacheM3U = false;
bool m_cacheM3U = true;
int m_startChannelNumber = 1;
bool m_numberChannelsByM3uOrderOnly = false;
RefreshMode m_m3uRefreshMode = RefreshMode::DISABLED;
Expand All @@ -256,7 +256,7 @@ namespace iptvsimple
std::string m_threeTVGroup = "";
std::string m_fourTVGroup = "";
std::string m_fiveTVGroup = "";
std::string m_customTVGroupsFile = "";
std::string m_customTVGroupsFile = DEFAULT_CUSTOM_TV_GROUPS_FILE;
bool m_allowRadioChannelGroupsOnly = false;
ChannelGroupMode m_radioChannelGroupMode = ChannelGroupMode::ALL_GROUPS;
int m_numRadioGroups = DEFAULT_NUM_GROUPS;
Expand All @@ -265,28 +265,28 @@ namespace iptvsimple
std::string m_threeRadioGroup = "";
std::string m_fourRadioGroup = "";
std::string m_fiveRadioGroup = "";
std::string m_customRadioGroupsFile = "";
std::string m_customRadioGroupsFile = DEFAULT_CUSTOM_RADIO_GROUPS_FILE;

// EPG
PathType m_epgPathType = PathType::REMOTE_PATH;
std::string m_epgPath;
std::string m_epgUrl;
bool m_cacheEPG = false;
float m_epgTimeShiftHours = 0;
bool m_tsOverride = true;
bool m_cacheEPG = true;
float m_epgTimeShiftHours = 0.0f;
bool m_tsOverride = false;
bool m_ignoreCaseForEpgChannelIds = true;

// Genres
bool m_useEpgGenreTextWhenMapping = false;
PathType m_genresPathType = PathType::LOCAL_PATH;
std::string m_genresPath;
std::string m_genresPath = DEFAULT_GENRE_TEXT_MAP_FILE;
std::string m_genresUrl;

// Channel Logos
PathType m_logoPathType = PathType::REMOTE_PATH;
std::string m_logoPath;
std::string m_logoBaseUrl;
EpgLogosMode m_epgLogosMode = EpgLogosMode::IGNORE_XMLTV;
EpgLogosMode m_epgLogosMode = EpgLogosMode::PREFER_M3U;
bool m_useLocalLogosOnly = false;

// Media
Expand All @@ -298,9 +298,9 @@ namespace iptvsimple

// Timeshift
bool m_timeshiftEnabled = false;
bool m_timeshiftEnabledAll = false;
bool m_timeshiftEnabledHttp = false;
bool m_timeshiftEnabledUdp = false;
bool m_timeshiftEnabledAll = true;
bool m_timeshiftEnabledHttp = true;
bool m_timeshiftEnabledUdp = true;
bool m_timeshiftEnabledCustom = false;

// Catchup
Expand Down
16 changes: 9 additions & 7 deletions src/iptvsimple/utilities/SettingsMigration.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -41,12 +41,13 @@ const std::vector<std::pair<const char*, const char*>> stringMap = {{"m3uPath",
{"genresUrl", ""},
{"logoPath", ""},
{"logoBaseUrl", ""},
{"udpxyHost", "127.0.0.1"},
{"catchupQueryFormat", ""},
{"udpxyHost", ""},
{"defaultUserAgent", ""},
{"defaultInputstream", ""},
{"defaultMimeType", ""}};

const std::vector<std::pair<const char*, int>> intMap = {{"m3uPathType", 0},
const std::vector<std::pair<const char*, int>> intMap = {{"m3uPathType", 1},
{"startNum", 1},
{"m3uRefreshMode", 0},
{"m3uRefreshIntervalMins", 60},
Expand All @@ -61,12 +62,13 @@ const std::vector<std::pair<const char*, int>> intMap = {{"m3uPathType", 0},
{"logoFromEpg", 1},
{"catchupDays", 5},
{"allChannelsCatchupMode", 0},
{"catchupOverrideMode", 0},
{"catchupWatchEpgBeginBufferMins", 5},
{"catchupWatchEpgEndBufferMins", 15},
{"udpxyPort", 4022}};

const std::vector<std::pair<const char*, float>> floatMap = {{"epgTimeShift", 0.0},
{"catchupCorrection", 0.0}};
const std::vector<std::pair<const char*, float>> floatMap = {{"epgTimeShift", 0.0f},
{"catchupCorrection", 0.0f}};

const std::vector<std::pair<const char*, bool>> boolMap = {{"m3uCache", true},
{"numberByOrder", false},
Expand All @@ -84,9 +86,9 @@ const std::vector<std::pair<const char*, bool>> boolMap = {{"m3uCache", true},
{"mediaTitleSeasonEpisode", false},
{"mediaVODAsRecordings", true},
{"timeshiftEnabled", false},
{"timeshiftEnabledAll", true},
{"timeshiftEnabledHttp", true},
{"timeshiftEnabledUdp", true},
{"timeshiftEnabledAll", false},
{"timeshiftEnabledHttp", false},
{"timeshiftEnabledUdp", false},
{"timeshiftEnabledCustom", false},
{"catchupEnabled", false},
{"catchupPlayEpgAsLive", false},
Expand Down

0 comments on commit db326dc

Please sign in to comment.