* minor updates

This commit is contained in:
Reinhard Pointner 2009-10-13 00:28:59 +00:00
parent 24025d9cb6
commit 36ad3d826d
4 changed files with 8 additions and 19 deletions

View File

@ -92,7 +92,8 @@
<extension>flv</extension>
</type>
<type name="video/rmvb">
<type name="video/realmedia">
<extension>rm</extension>
<extension>rmvb</extension>
</type>

View File

@ -142,13 +142,8 @@ public class OpenSubtitlesXmlRpc {
}
public TryUploadResponse tryUploadSubtitles(SubFile subtitle) throws XmlRpcFault {
return tryUploadSubtitles(singleton(subtitle));
}
@SuppressWarnings("unchecked")
public TryUploadResponse tryUploadSubtitles(Collection<SubFile> subtitles) throws XmlRpcFault {
public TryUploadResponse tryUploadSubtitles(SubFile... subtitles) throws XmlRpcFault {
Map<String, SubFile> struct = new HashMap<String, SubFile>();
// put cd1, cd2, ...
@ -165,12 +160,7 @@ public class OpenSubtitlesXmlRpc {
}
public URI uploadSubtitles(BaseInfo baseInfo, SubFile subtitle) throws XmlRpcFault {
return uploadSubtitles(baseInfo, singleton(subtitle));
}
public URI uploadSubtitles(BaseInfo baseInfo, Collection<SubFile> subtitles) throws XmlRpcFault {
public URI uploadSubtitles(BaseInfo baseInfo, SubFile... subtitles) throws XmlRpcFault {
Map<String, Object> struct = new HashMap<String, Object>();
// put cd1, cd2, ...
@ -283,7 +273,7 @@ public class OpenSubtitlesXmlRpc {
protected URL getXmlRpcUrl() {
try {
return new URL("http://www.opensubtitles.org/xml-rpc");
return new URL("http://api.opensubtitles.org/xml-rpc");
} catch (MalformedURLException e) {
// will never happen
throw new RuntimeException(e);

View File

@ -16,9 +16,7 @@ public abstract class Timer implements Runnable {
public Timer() {
executor = new ScheduledThreadPoolExecutor(1);
executor.setKeepAliveTime(200, TimeUnit.MILLISECONDS);
executor.allowCoreThreadTimeOut(true);
executor = new ScheduledThreadPoolExecutor(1, new DefaultThreadFactory("Timer", Thread.NORM_PRIORITY, true));
}

View File

@ -67,7 +67,7 @@ public class SublightSubtitleClientTest {
assertEquals("English", sample.getLanguageName());
// check size
assertTrue(list.size() > 20);
assertTrue(list.size() > 15);
}