Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -248,6 +248,7 @@ Addon settings for catchup:
- `without catchup mode` - Only include channels with no catchup mode set (except legacy SIP `timeshift` catchup mode).
- `with catchup mode` - Only include channels with catchup mode set (ignore those without a catchup mode).
- `with and without catchup mode (all channels)` - Include all channels ignoring any catchup mode from the M3U.
* **Catchup FS Mode**: For mono Flusonnic streams use either relative timeshift (default) or a combination of utc and duration.
* **Catchup correction**: Adjust the time used for catchup stream URL generation by this value, from -12 hours to +14 hours. Useful for catchup streams which are geo mis-matched to the wrong time. Note that this value can be overridden by values in the M3U file, see [Supported M3U and XMLTV elements](#supported-m3u-and-xmltv-elements).
* **Play from EPG in Live TV mode (using timeshift)**: When disabled any catchup show from the past will be played like a video (bounded by start and end times). If enabled, it will instead act like a live stream with timeshift, also allowing the ability to skip back and forward programmes. Note that the only effect this option has on streams that do not support timeshifting is whether or not to apply the before/after buffer.
* **Buffer before programme start**: The amount of buffer to give before the playback start point of an EPG entry that will be watched as a video.
Expand Down
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="22.4.2"
version="22.5.0"
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 @@
v22.5.0
- Add option to set Catchup FS mode

v22.4.2
- Translations updates from Weblate
- af_za, am_et, ar_sa, ast_es, az_az, be_by, bg_bg, bs_ba, ca_es, cs_cz, cy_gb, da_dk, de_de, el_gr, en_au, en_nz, en_us, eo, es_ar, es_es, es_mx, et_ee, eu_es, fa_af, fa_ir, fi_fi, fo_fo, fr_ca, fr_fr, gl_es, he_il, hi_in, hr_hr, hu_hu, hy_am, id_id, is_is, it_it, ja_jp, ko_kr, lt_lt, lv_lv, mi, mk_mk, ml_in, mn_mn, ms_my, mt_mt, my_mm, nb_no, nl_nl, pl_pl, pt_br, pt_pt, ro_ro, ru_ru, si_lk, sk_sk, sl_si, sq_al, sr_rs, sr_rs@latin, sv_se, szl, ta_in, te_in, tg_tj, th_th, tr_tr, uk_ua, uz_uz, vi_vn, zh_cn, zh_tw
Expand Down
14 changes: 14 additions & 0 deletions pvr.iptvsimple/resources/instance-settings.xml
Original file line number Diff line number Diff line change
Expand Up @@ -794,6 +794,20 @@
</dependencies>
<control type="list" format="integer" />
</setting>
<setting id="catchupFSMode" type="integer" label="30129" help="30711">
<level>3</level>
<default>0</default>
<constraints>
<options>
<option label="30130">0</option> <!-- RELATIVE_TIMESHIFT -->
<option label="30131">1</option> <!-- UTC_AND_DURATION -->
</options>
</constraints>
<dependencies>
<dependency type="enable" setting="catchupEnabled" operator="is">true</dependency>
</dependencies>
<control type="list" format="integer" />
</setting>
<setting id="catchupCorrection" type="number" label="30128" help="30710">
<level>0</level>
<default>0</default>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -598,7 +598,22 @@ msgctxt "#30128"
msgid "Catchup correction"
msgstr ""

#empty strings from id 30129 to 30449
#. label: Catchup - catchupFSMode
msgctxt "#30129"
msgid "Catchup FS Mode"
msgstr ""

#. label-option: Catchup - catchupFSMode
msgctxt "#30130"
msgid "Relative Timeshift"
msgstr ""

#. label-option: Catchup - catchupFSMode
msgctxt "#30131"
msgid "UTC and Duration"
msgstr ""

#empty strings from id 30132 to 30449

#. category-lavel: Media
#. group-label: Media - Media
Expand Down Expand Up @@ -1024,7 +1039,12 @@ msgctxt "#30710"
msgid "Adjust the time used for catchup stream URL generation by this value, from -12 hours to +14 hours. Useful for catchup streams which are geo mis-matched to the wrong time. Note that this value can be overridden by values in the M3U file."
msgstr ""

#empty strings from id 30711 to 307019
#. label: Catchup - catchupFSMode
msgctxt "#30711"
msgid "For mono Flusonnic streams use either relative timeshift (default) or a combination of utc and duration."
msgstr ""

#empty strings from id 30712 to 307019

#. help info - Timeshift

Expand Down
3 changes: 3 additions & 0 deletions src/iptvsimple/InstanceSettings.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -141,6 +141,7 @@ void InstanceSettings::ReadSettings()
m_instance.CheckInstanceSettingInt("catchupDays", m_catchupDays);
m_instance.CheckInstanceSettingEnum<CatchupMode>("allChannelsCatchupMode", m_allChannelsCatchupMode);
m_instance.CheckInstanceSettingEnum<CatchupOverrideMode>("catchupOverrideMode", m_catchupOverrideMode);
m_instance.CheckInstanceSettingEnum<CatchupFSMode>("catchupFSMode", m_catchupFSMode);
m_instance.CheckInstanceSettingFloat("catchupCorrection", m_catchupCorrectionHours);
m_instance.CheckInstanceSettingBoolean("catchupPlayEpgAsLive", m_catchupPlayEpgAsLive);
m_instance.CheckInstanceSettingInt("catchupWatchEpgBeginBufferMins", m_catchupWatchEpgBeginBufferMins);
Expand Down Expand Up @@ -315,6 +316,8 @@ ADDON_STATUS InstanceSettings::SetSetting(const std::string& settingName, const
return SetEnumSetting<CatchupMode, ADDON_STATUS>(settingName, settingValue, m_allChannelsCatchupMode, ADDON_STATUS_OK, ADDON_STATUS_OK);
else if (settingName == "catchupOverrideMode")
return SetEnumSetting<CatchupOverrideMode, ADDON_STATUS>(settingName, settingValue, m_catchupOverrideMode, ADDON_STATUS_OK, ADDON_STATUS_OK);
else if (settingName == "catchupFSMode")
return SetEnumSetting<CatchupFSMode, ADDON_STATUS>(settingName, settingValue, m_catchupFSMode, ADDON_STATUS_OK, ADDON_STATUS_OK);
else if (settingName == "catchupCorrection")
return SetSetting<float, ADDON_STATUS>(settingName, settingValue, m_catchupCorrectionHours, ADDON_STATUS_OK, ADDON_STATUS_OK);
else if (settingName == "catchupPlayEpgAsLive")
Expand Down
9 changes: 9 additions & 0 deletions src/iptvsimple/InstanceSettings.h
Original file line number Diff line number Diff line change
Expand Up @@ -79,6 +79,13 @@ namespace iptvsimple
ALL_CHANNELS
};

enum class CatchupFSMode
: int // same type as addon settings
{
RELATIVE_TIMESHIFT = 0,
UTC_AND_DURATION
};

class InstanceSettings
{
public:
Expand Down Expand Up @@ -161,6 +168,7 @@ namespace iptvsimple
time_t GetCatchupDaysInSeconds() const { return static_cast<time_t>(m_catchupDays) * 24 * 60 * 60; }
const CatchupMode& GetAllChannelsCatchupMode() const { return m_allChannelsCatchupMode; }
const CatchupOverrideMode& GetCatchupOverrideMode() const { return m_catchupOverrideMode; }
const CatchupFSMode& GetCatchupFSMode() const { return m_catchupFSMode; }
float GetCatchupCorrectionHours() const { return m_catchupCorrectionHours; }
int GetCatchupCorrectionSecs() const { return static_cast<int>(m_catchupCorrectionHours * 60 * 60); }
bool CatchupPlayEpgAsLive() const { return m_catchupPlayEpgAsLive; }
Expand Down Expand Up @@ -327,6 +335,7 @@ namespace iptvsimple
int m_catchupDays = 3;
CatchupMode m_allChannelsCatchupMode = CatchupMode::DISABLED;
CatchupOverrideMode m_catchupOverrideMode = CatchupOverrideMode::WITHOUT_TAGS;
CatchupFSMode m_catchupFSMode = CatchupFSMode::RELATIVE_TIMESHIFT;
float m_catchupCorrectionHours = 0;
bool m_catchupPlayEpgAsLive = false;
int m_catchupWatchEpgBeginBufferMins = 5;
Expand Down
9 changes: 8 additions & 1 deletion src/iptvsimple/data/Channel.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -498,9 +498,16 @@ bool Channel::GenerateFlussonicCatchupSource(const std::string& url)
else
{
if (fsListType == "index")
{
m_catchupSource = fsHost + "/" + fsChannelId + "/timeshift_rel-{offset:1}.m3u8" + fsUrlAppend;
}
else
m_catchupSource = fsHost + "/" + fsChannelId + "/" + fsListType + "-timeshift_rel-{offset:1}.m3u8" + fsUrlAppend;
{
if (m_settings->GetCatchupFSMode() == CatchupFSMode::RELATIVE_TIMESHIFT)
m_catchupSource = fsHost + "/" + fsChannelId + "/" + fsListType + "-timeshift_rel-{offset:1}.m3u8" + fsUrlAppend;
else
m_catchupSource = fsHost + "/" + fsChannelId + "/" + fsListType + "-{utc}-{duration}.m3u8" + fsUrlAppend;
}
}

return true;
Expand Down