Skip to content

Commit

Permalink
Merge pull request #614 from dcesari/patch-1
Browse files Browse the repository at this point in the history
Catchup duration keyword
  • Loading branch information
phunkyfish authored Jul 22, 2022
2 parents 6c1702f + 59c00a5 commit 10928db
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 1 deletion.
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -375,6 +375,7 @@ The format specifiers are substitution based and work as follows:
- `{M}`: The minute (00-59) of the start date\time.
- `{S}`: The second (00-59) of the start date\time.
- `{duration}`: The programme duration + any start and end buffer (if set).
- `${duration}`: Same as `{duration}`.
- `{duration:X}`: The programme duration (as above) divided by X seconds. Allows conversion to minutes and other time units. The minimum divider is 1, it must be an integer (not 1.5 or 2.25 etc.) and it must be a positive value. E.g. If you have a duration of 7200 seconds and you need 2 hours (2 hours is 7200 seconds), it means your divider is 3600: `{duration:3600}`. If you need minutes for the same duration you could use: `{duration:60}` which would result in a value of 120.
- `{offset:X}`: The current offset (now - start time) divided by X seconds. Allows conversion to minutes and other time units. The minimum divider is 1, it must be an integer (not 1.5 or 2.25 etc.) and it must be a positive value. E.g. If you need an offset of 720 for a start time of 2 hours ago (2 hours is 7200 seconds), it means your divider is 10: `{offset:10}`. If you need minutes for the same offset you could use: `{offset:60}` which would result in a value of 120.
- `{catchup-id}`: A programme specific identifier required in the catchup URL, value loaded from XMLTV programme entries.
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="20.3.1"
version="20.4.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 @@
v20.4.0
- Support ${duration} format specifier

v20.3.1
- Fix ch-number tag being ignored

Expand Down
1 change: 1 addition & 0 deletions src/iptvsimple/CatchupController.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -357,6 +357,7 @@ std::string FormatDateTime(time_t timeStart, time_t duration, const std::string
FormatUtc("{lutc}", timeNow, formattedUrl);
FormatUtc("${now}", timeNow, formattedUrl);
FormatUtc("${timestamp}", timeNow, formattedUrl);
FormatUtc("${duration}", duration, formattedUrl);
FormatUtc("{duration}", duration, formattedUrl);
FormatUnits("duration", duration, formattedUrl);
FormatUtc("${offset}", timeNow - timeStart, formattedUrl);
Expand Down

0 comments on commit 10928db

Please sign in to comment.