* clean up and update docs
This commit is contained in:
parent
41c1bcce7b
commit
6661dc0015
|
@ -178,9 +178,10 @@ class VideoHashSubtitleDownloadDialog extends JDialog {
|
|||
component.setIcon(ResourceManager.getIcon(service.getError() == null ? "database.ok" : "database.error"));
|
||||
}
|
||||
|
||||
servicePanel.setVisible(true);
|
||||
component.setVisible(true);
|
||||
component.setToolTipText(service.getError() == null ? null : service.getError().getMessage());
|
||||
servicePanel.setVisible(true);
|
||||
servicePanel.getParent().revalidate();
|
||||
}
|
||||
});
|
||||
|
||||
|
@ -728,6 +729,9 @@ class VideoHashSubtitleDownloadDialog extends JDialog {
|
|||
if (isCancelled())
|
||||
throw new CancellationException();
|
||||
|
||||
if (remainingVideos.isEmpty())
|
||||
break;
|
||||
|
||||
Map<File, List<SubtitleDescriptorBean>> subtitleSet = new HashMap<File, List<SubtitleDescriptorBean>>();
|
||||
|
||||
for (final Entry<File, List<SubtitleDescriptor>> result : service.lookupSubtitles(remainingVideos, languageName).entrySet()) {
|
||||
|
@ -750,7 +754,7 @@ class VideoHashSubtitleDownloadDialog extends JDialog {
|
|||
|
||||
publish(subtitleSet);
|
||||
} catch (Exception e) {
|
||||
Logger.getLogger(VideoHashSubtitleDownloadDialog.class.getName()).log(Level.SEVERE, e.getMessage(), e);
|
||||
Logger.getLogger(VideoHashSubtitleDownloadDialog.class.getName()).log(Level.WARNING, e.getMessage());
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -917,6 +921,9 @@ class VideoHashSubtitleDownloadDialog extends JDialog {
|
|||
// auto-detect query and search for subtitles
|
||||
Collection<String> querySet = new SeriesNameMatcher().matchAll(files.toArray(new File[0]));
|
||||
List<SubtitleDescriptor> subtitles = findSubtitles(service, querySet, languageName);
|
||||
if (subtitles.isEmpty()) {
|
||||
throw new IllegalArgumentException("Unable to lookup subtitles:" + querySet);
|
||||
}
|
||||
|
||||
// first match everything as best as possible, then filter possibly bad matches
|
||||
Matcher<File, SubtitleDescriptor> matcher = new Matcher<File, SubtitleDescriptor>(files, subtitles, false, EpisodeMetrics.defaultSequence(true));
|
||||
|
|
|
@ -223,6 +223,11 @@ public final class FileUtilities {
|
|||
}
|
||||
|
||||
|
||||
public static boolean isDerived(File derivate, File prime) {
|
||||
return isDerived(getName(derivate), prime);
|
||||
}
|
||||
|
||||
|
||||
public static boolean isDerived(String derivate, File prime) {
|
||||
String base = getName(prime).trim().toLowerCase();
|
||||
derivate = derivate.trim().toLowerCase();
|
||||
|
@ -230,6 +235,11 @@ public final class FileUtilities {
|
|||
}
|
||||
|
||||
|
||||
public static boolean isDerivedByExtension(File derivate, File prime) {
|
||||
return isDerivedByExtension(getName(derivate), prime);
|
||||
}
|
||||
|
||||
|
||||
public static boolean isDerivedByExtension(String derivate, File prime) {
|
||||
String base = getName(prime).trim().toLowerCase();
|
||||
derivate = derivate.trim().toLowerCase();
|
||||
|
|
|
@ -167,11 +167,6 @@
|
|||
<td><a href="naming.html">naming scheme</a></td>
|
||||
<td><a href="naming.html">movie or episode format expression</a></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>-non-strict</td>
|
||||
<td>use less strict matching</td>
|
||||
<td><small class="comment">(strict by default)</small></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>-get-subtitles</td>
|
||||
<td>fetch subtitles</td>
|
||||
|
@ -187,6 +182,20 @@
|
|||
<td><a href="http://en.wikipedia.org/wiki/List_of_ISO_639-1_codes" target="_blank">2-letter language code</a></td>
|
||||
<td>en, de, fr, es, ja, zh, etc</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>-non-strict</td>
|
||||
<td>use advanced matching</td>
|
||||
<td>
|
||||
<table>
|
||||
<tr>
|
||||
<td>Rename mode: match multiple tv shows</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Subtitle mode: match subtitles by name</td>
|
||||
</tr>
|
||||
</table>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>-check</td>
|
||||
<td>create/check verification file</td>
|
||||
|
|
|
@ -0,0 +1,19 @@
|
|||
// filebot -script "http://filebot.sourceforge.net/data/shell/subcpl.groovy" <options> <folder>
|
||||
|
||||
import static net.sourceforge.tuned.FileUtilities.*;
|
||||
|
||||
|
||||
/*
|
||||
* Fetch subtitles for all videos that currently don't have subtitles
|
||||
*/
|
||||
args.eachMediaFolder { dir ->
|
||||
// select videos without subtitles
|
||||
def videos = dir.listFiles().findAll{ video ->
|
||||
video.isVideo() && !dir.listFiles().find{ sub ->
|
||||
sub.isSubtitle() && isDerived(sub,video)
|
||||
}
|
||||
}
|
||||
|
||||
// fetch subtitles by hash only
|
||||
getSubtitles(file:videos, strict:true)
|
||||
}
|
|
@ -171,13 +171,10 @@
|
|||
<div class="section contact">
|
||||
<img class="icon" src="images/contact.png" alt="contact" width="48" height="48" />
|
||||
<span class="quote">Will you join us?</span>
|
||||
<h2>
|
||||
Contact
|
||||
<a href="http://filebot.sourceforge.net/forums/" class="source" target="_blank">forums</a>
|
||||
</h2>
|
||||
<h2>Contact</h2>
|
||||
<p>
|
||||
The project is continuously seeking for improvements, so anykind of <a onclick="_gaq.push(['_trackPageview', '/project/feedback'])" target="_blank" href="http://alternativeto.net/software/filebot/reviews">feedback</a> is more than welcome
|
||||
and if there's any questions or problems just start posting in the <a target="_blank" href="http://filebot.sourceforge.net/forums/">forums</a> or check the <a target="_blank" href="http://filebot.sourceforge.net/forums/viewforum.php?f=3"><acronym title="frequently asked questions">FAQ</acronym></a>.
|
||||
and if there's any questions or problems just start posting in the <a target="_blank" href="http://filebot.sourceforge.net/forums/">forums</a> or check the <a target="_blank" href="http://filebot.sourceforge.net/forums/viewtopic.php?f=3&t=7"><acronym title="frequently asked questions">FAQ</acronym></a>.
|
||||
Make sure to subscribe to updates via <a onclick="_gaq.push(['_trackPageview', '/project/freshmeat'])" target="_blank" href="http://freecode.com/projects/filebot-tv-renamer">freshmeat</a> and become a fan on <a onclick="_gaq.push(['_trackPageview', '/project/facebook'])" target="_blank" href="https://www.facebook.com/filebot">facebook</a>.
|
||||
</p>
|
||||
</div>
|
||||
|
|
|
@ -238,7 +238,7 @@
|
|||
<td>fn</td>
|
||||
<td>file name</td>
|
||||
<td>Serenity</td>
|
||||
</tr>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>ext</td>
|
||||
<td>file extension</td>
|
||||
|
@ -253,7 +253,7 @@
|
|||
<td>movie</td>
|
||||
<td>movie object</td>
|
||||
<td><default movie name></td>
|
||||
</tr>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>pi</td>
|
||||
<td>movie part index</td>
|
||||
|
@ -293,7 +293,7 @@
|
|||
<td>text</td>
|
||||
<td>subtitle object [stream 0]</td>
|
||||
<td><any subtitle parameter></td>
|
||||
</tr>
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
<h2 class="reference" id="functions">
|
||||
|
@ -308,7 +308,7 @@
|
|||
</p>
|
||||
<p>
|
||||
<code><span class="method">space</span>(<span class="string">replacement</span>)</code>Replace all spaces (e.g. "Doctor Who" -> "Doctor_Who").
|
||||
</p>
|
||||
</p>
|
||||
<p>
|
||||
<code><span class="method">upperInitial</span>()</code>Upper-case all initials (e.g. "The Day a new Demon was born" -> "The Day A New Demon Was Born").
|
||||
</p>
|
||||
|
|
Loading…
Reference in New Issue