Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Next revision
Previous revision
dvr_api:dvr_recording_rules [2019/10/10 20:12]
neds created
dvr_api:dvr_recording_rules [2020/10/25 01:36]
neds
Line 1: Line 1:
 ======DVR Recording Rules====== ======DVR Recording Rules======
 <btn type="​success"​ size="​xs"​ icon="​fa fa-chevron-left">​[[:​DVR API|Back to all DVR API topics]]</​btn>​ <btn type="​success"​ size="​xs"​ icon="​fa fa-chevron-left">​[[:​DVR API|Back to all DVR API topics]]</​btn>​
 +
 +<WRAP center info>
 +This is a mirror of the documentation from: https://​github.com/​Silicondust/​documentation/​wiki/​DVR-Recording-Rules
 +</​WRAP>​
 +
  
 A Series rule will record every unique episode that matches the given criteria within a TV series. The rule does not expire. Only one Series rule can exist per TV series. A Series rule will record every unique episode that matches the given criteria within a TV series. The rule does not expire. Only one Series rule can exist per TV series.
Line 6: Line 11:
 A Movie rule will record the first showing of the movie that matches the given criteria. The rule will automatically expire after the movie has been recorded. Only one Movie rule can exist per movie. A Movie rule will record the first showing of the movie that matches the given criteria. The rule will automatically expire after the movie has been recorded. Only one Movie rule can exist per movie.
  
-A TeamOnly rule will record every game within a sport series where the specified team is playing. +A DateTimeOnly-ChannelOnly ​rule will record a single airing of the specified TV series or movie at the specified date and time on the specified channel. The rule will automatically expire once the time has passed even if it did not result in a recording. ​Multiple unique ​DateTimeOnly-ChannelOnly ​rules can exist for the same series.
- +
-A DateTimeOnly rule will record a single airing of the specified TV series or movie at the specified date and time. The rule will automatically expire once the time has passedeven if it did not result in a recording. DateTimeOnly rules with different date/time values ​can exist for the same series.+
  
 ====API URL==== ====API URL====
Line 21: Line 24:
 ^ Parameter ^ Type ^ Description ^ ^ Parameter ^ Type ^ Description ^
 | DeviceAuth | string | Concatenation of the DeviceAuth strings from all HDHomeRun tuners. | | DeviceAuth | string | Concatenation of the DeviceAuth strings from all HDHomeRun tuners. |
-| RecordingRuleID | string | Optional. Return only the matching rule. | 
-| SeriesID | string | Optional. Return only the matching Series or Movie rule. | 
- 
-Specifying the SeriesID will return all rules matching the SeriesID including DateTimeOnly rules. If neither RecordingRuleID nor SeriesID are specified then details of all recording rules are returned. 
  
 Returns: Details all matching recording rules, or "​null"​ if no matching rules exist. Results are ordered DateTimeOnly first, then by priority highest first. Returns: Details all matching recording rules, or "​null"​ if no matching rules exist. Results are ordered DateTimeOnly first, then by priority highest first.
  
 </​WRAP>​ </​WRAP>​
-====Add a recording rule====+====Add a series ​recording rule====
 <WRAP indent> <WRAP indent>
  
Line 36: Line 35:
 | Cmd | string | "​add"​ | | Cmd | string | "​add"​ |
 | SeriesID | string | SeriesID identifying the series or movie to record. | | SeriesID | string | SeriesID identifying the series or movie to record. |
 +| ChannelOnly | string | Optional. Pipe separated list of virtual channel numbers - record only on the specified channels. |
 +| TeamOnly | string | Optional. Pipe separated list of team names - record only if one of the specified teams is playing. |
 | RecentOnly | bool | Optional. Record only recent episodes (default 0). | | RecentOnly | bool | Optional. Record only recent episodes (default 0). |
-| ChannelOnly | string | Optional. Record only on this channel (virtual channel number). | 
 | AfterOriginalAirdateOnly | int64 | Optional. Record only if the original airdate is the same or after (UTC unixtime). | | AfterOriginalAirdateOnly | int64 | Optional. Record only if the original airdate is the same or after (UTC unixtime). |
