DVR: Introduce 'Do Not Include Title To Filename', fixes #2291
This commit is contained in:
parent
5f5f554e40
commit
28dc589581
2 changed files with 27 additions and 16 deletions
|
@ -48,6 +48,7 @@ typedef struct dvr_config {
|
|||
int dvr_dir_per_day;
|
||||
int dvr_channel_dir;
|
||||
int dvr_channel_in_title;
|
||||
int dvr_omit_title;
|
||||
int dvr_date_in_title;
|
||||
int dvr_time_in_title;
|
||||
int dvr_whitespace_in_title;
|
||||
|
@ -87,17 +88,18 @@ extern struct dvr_entry_list dvrentries;
|
|||
#define DVR_DIR_PER_DAY 0x2
|
||||
#define DVR_DIR_PER_CHANNEL 0x4
|
||||
#define DVR_CHANNEL_IN_TITLE 0x8
|
||||
#define DVR_DATE_IN_TITLE 0x10
|
||||
#define DVR_TIME_IN_TITLE 0x20
|
||||
#define DVR_WHITESPACE_IN_TITLE 0x40
|
||||
#define DVR_DIR_PER_TITLE 0x80
|
||||
#define DVR_EPISODE_IN_TITLE 0x100
|
||||
#define DVR_CLEAN_TITLE 0x200
|
||||
#define DVR_TAG_FILES 0x400
|
||||
#define DVR_SKIP_COMMERCIALS 0x800
|
||||
#define DVR_SUBTITLE_IN_TITLE 0x1000
|
||||
#define DVR_EPISODE_BEFORE_DATE 0x2000
|
||||
#define DVR_EPISODE_DUPLICATE_DETECTION 0x4000
|
||||
#define DVR_OMIT_TITLE 0x10
|
||||
#define DVR_DATE_IN_TITLE 0x20
|
||||
#define DVR_TIME_IN_TITLE 0x40
|
||||
#define DVR_WHITESPACE_IN_TITLE 0x80
|
||||
#define DVR_DIR_PER_TITLE 0x100
|
||||
#define DVR_EPISODE_IN_TITLE 0x200
|
||||
#define DVR_CLEAN_TITLE 0x400
|
||||
#define DVR_TAG_FILES 0x800
|
||||
#define DVR_SKIP_COMMERCIALS 0x1000
|
||||
#define DVR_SUBTITLE_IN_TITLE 0x2000
|
||||
#define DVR_EPISODE_BEFORE_DATE 0x4000
|
||||
#define DVR_EPISODE_DUPLICATE_DETECTION 0x8000
|
||||
|
||||
typedef enum {
|
||||
DVR_PRIO_IMPORTANT,
|
||||
|
|
|
@ -246,8 +246,9 @@ dvr_make_title(char *output, size_t outlen, dvr_entry_t *de)
|
|||
else
|
||||
output[0] = 0;
|
||||
|
||||
snprintf(output + strlen(output), outlen - strlen(output),
|
||||
"%s", lang_str_get(de->de_title, NULL));
|
||||
if ((cfg->dvr_flags & DVR_OMIT_TITLE) == 0)
|
||||
snprintf(output + strlen(output), outlen - strlen(output),
|
||||
"%s", lang_str_get(de->de_title, NULL));
|
||||
|
||||
if(cfg->dvr_flags & DVR_EPISODE_BEFORE_DATE) {
|
||||
if(cfg->dvr_flags & DVR_EPISODE_IN_TITLE) {
|
||||
|
@ -1946,6 +1947,7 @@ dvr_config_update_flags(dvr_config_t *cfg)
|
|||
if (cfg->dvr_dir_per_day) r |= DVR_DIR_PER_DAY;
|
||||
if (cfg->dvr_channel_dir) r |= DVR_DIR_PER_CHANNEL;
|
||||
if (cfg->dvr_channel_in_title) r |= DVR_CHANNEL_IN_TITLE;
|
||||
if (cfg->dvr_omit_title) r |= DVR_OMIT_TITLE;
|
||||
if (cfg->dvr_date_in_title) r |= DVR_DATE_IN_TITLE;
|
||||
if (cfg->dvr_time_in_title) r |= DVR_TIME_IN_TITLE;
|
||||
if (cfg->dvr_whitespace_in_title) r |= DVR_WHITESPACE_IN_TITLE;
|
||||
|
@ -2432,6 +2434,13 @@ const idclass_t dvr_config_class = {
|
|||
.off = offsetof(dvr_config_t, dvr_episode_in_title),
|
||||
.group = 4,
|
||||
},
|
||||
{
|
||||
.type = PT_BOOL,
|
||||
.id = "episode-before-date",
|
||||
.name = "Put Episode In Filename Before Date And Time",
|
||||
.off = offsetof(dvr_config_t, dvr_episode_before_date),
|
||||
.group = 4,
|
||||
},
|
||||
{
|
||||
.type = PT_BOOL,
|
||||
.id = "subtitle-in-title",
|
||||
|
@ -2441,9 +2450,9 @@ const idclass_t dvr_config_class = {
|
|||
},
|
||||
{
|
||||
.type = PT_BOOL,
|
||||
.id = "episode-before-date",
|
||||
.name = "Put Episode In Filename Before Date And Time",
|
||||
.off = offsetof(dvr_config_t, dvr_episode_before_date),
|
||||
.id = "omit-title",
|
||||
.name = "Do Not Include Title To Filename",
|
||||
.off = offsetof(dvr_config_t, dvr_omit_title),
|
||||
.group = 5,
|
||||
},
|
||||
{
|
||||
|
|
Loading…
Add table
Reference in a new issue