* fixed bug in default formatter (wrongly assumed part index starts with 0)
This commit is contained in:
parent
97f2bca288
commit
2bfef63d3c
|
@ -17,13 +17,13 @@ class MovieFormatter implements MatchFormatter {
|
|||
return match.getValue() instanceof MoviePart;
|
||||
}
|
||||
|
||||
|
||||
|
||||
@Override
|
||||
public String preview(Match<?, ?> match) {
|
||||
return format(match);
|
||||
}
|
||||
|
||||
|
||||
|
||||
@Override
|
||||
public String format(Match<?, ?> match) {
|
||||
MoviePart video = (MoviePart) match.getValue();
|
||||
|
@ -32,8 +32,9 @@ class MovieFormatter implements MatchFormatter {
|
|||
// format as single-file or multi-part movie
|
||||
name.format("%s (%d)", video.getName(), video.getYear());
|
||||
|
||||
if (video.getPartCount() > 1)
|
||||
name.format(" CD%d", video.getPartIndex() + 1);
|
||||
if (video.getPartCount() > 1) {
|
||||
name.format(".CD%d", video.getPartIndex());
|
||||
}
|
||||
|
||||
// remove path separators if the name contains any / or \
|
||||
return replacePathSeparators(name.out().toString());
|
||||
|
|
Loading…
Reference in New Issue