-| TeamOnly | string | Optional. Record only if the given team is playing. | 
-| DateTimeOnly | int64 | Optional. Record only if the start date and time exactly matches (UTC unixtime). | 
 | StartPadding | uint | Optional. Start recording early (seconds, default 30s, max 1h). | | StartPadding | uint | Optional. Start recording early (seconds, default 30s, max 1h). |
 | EndPadding | uint | Optional. Continue recording past end (seconds, default 30s, max 3h). | | EndPadding | uint | Optional. Continue recording past end (seconds, default 30s, max 3h). |
  
-If a Series or Movie rule is specified and a Series or Movie rule already exists it will be updated.+Returns: Details of all recording rules.
  
-A TeamOnly rule is created when TeamOnly is specified. If TeamOnly ​rule is specified and a TeamOnly rule already exists for the given team name it will be updatedThe team name must be an exact match to the guide to record ​- it is recommended ​the UI offer the user the ability to select a team based on episode data and not require the user to enter a team name.+</​WRAP>​ 
 +====Add ​DateTimeOnly-ChannelOnly recording ​rule==== 
 +<WRAP indent>​ 
 + 
 +^ Parameter ^ Type ^ Description ^ 
 +| DeviceAuth | string | Concatenation of the DeviceAuth strings from all HDHomeRun tuners
 +| Cmd | string | "​add"​ | 
 +| SeriesID | string | SeriesID identifying ​the series or movie to record. | 
 +| DateTimeOnly | int64 | Record only the airing that starts at this time (UTC unixtime). | 
 +| ChannelOnly | string | Record only the airing ​on this virtual channel number. | 
 +| StartPadding | uint | Optional. Start recording early (seconds, default 30s, max 1h). | 
 +| EndPadding | uint | Optional. Continue recording past end (seconds, default 30s, max 3h)|
  
-DateTimeOnly ​rule is created when DateTimeOnly is specifiedIf DateTimeOnly rule is specified and a DateTimeOnly rule already exists for the given date/time it will be updated.+Both DateTimeOnly ​and ChannelOnly are requiredChannelOnly must be single channel number.
  
-Returns: Details of all recording rules matching the given SeriesID including the newly created rule, or "​null"​ if the request failed and no other matching rules exist.+Returns: Details of all recording rules
  
 </​WRAP>​ </​WRAP>​
-====Modify a recording rule====+====Modify a series ​recording rule====
 <WRAP indent> <WRAP indent>
  
Line 59: Line 68:
 | DeviceAuth | string | Concatenation of the DeviceAuth strings from all HDHomeRun tuners. | | DeviceAuth | string | Concatenation of the DeviceAuth strings from all HDHomeRun tuners. |
 | Cmd | string | "​change"​ | | Cmd | string | "​change"​ |
-| RecordingRuleID | string | Optional. ID identifying the rule to modify. | +| RecordingRuleID | string | Optional/Required. ID identifying the rule to modify. | 
-| SeriesID | string | Optional. SeriesID identifying the series or movie to delete. |+| SeriesID | string | Optional/Required. SeriesID identifying the series or movie to modify. | 
 +| ChannelOnly | string | Optional. Pipe separated list of virtual channel numbers - record only on the specified channels. | 
 +| TeamOnly | string | Optional. Pipe separated list of team names - record only if one of the specified teams is playing. |
 | RecentOnly | bool | Optional. Record only recent episodes (default 0). | | RecentOnly | bool | Optional. Record only recent episodes (default 0). |
