diff --git a/README.md b/README.md index 35417a83..e59f3f3b 100644 --- a/README.md +++ b/README.md @@ -217,6 +217,7 @@ The following configuration is available on the Recordings tab of the addon sett * **Enable EDLs support**: EDLs are used to define commericals etc. in recordings. If a tool like [Comskip]() is used to generate EDL files enabling this will allow Kodi PVR to use them. E.g. if there is a file called ```my recording.ts``` the EDL file should be call ```my recording.edl```. Note: enabling this setting has no effect if the files are not present. * **EDL start time padding**: Padding to use at an EDL stop. I.e. use a negative number to start the cut earlier and positive to start the cut later. Default 0. * **EDL stop time padding**: Padding to use at an EDL stop. I.e. use a negative number to stop the cut earlier and positive to stop the cut later. Default 0. +* **Enable WebIf Internal Movie List**: Use internal OWF MovieList (avoids memory leak on some images). Note: this will only have an effect if OpenWebIf is of the minimum supported version (1.4.6). ### Timers diff --git a/pvr.vuplus/addon.xml.in b/pvr.vuplus/addon.xml.in index c9dec8e5..0dd9d814 100644 --- a/pvr.vuplus/addon.xml.in +++ b/pvr.vuplus/addon.xml.in @@ -1,7 +1,7 @@ @ADDON_DEPENDS@ diff --git a/pvr.vuplus/changelog.txt b/pvr.vuplus/changelog.txt index 90beef1d..10863c09 100644 --- a/pvr.vuplus/changelog.txt +++ b/pvr.vuplus/changelog.txt @@ -1,3 +1,6 @@ +v22.3.0 +- Add expert setting to toggle using OpenWebIf internal MovieList on/off + v22.2.0 - PVR Add-on API v9.2.0 diff --git a/pvr.vuplus/resources/instance-settings.xml b/pvr.vuplus/resources/instance-settings.xml index 7fad1131..6a95def1 100644 --- a/pvr.vuplus/resources/instance-settings.xml +++ b/pvr.vuplus/resources/instance-settings.xml @@ -670,6 +670,11 @@ + + 3 + true + + diff --git a/pvr.vuplus/resources/language/resource.language.en_gb/strings.po b/pvr.vuplus/resources/language/resource.language.en_gb/strings.po index df4416ab..4b1a7622 100644 --- a/pvr.vuplus/resources/language/resource.language.en_gb/strings.po +++ b/pvr.vuplus/resources/language/resource.language.en_gb/strings.po @@ -136,7 +136,10 @@ msgctxt "#30020" msgid "Advanced" msgstr "" -#empty string with id 30021 +#. label: Recordings - enablewebifinternalmovielist +msgctxt "#30021" +msgid "Enable WebIf Internal Movie List" +msgstr "" #. label: Recordings - recordingsrecursive msgctxt "#30022" @@ -1310,7 +1313,12 @@ msgctxt "#30691" msgid "Create a virtual structure grouping recordings with the same name into folders. Will be applied to all recordings unless keeping the folder structure on the backend. In that case it will only be applied to the recordings in the root of each recording location." msgstr "" -#empty strings from id 30692 to 30699 +#. help: Recordings - enablewebifinternalmovielist +msgctxt "#30692" +msgid "Use internal OWF MovieList (avoids memory leak on some images). Note: this will only have an effect if OpenWebIf is of the minimum supported version (1.4.6)." +msgstr "" + +#empty strings from id 30693 to 30699 #. help info - Timers diff --git a/src/enigma2/InstanceSettings.cpp b/src/enigma2/InstanceSettings.cpp index 9317ba71..b9042122 100644 --- a/src/enigma2/InstanceSettings.cpp +++ b/src/enigma2/InstanceSettings.cpp @@ -144,6 +144,7 @@ void InstanceSettings::ReadSettings() m_instance.CheckInstanceSettingBoolean("enablerecordingedls", m_enableRecordingEDLs); m_instance.CheckInstanceSettingInt("edlpaddingstart", m_edlStartTimePadding); m_instance.CheckInstanceSettingInt("edlpaddingstop", m_edlStopTimePadding); + m_instance.CheckInstanceSettingBoolean("enablewebifinternalmovielist", m_enableWebIfInternalMovieList); //Timers m_instance.CheckInstanceSettingBoolean("enablegenrepeattimers", m_enableGenRepeatTimers); @@ -319,6 +320,8 @@ ADDON_STATUS InstanceSettings::SetSetting(const std::string& settingName, const return SetSetting(settingName, settingValue, m_edlStartTimePadding, ADDON_STATUS_OK, ADDON_STATUS_OK); else if (settingName == "edlpaddingstop") return SetSetting(settingName, settingValue, m_edlStopTimePadding, ADDON_STATUS_OK, ADDON_STATUS_OK); + else if (settingName == "enablewebifinternalmovielist") + return SetSetting(settingName, settingValue, m_enableWebIfInternalMovieList, ADDON_STATUS_NEED_RESTART, ADDON_STATUS_OK); //Timers else if (settingName == "enablegenrepeattimers") return SetSetting(settingName, settingValue, m_enableGenRepeatTimers, ADDON_STATUS_OK, ADDON_STATUS_OK); diff --git a/src/enigma2/InstanceSettings.h b/src/enigma2/InstanceSettings.h index 757263bf..f98dfa24 100644 --- a/src/enigma2/InstanceSettings.h +++ b/src/enigma2/InstanceSettings.h @@ -175,6 +175,7 @@ namespace enigma2 bool GetRecordingEDLsEnabled() const { return m_enableRecordingEDLs; } int GetEDLStartTimePadding() const { return m_edlStartTimePadding; } int GetEDLStopTimePadding() const { return m_edlStopTimePadding; } + bool GetWebIfInternalMovieListEnabled() const { return m_enableWebIfInternalMovieList; } //Timers bool GetGenRepeatTimersEnabled() const { return m_enableGenRepeatTimers; } @@ -389,6 +390,7 @@ namespace enigma2 bool m_enableRecordingEDLs = false; int m_edlStartTimePadding = 0; int m_edlStopTimePadding = 0; + bool m_enableWebIfInternalMovieList = true; //Timers bool m_enableGenRepeatTimers = true; diff --git a/src/enigma2/Recordings.cpp b/src/enigma2/Recordings.cpp index b889a858..ec14701d 100644 --- a/src/enigma2/Recordings.cpp +++ b/src/enigma2/Recordings.cpp @@ -759,7 +759,7 @@ void Recordings::LoadRecordings(bool deleted) namespace { -std::string GetRecordingsParams(const std::string recordingLocation, bool deleted, bool getRecordingsRecursively, bool supportsMovieListRecursive, bool supportsMovieListOWFInternal) +std::string GetRecordingsParams(const std::string recordingLocation, bool deleted, bool getRecordingsRecursively, bool supportsMovieListRecursive, bool supportsMovieListOWFInternal, bool webIfInternalMovieListEnabled) { std::string recordingsParams; @@ -772,14 +772,14 @@ std::string GetRecordingsParams(const std::string recordingLocation, bool delete // &internal=true requests that openwebif uses it own OWFMovieList instead of the E2 MovieList // becuase the E2 MovieList causes memory leaks - if (supportsMovieListOWFInternal) + if (supportsMovieListOWFInternal && webIfInternalMovieListEnabled) recordingsParams += "&internal=1"; } else { // &internal=true requests that openwebif uses it own OWFMovieList instead of the E2 MovieList // becuase the E2 MovieList causes memory leaks - if (supportsMovieListOWFInternal) + if (supportsMovieListOWFInternal && webIfInternalMovieListEnabled) { if (recordingLocation == "default") recordingsParams += "?internal=1"; @@ -798,7 +798,7 @@ bool Recordings::GetRecordingsFromLocation(const std::string recordingLocation, std::string url; std::string directory; - std::string recordingsParams = GetRecordingsParams(recordingLocation, deleted, m_settings->GetRecordingsRecursively(), m_settings->SupportsMovieListRecursive(), m_settings->SupportsMovieListOWFInternal()); + std::string recordingsParams = GetRecordingsParams(recordingLocation, deleted, m_settings->GetRecordingsRecursively(), m_settings->SupportsMovieListRecursive(), m_settings->SupportsMovieListOWFInternal(), m_settings->GetWebIfInternalMovieListEnabled()); if (recordingLocation == "default") {