+ REQUIRE min JRE 7 and update all libs

This commit is contained in:
Reinhard Pointner 2014-03-18 20:16:39 +00:00
parent 9feb10f844
commit cf8b3d835f
37 changed files with 64 additions and 53 deletions

View File

@ -68,7 +68,7 @@
<zipfileset src="${dir.dist}/filebot.jar" />
<!-- include libs -->
<zipfileset src="${dir.lib}/xercesImpl.jar">
<zipfileset src="${dir.lib}/xercesMinimal.jar">
<include name="org/apache/**" />
<include name="org/w3c/dom/html/**" />
</zipfileset>
@ -97,7 +97,11 @@
<include name="ca/odell/glazedlists/**" />
</zipfileset>
<zipfileset src="${dir.lib}/miglayout.jar">
<zipfileset src="${dir.lib}/miglayout-core.jar">
<include name="net/miginfocom/**" />
</zipfileset>
<zipfileset src="${dir.lib}/miglayout-swing.jar">
<include name="net/miginfocom/**" />
</zipfileset>
@ -125,11 +129,11 @@
<include name="build-info.properties" />
</zipfileset>
<zipfileset src="${dir.lib}/slf4j.jar">
<zipfileset src="${dir.lib}/slf4j-api.jar">
<include name="org/slf4j/**" />
</zipfileset>
<zipfileset src="${dir.lib}/slf4j-jdk.jar">
<zipfileset src="${dir.lib}/slf4j-jdk14.jar">
<include name="org/slf4j/**" />
</zipfileset>
@ -142,7 +146,7 @@
<include name="com/sun/jna/**" />
</zipfileset>
<zipfileset src="${dir.lib}/platform.jar">
<zipfileset src="${dir.lib}/jna-platform.jar">
<include name="com/sun/jna/platform/win32/**" />
</zipfileset>
@ -217,7 +221,7 @@
<copy tofile="${dir.dist}/appbundle/FileBot.jar" file="${path.fatjar}" />
<!-- build app bundle folder and add native libs -->
<jarbundler dir="${dir.dist}" name="${title}" version="${version}" build="${svn.revision}" icon="${dir.installer}/appbundle/icon.icns" bundleid="net.sourceforge.filebot" jar="${dir.dist}/appbundle/FileBot.jar" stubfile="${dir.installer}/appbundle/JavaApplicationStub" workingdirectory="$JAVAROOT" mainclass="net.sourceforge.filebot.Main" jvmversion="1.6+">
<jarbundler dir="${dir.dist}" name="${title}" version="${version}" build="${svn.revision}" icon="${dir.installer}/appbundle/icon.icns" bundleid="net.sourceforge.filebot" jar="${dir.dist}/appbundle/FileBot.jar" stubfile="${dir.installer}/appbundle/JavaApplicationStub" workingdirectory="$JAVAROOT" mainclass="net.sourceforge.filebot.Main" jvmversion="1.7+">
<javaproperty name="application.deployment" value="app" />
<javaproperty name="unixfs" value="false" />
<javaproperty name="useExtendedFileAttributes" value="true" />
@ -460,7 +464,7 @@
<mkdir dir="${dir.build}" />
<!-- compile -->
<javac srcdir="${dir.source}:${dir.test}" destdir="${dir.build}" target="1.6" source="1.6" encoding="utf-8" debug="true" debuglevel="lines,vars,source" includeAntRuntime="false">
<javac srcdir="${dir.source}:${dir.test}" destdir="${dir.build}" target="1.7" source="1.7" encoding="utf-8" debug="true" debuglevel="lines,vars,source" includeAntRuntime="false">
<classpath>
<fileset dir="${dir.lib}" includes="*.jar" />
<pathelement location="${dir.lib}/build/junit.jar" />

View File