-| ChannelOnly | string | Optional. Record only on this channel (virtual channel number or "​null"​ to remove channel restriction). | 
 | AfterOriginalAirdateOnly | int64 | Optional. Record only if the original airdate is the same or after (UTC unixtime). | | AfterOriginalAirdateOnly | int64 | Optional. Record only if the original airdate is the same or after (UTC unixtime). |
 | StartPadding | uint | Optional. Start recording early (seconds, default 30s, max 1h). | | StartPadding | uint | Optional. Start recording early (seconds, default 30s, max 1h). |
 | EndPadding | uint | Optional. Continue recording past end (seconds, default 30s, max 3h). | | EndPadding | uint | Optional. Continue recording past end (seconds, default 30s, max 3h). |
  
-The RecordingRuleID or the SeriesID must be specified. ​Specifying the SeriesID ​will modify the matching Series or Movie rule (if any). To modify a DateTimeOnly rule the RecordingRuleID must be specified.+The RecordingRuleID ​must be specified ​or the SeriesID must be specified. ​The request ​will be rejected ​if both are specified.
  
-It is not possible to convert between ​Series, Movie, Team, or DateTimeOnly rule. It is not possible ​to modify the TeamOnly property of the DateTimeOnly ​property.+Returns: Details of all recording rules. 
 +</​WRAP>​ 
 +====Modify ​a DateTimeOnly-ChannelOnly recording ​rule==== 
 +<WRAP indent>​ 
 + 
 +^ Parameter ^ Type ^ Description ^ 
 +| DeviceAuth | string | Concatenation of the DeviceAuth strings from all HDHomeRun tuners
 +| Cmd | string | "​change"​ | 
 +| RecordingRuleID | string | Optional/​Required. ID identifying the rule to modify. | 
 +| SeriesID | string | Optional/​Required. SeriesID identifying ​the rule to modify. | 
 +| DateTimeOnly | int64 | Optional/​Required. Unix timestamp identifying ​the rule to modify. | 
 +| ChannelOnly | string | Optional/​Required. Virtual channel number identifying the rule to modify. | 
 +| StartPadding | uint | Optional. Start recording early (seconds, default 30s, max 1h). | 
 +| EndPadding | uint | Optional. Continue recording past end (seconds, default 30s, max 3h). | 
 + 
 +The RecordingRuleID must be specified or the SeriesID, ​DateTimeOnly, and ChannelOnly must be specified.
  
-Returns: Details of all recording rules matching the given SeriesID after modification,​ or "​null"​ if no matching rules exist.+Returns: Details of all recording rules.
  
 </​WRAP>​ </​WRAP>​
Line 83: Line 108:
 | AfterRecordingRuleID | string | The new priority of the rule by specifying which rule it should be directly after, or 0 to make the highest priority. | | AfterRecordingRuleID | string | The new priority of the rule by specifying which rule it should be directly after, or 0 to make the highest priority. |
  
-Priority applies to Series and Movie rules only. DateTimeOnly rules are always highest priority.+Priority applies to Series and Movie rules only. DateTimeOnly-ChannelOnly ​rules are always highest priority.
  
-Returns: Details of the recording ​rule after modification,​ or "​null"​ on failure.+Returns: Details of all recording ​rules.
  
 </​WRAP>​ </​WRAP>​
-====Delete a recording rule====+====Delete a series ​recording rule====
 <WRAP indent> <WRAP indent>
  
Line 94: Line 119:
 | DeviceAuth | string | Concatenation of the DeviceAuth strings from all HDHomeRun tuners. | | DeviceAuth | string | Concatenation of the DeviceAuth strings from all HDHomeRun tuners. |
 | Cmd | string | "​delete"​ | | Cmd | string | "​delete"​ |
-| RecordingRuleID | string | Optional. ID identifying the rule to delete. | +| RecordingRuleID | string | Optional/Required. ID identifying the rule to delete. | 
-| SeriesID | string | Optional. SeriesID identifying the series or movie to delete.| +| SeriesID | string | Optional/Required. SeriesID identifying the series or movie to delete. |
-| TeamOnly | string | Optional. Use with SeriesID to match a Team rule. | +
-| DateTimeOnly | int64 | Optional. Use with SeriesID to match a DateTimeOnly rule (UTC unixtime). | +
-| ProgramID | string | Optional. Use ProgramID + StartTime to identifying a specific airing. | +
-| StartTime | int64 | Optional. Use ProgramID + StartTime to identifying a specific airing. |+
  
