Bug #5987
PVR profiles dosnt work as it should
0%
Description
expexted: TV records should be placed in the folder which is declared in the users profile.
actually: TV records are always stored in default profiles recording folder no matter which user create the record
History
Updated by saen acro about 4 years ago
Recording location is in default recording profile.
Permissions are very strang in this part.
Also User A cannot watch records of User B without permissions to write.
Updated by Alfred Neumann almost 4 years ago
Same here but only for direct and time recordings, in case of timer (auto recording) the pvr profile is stored correct. Also the user from kodi is stored correct.
Updated by Alfred Neumann over 3 years ago
No changes in version 4.3-1961, no matter which dvr configuration is defined in the user profile after creating the recording, the DVR configuration is always the "Default Profile". however, users and owners are correctly transferred.
Updated by Dietmar Konermann almost 3 years ago
maybe someone would like to give this litte hack a try?
diff --git a/src/dvr/dvr_db.c b/src/dvr/dvr_db.c
index 13de1de96..77eb29e0a 100644
--- a/src/dvr/dvr_db.c
++ b/src/dvr/dvr_db.c@ -1036,8 +1036,10
@ dvr_entry_create(const char *uuid, htsmsg_t *conf, int clone)
dvr_entry_t *de, *de2;
int64_t start, stop, create, watched, now;
htsmsg_t *m;
htsmsg_field_t *f;
char ubuf[UUID_HEX_SIZE], ubuf2[UUID_HEX_SIZE];
const char *s;
+ access_t *a;
if (conf) {
if (htsmsg_get_s64(conf, "start", &start))
@ -1060,6 +1062,15
@ dvr_entry_create(const char *uuid, htsmsg_t *conf, int clone)
de->de_enabled = 1;
de->de_config = dvr_config_find_by_name_default(NULL);
+ a = access_get_by_username(htsmsg_get_str(conf, "owner") ?: "");
+ if (a->aa_dvrcfgs)
+ HTSMSG_FOREACH(f, a->aa_dvrcfgs) {
+ dvr_config_t *cfg = dvr_config_find_by_uuid(htsmsg_field_get_str(f) ?: "");
+ if (cfg && cfg->dvr_enabled) {
+ de->de_config = dvr_config_find_by_name_default(cfg->dvr_config_name ?: "");
+ break;
+ }
+ }
if (de->de_config)
LIST_INSERT_HEAD(&de->de_config->dvr_entries, de, de_config_link);
de->de_pri = DVR_PRIO_DEFAULT;
Updated by Dietmar Konermann almost 3 years ago
Sorry, bad formatting
diff --git a/src/dvr/dvr_db.c b/src/dvr/dvr_db.c index 13de1de96..77eb29e0a 100644 --- a/src/dvr/dvr_db.c +++ b/src/dvr/dvr_db.c @@ -1036,8 +1036,10 @@ dvr_entry_create(const char *uuid, htsmsg_t *conf, int clone) dvr_entry_t *de, *de2; int64_t start, stop, create, watched, now; htsmsg_t *m; + htsmsg_field_t *f; char ubuf[UUID_HEX_SIZE], ubuf2[UUID_HEX_SIZE]; const char *s; + access_t *a; if (conf) { if (htsmsg_get_s64(conf, "start", &start)) @@ -1060,6 +1062,15 @@ dvr_entry_create(const char *uuid, htsmsg_t *conf, int clone) de->de_enabled = 1; de->de_config = dvr_config_find_by_name_default(NULL); + a = access_get_by_username(htsmsg_get_str(conf, "owner") ?: ""); + if (a->aa_dvrcfgs) + HTSMSG_FOREACH(f, a->aa_dvrcfgs) { + dvr_config_t *cfg = dvr_config_find_by_uuid(htsmsg_field_get_str(f) ?: ""); + if (cfg && cfg->dvr_enabled) { + de->de_config = dvr_config_find_by_name_default(cfg->dvr_config_name ?: ""); + break; + } + } if (de->de_config) LIST_INSERT_HEAD(&de->de_config->dvr_entries, de, de_config_link); de->de_pri = DVR_PRIO_DEFAULT;