@ -43,12 +43,13 @@
<jar href="commons-io.jar" download="eager" />
<jar href="args4j.jar" download="eager" />
<jar href="jna.jar" download="eager" />
<jar href="miglayout.jar" download="eager" />
<jar href="miglayout-core.jar" download="eager" />
<jar href="miglayout-swing.jar" download="eager" />
<jar href="glazedlists.jar" download="eager" />
<jar href="ehcache.jar" download="eager" />
<jar href="simmetrics.jar" download="eager" />
<jar href="slf4j.jar" download="eager" />
<jar href="slf4j-jdk.jar" download="eager" />
<jar href="slf4j-api.jar" download="eager" />
<jar href="slf4j-jdk14.jar" download="eager" />
<jar href="jgat-custom.jar" download="eager" />
<jar href="xmlrpc.jar" download="eager" />
<jar href="xz.jar" download="eager" />
@ -58,7 +59,7 @@
<jar href="jacksum.jar" download="lazy" />
<jar href="jsoup.jar" download="lazy" />
<jar href="nekohtml.jar" download="lazy" part="scraper" />
<jar href="xercesImpl.jar" download="lazy" part="scraper" />
<jar href="xercesMinimal.jar" download="lazy" part="scraper" />
<jar href="mediainfo.jar" download="lazy" part="native" />
<jar href="sevenzipjbinding.jar" download="lazy" part="native" />
<jar href="rsyntaxtextarea.jar" download="eager" />

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

BIN
lib/miglayout-swing.jar Normal file

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

BIN
lib/slf4j-api.jar Normal file

Binary file not shown.

Binary file not shown.

BIN
lib/slf4j-jdk14.jar Normal file

Binary file not shown.

Binary file not shown.

Binary file not shown.

BIN
lib/xercesMinimal.jar Normal file

Binary file not shown.

Binary file not shown.

View File