-If RecordingRuleID ​is specified the given rule is deleted.+The RecordingRuleID ​must be specified ​or the SeriesID must be specified. The request will be rejected if both are specified.
  
-If SeriesID and TeamOnly are specified the matching TeamOnly rule is delete.+Returns: Details of all recording rules.
  
-If SeriesID and DateTimeOnly are specified the matching ​DateTimeOnly rule is delete.+</​WRAP>​ 
 +====Delete a DateTimeOnly-ChannelOnly recording ​rule==== 
 +<WRAP indent>
  
-If SeriesID ​is specified without TeamOnly or DateTimeOnly ​the matching Series ​rule is deletedTeamOnly or DateTimeOnly ​rules matching ​the same SeriesID are not affected.+^ Parameter ^ Type ^ Description ^ 
 +| DeviceAuth | string | Concatenation of the DeviceAuth strings from all HDHomeRun tuners. | 
 +| Cmd | string | "​delete"​ | 
 +| RecordingRuleID | string | Optional/​Required. ID identifying the rule to delete. | 
 +SeriesID ​| string | Optional/​Required. SeriesID identifying ​the rule to delete
 +DateTimeOnly ​| int64 | Optional/​Required. Unix timestamp identifying ​the rule to delete. | 
 +| ChannelOnly | string | Optional/​Required. Virtual channel number identifying the rule to delete|
  
-If ProgramID and StartTime are specified the airing is identified in the guide and ALL recording rules that would result in recording the specified ​airing are deleted.+The RecordingRuleID must be specified ​or the SeriesID, DateTimeOnly, ​and ChannelOnly must be specified.
  
-Returns: ​"​null"​.+Returns: ​Details of all recording rules.
  
 </​WRAP>​ </​WRAP>​
Line 124: Line 153:
         "​Synopsis":​ "With MI6 under attack, James Bond comes to M's rescue when her daunting past comes back to haunt her, forcing him to seek revenge and take down whoever gets in his way in an effort to find the dangerous assassin before its too late. (3.5/​4.0)",​         "​Synopsis":​ "With MI6 under attack, James Bond comes to M's rescue when her daunting past comes back to haunt her, forcing him to seek revenge and take down whoever gets in his way in an effort to find the dangerous assassin before its too late. (3.5/​4.0)",​
         "​ImageURL":​ "​http://​my.hdhomerun.com/​fyimediaservices/​v_3_3_6_1/​Program.svc/​96/​1579711/​Primary",​         "​ImageURL":​ "​http://​my.hdhomerun.com/​fyimediaservices/​v_3_3_6_1/​Program.svc/​96/​1579711/​Primary",​
-        "​ChannelOnly":​ "​2.1",​+        "​ChannelOnly":​ "2.1|702",
         "​AfterOriginalAirdateOnly":​ 1351209600,         "​AfterOriginalAirdateOnly":​ 1351209600,
-        "​TeamOnly":​ "​England",​+        "​TeamOnly":​ "​England|Wales",
         "​DateTimeOnly":​ 1455212160,         "​DateTimeOnly":​ 1455212160,
         "​Priority":​ 1,         "​Priority":​ 1,
Line 145: Line 174:
  
 </​WRAP>​ </​WRAP>​
 +==== History ====
 +<WRAP indent>
 +
 +  * 20201024:
 +    * API changes.
 +
 +  * 20160318:
 +    * Add TeamOnly rules.
 +    * Expand delete command.
 +
 +  * 20160218:
 +    * Add command will update an existing rule if a collision occurs.
 +    * The OriginalAirdate associated with the series no longer reported in the recording rule results.
 +    * Results include all matching rules if a SeriesID is specified.
 +</​WRAP>​
 +
 +Copyright © 2016-2020 Silicondust USA Inc. <​www.silicondust.com>​.
  • Last modified: 2020/10/25 01:36