1
0
mirror of https://github.com/mitb-archive/filebot synced 2025-03-10 06:20:27 -04:00

+ final adjustments for 2.4

* support "A | B | C" syntax for series mode --q option
* fine-tuning for series auto-selection
* don't create desktop shortcut when running via JNLP
This commit is contained in:
Reinhard Pointner 2012-06-24 05:43:09 +00:00
parent a5284ccb40
commit 36bcd880db
8 changed files with 25 additions and 22 deletions

View File

@ -12,10 +12,6 @@
<icon href="shortcut.ico" kind="shortcut" /> <icon href="shortcut.ico" kind="shortcut" />
<icon href="splash.png" kind="splash" /> <icon href="splash.png" kind="splash" />
<shortcut online="true">
<desktop />
</shortcut>
<offline-allowed /> <offline-allowed />
</information> </information>

View File

@ -50,7 +50,7 @@ public class ArgumentBean {
@Option(name = "-get-missing-subtitles", usage = "Fetch missing subtitles", metaVar = "fileset") @Option(name = "-get-missing-subtitles", usage = "Fetch missing subtitles", metaVar = "fileset")
public boolean getMissingSubtitles; public boolean getMissingSubtitles;
@Option(name = "--q", usage = "Search query", metaVar = "title") @Option(name = "--q", usage = "Force lookup query", metaVar = "series/movie title")
public String query; public String query;
@Option(name = "--lang", usage = "Language", metaVar = "2-letter language code") @Option(name = "--lang", usage = "Language", metaVar = "2-letter language code")
@ -59,7 +59,7 @@ public class ArgumentBean {
@Option(name = "-check", usage = "Create/Check verification file", metaVar = "fileset") @Option(name = "-check", usage = "Create/Check verification file", metaVar = "fileset")
public boolean check; public boolean check;
@Option(name = "--output", usage = "Output path / format", metaVar = "Output options") @Option(name = "--output", usage = "Output path / format", metaVar = "folder/file/format")
public String output; public String output;
@Option(name = "--encoding", usage = "Output character encoding", metaVar = "[UTF-8, windows-1252, GB18030, etc]") @Option(name = "--encoding", usage = "Output character encoding", metaVar = "[UTF-8, windows-1252, GB18030, etc]")
@ -74,7 +74,7 @@ public class ArgumentBean {
@Option(name = "-extract", usage = "Extract archives") @Option(name = "-extract", usage = "Extract archives")
public boolean extract = false; public boolean extract = false;
@Option(name = "-script", usage = "Run Groovy script", metaVar = "robot.groovy") @Option(name = "-script", usage = "Run Groovy script", metaVar = "path/to/script.groovy")
public String script = null; public String script = null;
@Option(name = "-trust-script", usage = "Lift scripting restrictions") @Option(name = "-trust-script", usage = "Lift scripting restrictions")

View File

@ -3,6 +3,7 @@ package net.sourceforge.filebot.cli;
import static java.lang.String.*; import static java.lang.String.*;
import static java.util.Arrays.*;
import static java.util.Collections.*; import static java.util.Collections.*;
import static net.sourceforge.filebot.MediaTypes.*; import static net.sourceforge.filebot.MediaTypes.*;
import static net.sourceforge.filebot.WebServices.*; import static net.sourceforge.filebot.WebServices.*;
@ -34,6 +35,7 @@ import java.util.Set;
import java.util.SortedSet; import java.util.SortedSet;
import java.util.TreeSet; import java.util.TreeSet;
import java.util.concurrent.Callable; import java.util.concurrent.Callable;
import java.util.concurrent.ExecutionException;
import java.util.concurrent.ExecutorService; import java.util.concurrent.ExecutorService;
import java.util.concurrent.Executors; import java.util.concurrent.Executors;
import java.util.concurrent.Future; import java.util.concurrent.Future;
@ -162,7 +164,7 @@ public class CmdlineOperations implements CmdlineInterface {
for (List<File> batch : batchSets) { for (List<File> batch : batchSets) {
// auto-detect series name if not given // auto-detect series name if not given
Collection<String> seriesNames = (query == null) ? detectSeriesQuery(batch, locale) : singleton(query); Collection<String> seriesNames = (query == null) ? detectSeriesQuery(batch, locale) : asList(query.split("[|]"));
if (strict && seriesNames.size() > 1) { if (strict && seriesNames.size() > 1) {
throw new Exception("Handling multiple shows requires non-strict matching"); throw new Exception("Handling multiple shows requires non-strict matching");
@ -279,8 +281,8 @@ public class CmdlineOperations implements CmdlineInterface {
for (Future<List<Episode>> future : executor.invokeAll(tasks)) { for (Future<List<Episode>> future : executor.invokeAll(tasks)) {
try { try {
episodes.addAll(future.get()); episodes.addAll(future.get());
} catch (Exception e) { } catch (ExecutionException e) {
CLILogger.finest(e.getMessage()); CLILogger.finest(e.getCause().getMessage());
} }
} }
@ -752,7 +754,7 @@ public class CmdlineOperations implements CmdlineInterface {
// find probable matches using name similarity > 0.9 (or > 0.8 in non-strict mode) // find probable matches using name similarity > 0.9 (or > 0.8 in non-strict mode)
for (SearchResult result : searchResults) { for (SearchResult result : searchResults) {
float f = (query == null) ? 1 : metric.getSimilarity(query, result.getName()); float f = (query == null) ? 1 : metric.getSimilarity(query, result.getName());
if (f >= (strict ? 0.9 : 0.8) || (f >= 0.6 && result.getName().toLowerCase().startsWith(query.toLowerCase()))) { if (f >= (strict ? 0.9 : 0.8) || (f >= 0.5 && result.getName().toLowerCase().startsWith(query.toLowerCase()))) {
if (!probableMatches.containsKey(result.toString().toLowerCase())) { if (!probableMatches.containsKey(result.toString().toLowerCase())) {
probableMatches.put(result.toString().toLowerCase(), result); probableMatches.put(result.toString().toLowerCase(), result);
} }

View File

@ -326,7 +326,7 @@ public class MediaDetection {
// assume name without spacing will mess up any lookup // assume name without spacing will mess up any lookup
if (movieNameMatches.isEmpty()) { if (movieNameMatches.isEmpty()) {
movieNameMatches = matchMovieFromStringWithoutSpacing(terms, new NameSimilarityMetric(), strict ? 0.9f : 0.6f); movieNameMatches = matchMovieFromStringWithoutSpacing(terms, new NameSimilarityMetric(), strict ? 0.9f : 0.5f);
} }
// query by file / folder name // query by file / folder name

View File

@ -4,7 +4,7 @@ pattern.video.source: CAMRip|CAM|PDVD|TS|TELESYNC|PDVD|PPV|PPVRip|Screener|SCR|S
# additional release info patterns # additional release info patterns
pattern.video.format: DivX|Xvid|AVC|x264|h264|3ivx|mpeg|mpeg4|mp3|aac|ac3|2ch|6ch|WS|HR|720p|1080p|NTSC pattern.video.format: DivX|Xvid|AVC|x264|h264|3ivx|mpeg|mpeg4|mp3|aac|ac3|2ch|6ch|WS|HR|720p|1080p|NTSC
# group names mostly copied from [http://scenelingo.wordpress.com/list-of-scene-release-groups] # known release group names
url.release-groups: http://filebot.sourceforge.net/data/release-groups.txt url.release-groups: http://filebot.sourceforge.net/data/release-groups.txt
# blacklisted terms that will be ignored # blacklisted terms that will be ignored
@ -12,6 +12,8 @@ url.query-blacklist: http://filebot.sourceforge.net/data/query-blacklist.txt
# list of all movies (id, name, year) # list of all movies (id, name, year)
url.movie-list: http://filebot.sourceforge.net/data/movies.txt.gz url.movie-list: http://filebot.sourceforge.net/data/movies.txt.gz
# list of tv show and anime names
url.series-list: http://filebot.sourceforge.net/data/series.list.gz url.series-list: http://filebot.sourceforge.net/data/series.list.gz
# disk folder matcher # disk folder matcher

View File

@ -19,7 +19,7 @@ public class ExpressionFormatTest {
public void compile() throws Exception { public void compile() throws Exception {
ExpressionFormat format = new TestScriptFormat(""); ExpressionFormat format = new TestScriptFormat("");
Object[] expression = format.compile("name: {name}, number: {number}", (Compilable) format.initScriptEngine()); Object[] expression = format.compile("name: {name}, number: {number}", (Compilable) ExpressionFormat.getGroovyScriptEngine());
assertTrue(expression[0] instanceof String); assertTrue(expression[0] instanceof String);
assertTrue(expression[1] instanceof CompiledScript); assertTrue(expression[1] instanceof CompiledScript);

View File

@ -27,6 +27,7 @@
^l[^\p{Alnum}] ^l[^\p{Alnum}]
^Movie[s]? ^Movie[s]?
^New$ ^New$
^Other$
^SAMPLE ^SAMPLE
^Season.[0-9]+ ^Season.[0-9]+
^Torrents[s]? ^Torrents[s]?
@ -73,6 +74,7 @@ KORSUB
LMAO LMAO
Los.Sustitutos Los.Sustitutos
mkvonly mkvonly
Movies
MultiSub MultiSub
MVGroup.org MVGroup.org
NL NL

View File

@ -132,6 +132,7 @@
<li>Export your media files including media info as CSV text file</li> <li>Export your media files including media info as CSV text file</li>
... and more! ... and more!
</ul> </ul>
<p>Setting up <strong>complete automation</strong> on your HTPC extract archives, organize tv shows and movies, download subtitles, fetch artwork and metadata, update XBMC with µTorrent and FileBot it's <a href="http://filebot.sourceforge.net/forums/viewtopic.php?f=4&amp;t=5#p802">that</a> easy!</p>
</div> </div>
<div class="section features" id="features"> <div class="section features" id="features">