@ -45,11 +45,19 @@ public class MetaAttributes {
}
public void setObject(Object object) {
metaAttributeView.put(METADATA_KEY, JsonWriter.toJson(object));
try {
metaAttributeView.put(METADATA_KEY, JsonWriter.objectToJson(object));
} catch (IOException e) {
throw new IllegalStateException(e);
}
}
public Object getObject() {
return JsonReader.toJava(metaAttributeView.get(METADATA_KEY));
try {
return JsonReader.jsonToJava(metaAttributeView.get(METADATA_KEY));
} catch (IOException e) {
return null;
}
}
public void clear() {

View File

@ -19,6 +19,7 @@ import java.awt.event.WindowEvent;
import java.beans.PropertyChangeEvent;
import java.beans.PropertyChangeListener;
import java.io.File;
import java.io.IOException;
import java.net.URI;
import java.text.Format;
import java.util.Collections;
@ -420,7 +421,7 @@ public class FormatDialog extends JDialog {
try {
// restore sample from user preferences
String sample = mode.persistentSample().getValue();
info = JsonReader.toJava(sample);
info = JsonReader.jsonToJava(sample);
if (info == null) {
throw new NullPointerException();
}
@ -429,7 +430,7 @@ public class FormatDialog extends JDialog {
// restore sample from application properties
ResourceBundle bundle = ResourceBundle.getBundle(getClass().getName());
String sample = bundle.getString(mode.key() + ".sample");
info = JsonReader.toJava(sample);
info = JsonReader.jsonToJava(sample);
} catch (Exception illegalSample) {
throw new RuntimeException(illegalSample); // won't happen
}
@ -639,9 +640,13 @@ public class FormatDialog extends JDialog {
// change sample
sample = new MediaBindingBean(info, file, Collections.singletonMap(file, info));
// remember
mode.persistentSample().setValue(info == null ? "" : JsonWriter.toJson(info));
persistentSampleFile.setValue(file == null ? "" : sample.getMediaFile().getAbsolutePath());
// remember sample
try {
mode.persistentSample().setValue(info == null ? "" : JsonWriter.objectToJson(info));
persistentSampleFile.setValue(file == null ? "" : sample.getMediaFile().getAbsolutePath());
} catch (IOException e) {
Logger.getLogger(FormatDialog.class.getName()).log(Level.WARNING, e.getMessage(), e);
}
// reevaluate everything
fireSampleChanged();

View File

@ -49,7 +49,7 @@ public class ExpressionFormatTest {
assertEquals("second", new TestScriptFormat("{value.after(/[^a-z]/)}").format("first|second"));
// replace trailing braces
assertEquals("The IT Crowd", new TestScriptFormat("{value.replaceTrailingBraces()}").format("The IT Crowd (UK)"));
assertEquals("The IT Crowd", new TestScriptFormat("{value.replaceTrailingBrackets()}").format("The IT Crowd (UK)"));
// replace part
assertEquals("Today Is the Day, Part 1", new TestScriptFormat("{value.replacePart(', Part $1')}").format("Today Is the Day (1)"));
@ -101,7 +101,7 @@ public class ExpressionFormatTest {
format.format(new SimpleBindings());
// check message
assertEquals("BindingError: \"xyz\": undefined", format.caughtScriptException().getMessage());
assertEquals("BindingException: \"xyz\": undefined", format.caughtScriptException().getMessage());
}
@ -111,7 +111,7 @@ public class ExpressionFormatTest {
format.format("test");
// check message
assertEquals("BindingError: \"xyz\": undefined", format.caughtScriptException().getMessage());
assertEquals("BindingException: \"xyz\": undefined", format.caughtScriptException().getMessage());
}

View File

@ -1,7 +1,5 @@
package net.sourceforge.filebot.similarity;
import static net.sourceforge.filebot.similarity.EpisodeMetrics.*;
import static org.junit.Assert.*;
@ -11,59 +9,55 @@ import java.util.List;
import net.sourceforge.filebot.web.Date;
import net.sourceforge.filebot.web.Episode;
import net.sourceforge.filebot.web.TheTVDBSearchResult;
import org.junit.Test;
public class EpisodeMetricsTest {
@Test
public void substringMetrics() {
Episode eY1T1 = new Episode("Doctor Who", new Date(2005, 0, 0), 1, 1, "Rose", null);
Episode eY1T1 = new Episode("Doctor Who", new Date(2005, 0, 0), 1, 1, "Rose", new TheTVDBSearchResult("Doctor Who", -1));
// Episode eY2T2 = new Episode("Doctor Who", new Date(1963, 0, 0), 1, 1, "An Unearthly Child");
File fY1T1 = new File("Doctor Who (2005)/Doctor Who - 1x01 - Rose");
File fY2T2 = new File("Doctor Who (1963)/Doctor Who - 1x01 - An Unearthly Child");
assertEquals(3.0 / 3, SubstringFields.getSimilarity(eY1T1, fY1T1), 0);
assertEquals(2.0 / 3, SubstringFields.getSimilarity(eY1T1, fY2T2), 0.01);
assertEquals(2.0 / 3, SubstringFields.getSimilarity(eY1T1, fY1T1), 0.01);
assertEquals(1.0 / 3, SubstringFields.getSimilarity(eY1T1, fY2T2), 0.01);
}
@Test
public void nameIgnoreEmbeddedChecksum() {
assertEquals(1, Name.getSimilarity("test", "test [EF62DF13]"), 0);
}
@Test
public void numericIgnoreEmbeddedChecksum() {
assertEquals(1, Numeric.getSimilarity("S01E02", "Season 1, Episode 2 [00A01E02]"), 0);
}
@Test
public void normalizeFile() {
assertEquals("abc", EpisodeMetrics.normalizeObject(new File("/folder/abc[EF62DF13].txt")));
}
@Test
public void matcherLevel2() throws Exception {
List<File> files = new ArrayList<File>();
List<Episode> episodes = new ArrayList<Episode>();
files.add(new File("Greek/Greek - S01E19 - No Campus for Old Rules"));
files.add(new File("Veronica Mars - Season 1/Veronica Mars [1x19] Hot Dogs"));
episodes.add(new Episode("Veronica Mars", null, 1, 19, "Hot Dogs", null));
episodes.add(new Episode("Greek", null, 1, 19, "No Campus for Old Rules", null));
episodes.add(new Episode("Veronica Mars", null, 1, 19, "Hot Dogs", new TheTVDBSearchResult("Veronica Mars", -1)));
episodes.add(new Episode("Greek", null, 1, 19, "No Campus for Old Rules", new TheTVDBSearchResult("Greek", -1)));
SimilarityMetric[] metrics = new SimilarityMetric[] { EpisodeIdentifier, SubstringFields };
List<Match<File, Episode>> m = new Matcher<File, Episode>(files, episodes, true, metrics).match();
assertEquals("Greek - S01E19 - No Campus for Old Rules", m.get(0).getValue().getName());
assertEquals("Greek - 1x19 - No Campus for Old Rules", m.get(0).getCandidate().toString());
assertEquals("Veronica Mars [1x19] Hot Dogs", m.get(1).getValue().getName());
assertEquals("Veronica Mars - 1x19 - Hot Dogs", m.get(1).getCandidate().toString());
}
}

View File

@ -73,7 +73,7 @@ public class AnidbClientTest {
public void getEpisodeListAll() throws Exception {
List<Episode> list = anidb.getEpisodeList(monsterSearchResult);
assertEquals(74, list.size());
assertEquals(77, list.size());
Episode first = list.get(0);
@ -90,7 +90,7 @@ public class AnidbClientTest {
public void getEpisodeListAllShortLink() throws Exception {
List<Episode> list = anidb.getEpisodeList(twelvekingdomsSearchResult);
assertEquals(45, list.size());
assertEquals(46, list.size());
Episode first = list.get(0);

View File

@ -106,7 +106,7 @@ public class IMDbClientTest {
public void getMovieDescriptor3() throws Exception {
Movie movie = imdb.getMovieDescriptor(75610, null);
assertEquals("21", movie.getName());
assertEquals("21 Up", movie.getName());
assertEquals(1977, movie.getYear());
assertEquals(75610, movie.getImdbId(), 0);
}
@ -152,7 +152,7 @@ public class IMDbClientTest {
MovieInfo movie = imdb.getImdbApiMovieInfo(new Movie(null, -1, 1287357, -1));
assertEquals("Sommersonntag", movie.getName());
assertEquals(2008, movie.getReleased().getYear());
assertEquals("2008-01-01", movie.getReleased().toString());
assertEquals("2008-06-07", movie.getReleased().toString());
}
}

View File

@ -54,17 +54,16 @@ public class TMDbClientTest {
assertEquals("Transformers", movie.getName());
assertEquals("2007-07-02", movie.getReleased().toString());
assertEquals("PG-13", movie.getCertification());
assertEquals("[en]", movie.getSpokenLanguages().toString());
assertEquals("[en, es]", movie.getSpokenLanguages().toString());
assertEquals("Shia LaBeouf", movie.getActors().get(0));
assertEquals("Michael Bay", movie.getDirector());
assertEquals("Editor", movie.getCast().get(30).getJob());
}
@Test
public void getArtwork() throws Exception {
List<Artwork> artwork = tmdb.getArtwork("tt0418279");
assertEquals("backdrops", artwork.get(0).getCategory());
assertEquals("http://d3gtl9l2a4fn1j.cloudfront.net/t/p/original/jC4bQLEEcpM8N7BjpkMtP0zPakJ.jpg", artwork.get(0).getUrl().toString());
assertEquals("http://image.tmdb.org/t/p/original/dXTeZELpoVMDOTTLnNoCpsCngwW.jpg", artwork.get(0).getUrl().toString());
}
@Test

View File

@ -55,7 +55,7 @@ public class TVRageClientTest {
public void getEpisodeListAll() throws Exception {
List<Episode> list = tvrage.getEpisodeList(buffySearchResult);
assertEquals(144, list.size());
assertEquals(143, list.size());
Episode first = list.get(0);

View File

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

View File

@ -119,7 +119,7 @@
<div class="content">
<div class="section screenshot" style="border:none; box-shadow:none; background:white; margin-left: 20px">
<a href="http://www.filebot.net/scripts/" target="_blank"><img alt="See Examples" src="images/script.png" /></a>
<a href="https://github.com/filebot/scripts" target="_blank"><img alt="See Examples" src="images/script.png" /></a>
<span class="quote">Anything is possible</span>
</div>
<div class="section about">