1
0
mirror of https://github.com/mitb-archive/filebot synced 2024-11-02 00:15:02 -04:00

Improved single/multi episode title default format {t}

This commit is contained in:
Reinhard Pointner 2016-08-23 12:58:27 +08:00
parent bdc81b3501
commit aab1c33859

View File

@ -63,6 +63,7 @@ import net.filebot.web.EpisodeFormat;
import net.filebot.web.EpisodeListProvider;
import net.filebot.web.Movie;
import net.filebot.web.MoviePart;
import net.filebot.web.MultiEpisode;
import net.filebot.web.SeriesInfo;
import net.filebot.web.SimpleDate;
import net.filebot.web.SortOrder;
@ -177,8 +178,15 @@ public class MediaBindingBean {
return getMusic().getTrackTitle() != null ? getMusic().getTrackTitle() : getMusic().getTitle();
}
// enforce title length limit by default
return truncateText(EpisodeFormat.SeasonEpisode.formatMultiTitle(getEpisodes()), NamingStandard.TITLE_MAX_LENGTH);
if (infoObject instanceof Episode) {
// support multi-episode title formatting
String t = infoObject instanceof MultiEpisode ? EpisodeFormat.SeasonEpisode.formatMultiTitle(getEpisodes()) : getEpisode().getTitle();
// enforce title length limit by default
return truncateText(t, NamingStandard.TITLE_MAX_LENGTH);
}
return null;
}
@Define("d")