1
0
mirror of https://github.com/mitb-archive/filebot synced 2025-01-12 06:18:01 -05:00
filebot/source/net/filebot/subtitle/SubtitleFormat.java
Reinhard Pointner 8299e849aa * Format Source
2015-07-25 22:47:19 +00:00

51 lines
860 B
Java

package net.filebot.subtitle;
import net.filebot.MediaTypes;
import net.filebot.util.FileUtilities.ExtensionFileFilter;
public enum SubtitleFormat {
SubRip {
@Override
public SubtitleReader newReader(Readable readable) {
return new SubRipReader(readable);
}
},
MicroDVD {
@Override
public SubtitleReader newReader(Readable readable) {
return new MicroDVDReader(readable);
}
},
SubViewer {
@Override
public SubtitleReader newReader(Readable readable) {
return new SubViewerReader(readable);
}
},
SubStationAlpha {
@Override
public SubtitleReader newReader(Readable readable) {
return new SubStationAlphaReader(readable);
}
};
public abstract SubtitleReader newReader(Readable readable);
public ExtensionFileFilter getFilter() {
return MediaTypes.getDefaultFilter("subtitle/" + this.name());
}
}