dvr_entry_t *de = (dvr_entry_t *)o;
const char *lang;
char buf1[32], buf2[32];
- if (de->de_epnum.e_num) {
+ if (de->de_epnum.e_num || de->de_epnum.s_num) {
lang = idnode_lang(o);
snprintf(buf1, sizeof(buf1), "%s %%d", tvh_gettext_lang(lang, N_("Season")));
snprintf(buf2, sizeof(buf2), "%s %%d", tvh_gettext_lang(lang, N_("Episode")));
size_t i = 0;
if (!epnum || !buf || !len) return 0;
buf[0] = '\0';
- if (epnum->e_num) {
+ if (epnum->e_num || epnum->s_num) {
if (pre) tvh_strlcatf(buf, len, i, "%s", pre);
if (sfmt && epnum->s_num) {
tvh_strlcatf(buf, len, i, sfmt, epnum->s_num);
if (cfmt && epnum->s_cnt)
tvh_strlcatf(buf, len, i, cfmt, epnum->s_cnt);
- if (sep) tvh_strlcatf(buf, len, i, "%s", sep);
+ if (sep && efmt && epnum->e_num) tvh_strlcatf(buf, len, i, "%s", sep);
}
- tvh_strlcatf(buf, len, i, efmt, epnum->e_num);
+ if (efmt && epnum->e_num)
+ tvh_strlcatf(buf, len, i, efmt, epnum->e_num);
if (cfmt && epnum->e_cnt)
tvh_strlcatf(buf, len, i, cfmt, epnum->e_cnt);
} else if (epnum->text) {