]> git.ipfire.org Git - thirdparty/tvheadend.git/commitdiff
Tvshows/tvmovies should have separate config variables.
authorE.Smith <31170571+azlm8t@users.noreply.github.com>
Wed, 22 Aug 2018 22:38:48 +0000 (23:38 +0100)
committerJaroslav Kysela <perex@perex.cz>
Mon, 3 Sep 2018 13:47:44 +0000 (15:47 +0200)
During tidyup, the tvmovies incorrectly used tvshows as
its directory name when using the "$q" tag for recordings.

src/dvr/dvr_rec.c

index 3a539faa7bdceb1b1f4927a3df753726ef3699c9..c54db69582ce0d603e6b5caf4f94f7cc33706fa2 100644 (file)
@@ -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))