mirror of
https://github.com/mitb-archive/filebot
synced 2025-03-09 22:09:47 -04:00
* 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;
|
return match.getValue() instanceof MoviePart;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public String preview(Match<?, ?> match) {
|
public String preview(Match<?, ?> match) {
|
||||||
return format(match);
|
return format(match);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public String format(Match<?, ?> match) {
|
public String format(Match<?, ?> match) {
|
||||||
MoviePart video = (MoviePart) match.getValue();
|
MoviePart video = (MoviePart) match.getValue();
|
||||||
@ -32,8 +32,9 @@ class MovieFormatter implements MatchFormatter {
|
|||||||
// format as single-file or multi-part movie
|
// format as single-file or multi-part movie
|
||||||
name.format("%s (%d)", video.getName(), video.getYear());
|
name.format("%s (%d)", video.getName(), video.getYear());
|
||||||
|
|
||||||
if (video.getPartCount() > 1)
|
if (video.getPartCount() > 1) {
|
||||||
name.format(" CD%d", video.getPartIndex() + 1);
|
name.format(".CD%d", video.getPartIndex());
|
||||||
|
}
|
||||||
|
|
||||||
// remove path separators if the name contains any / or \
|
// remove path separators if the name contains any / or \
|
||||||
return replacePathSeparators(name.out().toString());
|
return replacePathSeparators(name.out().toString());
|
||||||
|
Loading…
x
Reference in New Issue
Block a user