From: E.Smith <31170571+azlm8t@users.noreply.github.com> Date: Wed, 22 Aug 2018 22:38:48 +0000 (+0100) Subject: Tvshows/tvmovies should have separate config variables. X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=b806da564050731818fff1372c2480ec01d8e540;p=thirdparty%2Ftvheadend.git Tvshows/tvmovies should have separate config variables. During tidyup, the tvmovies incorrectly used tvshows as its directory name when using the "$q" tag for recordings. --- diff --git a/src/dvr/dvr_rec.c b/src/dvr/dvr_rec.c index 3a539faa7..c54db6958 100644 --- a/src/dvr/dvr_rec.c +++ b/src/dvr/dvr_rec.c @@ -378,6 +378,15 @@ dvr_sub_episode(const char *id, const char *fmt, const void *aux, char *tmp, siz static const char * _dvr_get_tvmovies_subdir(const dvr_entry_t *de) +{ + dvr_config_t *config = de->de_config; + if (config && !strempty(config->dvr_format_tvmovies_subdir)) + return config->dvr_format_tvmovies_subdir; + return "tvmovies"; +} + +static const char * +_dvr_get_tvshows_subdir(const dvr_entry_t *de) { dvr_config_t *config = de->de_config; if (config && !strempty(config->dvr_format_tvshows_subdir)) @@ -555,7 +564,7 @@ _dvr_sub_scraper_friendly(const char *id, const char *fmt, const void *aux, char * "title - subtitle" (without genre_subdir, no epg info on show) */ if (with_genre_subdir) - tvh_strlcatf(tmp, tmplen, offset, "%s/", _dvr_get_tvmovies_subdir(de)); + tvh_strlcatf(tmp, tmplen, offset, "%s/", _dvr_get_tvshows_subdir(de)); if (!strempty(title_buf)) tvh_strlcatf(tmp, tmplen, offset, "%s/%s", title_buf, title_buf); if (!strempty(episode_buf))