Bug #5930
openuser config doesn't force DVR profile
0%
Description
I have a user configuration entry that has a specific "DVR configuration profile".
When that user creates recordings via Kodi, the DVR configuration is set to "(default config)" instead of the one ticked in the user config.
Updated by Flole Systems almost 5 years ago
Please specify what version you are using (the exact version number). Latest git master will be inaccurate on the next commit. This will be helpful in case someone looks at the issue in a few months.
Updated by Martin Walter almost 5 years ago
- https://github.com/kodi-pvr/pvr.hts/pull/460 (please take note of the table, you'll find the exact version number I tested there, too)
- Ticket #5920 (which can be closed as redundant, if you prefer to continue here)
Updated by Luis Alves almost 5 years ago
Latest master is currently: https://github.com/tvheadend/tvheadend/tree/ce09077056f9c6558c188d135cec3be85cc9c200
Updated by Dietmar Konermann over 3 years ago
Same here with Build: 4.3-1994~gc7b713edb.
The configured recording profile for the a given (restricted) user is simply ignored.
Recordings start with the default profile... should the user have access to that at all?
Cheers
Dietmar.
Updated by Dietmar Konermann over 3 years ago
maybe someone likes to try this little hack...
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 Dreamcat 4 about 3 years ago
probably someone should raise a PR to fix this
Updated by Christian Hermansen about 3 years ago
Dietmar Konermann wrote:
maybe someone likes to try this little hack...
[...]
Thank you for the patch.
I've tried it with version 4.3-2009~g1295dd2be and it seems to be working.
Cheers
Christian
Updated by Dreamcat 4 about 3 years ago
pr is raised,