<dd>
Enables access to all video recording functions. This also include administration of the auto recordings.
+ <dt><b>HTSP DVR</b>
+ <dd>
+ Enables access to video recording functions for the HTSP protocol (Showtime, XBMC etc.).
+
<dt><b>DVR Config Profile</b>
<dd>
If set, the user will only be able to use the DVR config profile
int first;
snprintf(buf, sizeof(buf),
- "%s:%s [%s%s%s%s%s], conn=%u, chmin=%llu, chmax=%llu%s",
+ "%s:%s [%s%s%s%s%s%s%s], conn=%u, chmin=%llu, chmax=%llu%s",
a->aa_representative ?: "<no-id>",
a->aa_username ?: "<no-user>",
a->aa_rights & ACCESS_STREAMING ? "S" : "",
a->aa_rights & ACCESS_ADVANCED_STREAMING ? "A" : "",
+ a->aa_rights & ACCESS_HTSP_STREAMING ? "T" : "",
a->aa_rights & ACCESS_WEB_INTERFACE ? "W" : "",
a->aa_rights & ACCESS_RECORDER ? "R" : "",
+ a->aa_rights & ACCESS_HTSP_RECORDER ? "E" : "",
a->aa_rights & ACCESS_ADMIN ? "*" : "",
a->aa_conn_limit,
(long long)a->aa_chmin, (long long)a->aa_chmax,
r |= ACCESS_HTSP_STREAMING;
if (ae->ae_dvr)
r |= ACCESS_RECORDER;
+ if (ae->ae_htsp_dvr)
+ r |= ACCESS_HTSP_RECORDER;
if (ae->ae_webui)
r |= ACCESS_WEB_INTERFACE;
if (ae->ae_admin)
if (conf) {
ae->ae_htsp_streaming = 1;
+ ae->ae_htsp_dvr = 1;
idnode_load(&ae->ae_id, conf);
/* note password has PO_NOSAVE, thus it must be set manually */
if ((s = htsmsg_get_str(conf, "password")) != NULL)
.name = "Video Recorder",
.off = offsetof(access_entry_t, ae_dvr),
},
+ {
+ .type = PT_BOOL,
+ .id = "htsp_dvr",
+ .name = "HTSP DVR",
+ .off = offsetof(access_entry_t, ae_htsp_dvr),
+ },
{
.type = PT_STR,
.id = "dvr_config",
uint32_t ae_conn_limit;
int ae_dvr;
+ int ae_htsp_dvr;
struct dvr_config *ae_dvr_config;
LIST_ENTRY(access_entry) ae_dvr_config_link;
#define ACCESS_HTSP_STREAMING (1<<2)
#define ACCESS_WEB_INTERFACE (1<<3)
#define ACCESS_RECORDER (1<<4)
-#define ACCESS_ADMIN (1<<5)
+#define ACCESS_HTSP_RECORDER (1<<5)
+#define ACCESS_ADMIN (1<<6)
#define ACCESS_OR (1<<30)
#define ACCESS_FULL \
{ "getEvents", htsp_method_getEvents, ACCESS_HTSP_STREAMING},
{ "epgQuery", htsp_method_epgQuery, ACCESS_HTSP_STREAMING},
{ "getEpgObject", htsp_method_getEpgObject, ACCESS_HTSP_STREAMING},
- { "getDvrConfigs", htsp_method_getDvrConfigs, ACCESS_RECORDER},
- { "addDvrEntry", htsp_method_addDvrEntry, ACCESS_RECORDER},
- { "updateDvrEntry", htsp_method_updateDvrEntry, ACCESS_RECORDER},
- { "cancelDvrEntry", htsp_method_cancelDvrEntry, ACCESS_RECORDER},
- { "deleteDvrEntry", htsp_method_deleteDvrEntry, ACCESS_RECORDER},
- { "addAutorecEntry", htsp_method_addAutorecEntry, ACCESS_RECORDER},
- { "deleteAutorecEntry", htsp_method_deleteAutorecEntry, ACCESS_RECORDER},
- { "getDvrCutpoints", htsp_method_getDvrCutpoints, ACCESS_RECORDER},
+ { "getDvrConfigs", htsp_method_getDvrConfigs, ACCESS_HTSP_RECORDER},
+ { "addDvrEntry", htsp_method_addDvrEntry, ACCESS_HTSP_RECORDER},
+ { "updateDvrEntry", htsp_method_updateDvrEntry, ACCESS_HTSP_RECORDER},
+ { "cancelDvrEntry", htsp_method_cancelDvrEntry, ACCESS_HTSP_RECORDER},
+ { "deleteDvrEntry", htsp_method_deleteDvrEntry, ACCESS_HTSP_RECORDER},
+ { "addAutorecEntry", htsp_method_addAutorecEntry, ACCESS_HTSP_RECORDER},
+ { "deleteAutorecEntry", htsp_method_deleteAutorecEntry, ACCESS_HTSP_RECORDER},
+ { "getDvrCutpoints", htsp_method_getDvrCutpoints, ACCESS_HTSP_RECORDER},
{ "getTicket", htsp_method_getTicket, ACCESS_HTSP_STREAMING},
{ "subscribe", htsp_method_subscribe, ACCESS_HTSP_STREAMING},
{ "unsubscribe", htsp_method_unsubscribe, ACCESS_HTSP_STREAMING},
{ "subscriptionLive", htsp_method_live, ACCESS_HTSP_STREAMING},
{ "subscriptionFilterStream", htsp_method_filter_stream, ACCESS_HTSP_STREAMING},
{ "getProfiles", htsp_method_getProfiles, ACCESS_HTSP_STREAMING},
- { "fileOpen", htsp_method_file_open, ACCESS_RECORDER},
- { "fileRead", htsp_method_file_read, ACCESS_RECORDER},
- { "fileClose", htsp_method_file_close, ACCESS_RECORDER},
- { "fileStat", htsp_method_file_stat, ACCESS_RECORDER},
- { "fileSeek", htsp_method_file_seek, ACCESS_RECORDER},
+ { "fileOpen", htsp_method_file_open, ACCESS_HTSP_RECORDER},
+ { "fileRead", htsp_method_file_read, ACCESS_HTSP_RECORDER},
+ { "fileClose", htsp_method_file_close, ACCESS_HTSP_RECORDER},
+ { "fileStat", htsp_method_file_stat, ACCESS_HTSP_RECORDER},
+ { "fileSeek", htsp_method_file_seek, ACCESS_HTSP_RECORDER},
};
#define NUM_METHODS (sizeof(htsp_methods) / sizeof(htsp_methods[0]))
var list = 'enabled,username,password,prefix,' +
'webui,admin,' +
'streaming,adv_streaming,htsp_streaming,' +
- 'profile,conn_limit,dvr,dvr_config,' +
+ 'profile,conn_limit,dvr,htsp_dvr,dvr_config,' +
'channel_min,channel_max,channel_tag,comment';
tvheadend.idnode_grid(panel, {
adv_streaming: { width: 200 },
htsp_streaming: { width: 200 },
dvr: { width: 150 },
+ htsp_dvr: { width: 150 },
webui: { width: 140 },
admin: { width: 100 },
conn_limit: { width: 160 },
return HTTP_STATUS_NOT_FOUND;
if(hc->hc_access == NULL ||
- (access_verify2(hc->hc_access, ACCESS_STREAMING) &&
- access_verify2(hc->hc_access, ACCESS_ADVANCED_STREAMING) &&
- access_verify2(hc->hc_access, ACCESS_RECORDER)))
+ access_verify2(hc->hc_access, ACCESS_OR |
+ ACCESS_STREAMING |
+ ACCESS_ADVANCED_STREAMING |
+ ACCESS_RECORDER))
return HTTP_STATUS_UNAUTHORIZED;
playlist = http_arg_get(&hc->hc_req_args, "playlist");
return HTTP_STATUS_BAD_REQUEST;
if(hc->hc_access == NULL ||
- (access_verify2(hc->hc_access, ACCESS_STREAMING) &&
- access_verify2(hc->hc_access, ACCESS_ADVANCED_STREAMING) &&
- access_verify2(hc->hc_access, ACCESS_RECORDER)))
+ (access_verify2(hc->hc_access, ACCESS_OR |
+ ACCESS_STREAMING |
+ ACCESS_ADVANCED_STREAMING |
+ ACCESS_RECORDER)))
return HTTP_STATUS_UNAUTHORIZED;
pthread_mutex_lock(&global_lock);
ACCESS_STREAMING |
ACCESS_ADVANCED_STREAMING |
ACCESS_HTSP_STREAMING |
+ ACCESS_HTSP_RECORDER |
ACCESS_RECORDER)))
return HTTP_STATUS_UNAUTHORIZED;