1
0
mirror of https://github.com/mitb-archive/filebot synced 2024-12-23 16:28:51 -05:00
This commit is contained in:
Reinhard Pointner 2011-11-13 06:33:54 +00:00
parent 6b0acd9b88
commit caef14cfa4
2 changed files with 16 additions and 1 deletions

View File

@ -9,9 +9,24 @@ import java.io.File;
import org.junit.Test;
import net.sourceforge.filebot.web.Date;
import net.sourceforge.filebot.web.Episode;
public class MatchSimilarityMetricTest {
@Test
public void substringMetrics() {
Episode eY1T1 = new Episode("Doctor Who", new Date(2005, 0, 0), 1, 1, "Rose");
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, Title.getSimilarity(eY1T1, fY1T1), 0);
assertEquals(2.0 / 3, Title.getSimilarity(eY1T1, fY2T2), 0.01);
}
@Test
public void nameIgnoreEmbeddedChecksum() {
assertEquals(1, Name.getSimilarity("test", "test [EF62DF13]"), 0);

View File

@ -147,7 +147,7 @@
<ul>
<li>Executable Jar: <a onclick="_gaq.push(['_trackPageview', '/download/FileBot.jar'])" target="_blank" href="http://sourceforge.net/projects/filebot/files/filebot/FileBot_@{version}/FileBot_@{version}.jar/download">FileBot_@{version}.jar</a> (<strong>12.5MB</strong>) <small class="comment">for Windows, Linux, Mac OS X, BSD and Solaris</small>
<ul>
<li>This package does not include the <a href="http://mediainfo.sourceforge.net/en/Download" target="_blank">MediaInfo native libraries</a>. <small class="comment">32-bit JRE requires 32-bit native code</small></li>
<li>This package does not include the <a href="http://mediainfo.sourceforge.net/en/Download" target="_blank">MediaInfo native libraries</a>. <small class="comment">32-bit JRE requires 32-bit native libs</small></li>
</ul>
</li>
<li>Mac OS X app bundle: <a onclick="_gaq.push(['_trackPageview', '/download/FileBot.app'])" target="_blank" href="http://sourceforge.net/projects/filebot/files/filebot/FileBot_@{version}/FileBot_@{version}.app.zip/download">FileBot_@{version}.app</a> (<strong>15MB</strong>)</li>