1
0
mirror of https://github.com/mitb-archive/filebot synced 2024-11-04 16:35:08 -05:00

* more restrictive 1x01 SxE pattern (episode part must be 2-digits)

* don't load args4j if we don't need to (little bit faster startup)
* fixed dnd of episode list (was disabled)
This commit is contained in:
Reinhard Pointner 2009-08-27 23:30:21 +00:00
parent cd1ea72c88
commit 64eb0ab911
6 changed files with 15 additions and 14 deletions

View File

@ -140,11 +140,13 @@ public class Main {
private static ArgumentBean initializeArgumentBean(String... args) {
ArgumentBean argumentBean = new ArgumentBean();
try {
CmdLineParser parser = new CmdLineParser(argumentBean);
parser.parseArgument(args);
} catch (Exception e) {
Logger.getLogger(Main.class.getName()).log(Level.WARNING, e.getMessage(), e);
if (args != null && args.length > 0) {
try {
CmdLineParser parser = new CmdLineParser(argumentBean);
parser.parseArgument(args);
} catch (Exception e) {
Logger.getLogger(Main.class.getName()).log(Level.WARNING, e.getMessage(), e);
}
}
return argumentBean;

View File

@ -24,7 +24,7 @@ public class SeasonEpisodeMatcher {
patterns[0] = new SeasonEpisodePattern("(?<!\\p{Alnum})[Ss](\\d{1,2})[^\\p{Alnum}]{0,3}[Ee](\\d{1,3})(?!\\p{Digit})");
// match patterns like 1x01, 1.02, ..., 1x01a, 10x01, 10.02, ...
patterns[1] = new SeasonEpisodePattern("(?<!\\p{Alnum})(\\d{1,2})[x.](\\d{1,3})(?!\\p{Digit})");
patterns[1] = new SeasonEpisodePattern("(?<!\\p{Alnum})(\\d{1,2})[x.](\\d{2,3})(?!\\p{Digit})");
// match patterns like 01, 102, 1003 (enclosed in separators)
patterns[2] = new SeasonEpisodePattern("(?<=^|[._ ])([0-1]?\\d?)(\\d{2})(?=[._ ]|$)") {

View File

@ -290,9 +290,8 @@ public class EpisodeListPanel extends AbstractSearchPanel<EpisodeListProvider, E
public EpisodeListTab() {
// initialize dnd and clipboard export handler for episode list
EpisodeListExportHandler exportHandler = new EpisodeListExportHandler(this);
getTransferHandler().setExportHandler(exportHandler);
getTransferHandler().setClipboardHandler(exportHandler);
setExportHandler(new EpisodeListExportHandler(this));
getTransferHandler().setClipboardHandler(new EpisodeListExportHandler(this));
// allow removal of episode list entries
getRemoveAction().setEnabled(true);

View File

@ -29,14 +29,14 @@ expr[d2]: media.durationString
expr[d3]: media.overallBitRateString
# media info expressions [video]
expr[e1]: video.codec
expr[e1]: video.codecID
expr[e2]: video.frameRate
expr[e3]: video.displayAspectRatioString
expr[e4]: video.height
expr[e5]: video.interlacementString
expr[e5]: video.scanType
# media info expressions [audio]
expr[f1]: audio.codec
expr[f1]: audio.format
expr[f2]: audio.channels
expr[f3]: audio.bitRateString
expr[f4]: audio.language

View File

@ -137,7 +137,7 @@ public class TheTVDBClient implements EpisodeListProvider {
if (seasonNumber.equals("0")) {
String airsBefore = getTextContent("airsbefore_season", node);
seasonNumber = airsBefore.isEmpty() ? null : airsBefore;
seasonNumber = airsBefore == null || airsBefore.isEmpty() ? null : airsBefore;
episodeNumber = "Special";
}

View File

@ -32,7 +32,7 @@ public class TheTVDBClientTest {
// test default language and query escaping (blanks)
List<SearchResult> results = thetvdb.search("babylon 5");
assertEquals(2, results.size());
assertEquals(1, results.size());
TheTVDBSearchResult first = (TheTVDBSearchResult) results.get(0);