* minor updates
This commit is contained in:
parent
24025d9cb6
commit
36ad3d826d
|
@ -92,7 +92,8 @@
|
||||||
<extension>flv</extension>
|
<extension>flv</extension>
|
||||||
</type>
|
</type>
|
||||||
|
|
||||||
<type name="video/rmvb">
|
<type name="video/realmedia">
|
||||||
|
<extension>rm</extension>
|
||||||
<extension>rmvb</extension>
|
<extension>rmvb</extension>
|
||||||
</type>
|
</type>
|
||||||
|
|
||||||
|
|
|
@ -142,13 +142,8 @@ public class OpenSubtitlesXmlRpc {
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
public TryUploadResponse tryUploadSubtitles(SubFile subtitle) throws XmlRpcFault {
|
|
||||||
return tryUploadSubtitles(singleton(subtitle));
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
@SuppressWarnings("unchecked")
|
@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>();
|
Map<String, SubFile> struct = new HashMap<String, SubFile>();
|
||||||
|
|
||||||
// put cd1, cd2, ...
|
// put cd1, cd2, ...
|
||||||
|
@ -165,12 +160,7 @@ public class OpenSubtitlesXmlRpc {
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
public URI uploadSubtitles(BaseInfo baseInfo, SubFile subtitle) throws XmlRpcFault {
|
public URI uploadSubtitles(BaseInfo baseInfo, SubFile... subtitles) throws XmlRpcFault {
|
||||||
return uploadSubtitles(baseInfo, singleton(subtitle));
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
public URI uploadSubtitles(BaseInfo baseInfo, Collection<SubFile> subtitles) throws XmlRpcFault {
|
|
||||||
Map<String, Object> struct = new HashMap<String, Object>();
|
Map<String, Object> struct = new HashMap<String, Object>();
|
||||||
|
|
||||||
// put cd1, cd2, ...
|
// put cd1, cd2, ...
|
||||||
|
@ -283,7 +273,7 @@ public class OpenSubtitlesXmlRpc {
|
||||||
|
|
||||||
protected URL getXmlRpcUrl() {
|
protected URL getXmlRpcUrl() {
|
||||||
try {
|
try {
|
||||||
return new URL("http://www.opensubtitles.org/xml-rpc");
|
return new URL("http://api.opensubtitles.org/xml-rpc");
|
||||||
} catch (MalformedURLException e) {
|
} catch (MalformedURLException e) {
|
||||||
// will never happen
|
// will never happen
|
||||||
throw new RuntimeException(e);
|
throw new RuntimeException(e);
|
||||||
|
|
|
@ -16,9 +16,7 @@ public abstract class Timer implements Runnable {
|
||||||
|
|
||||||
|
|
||||||
public Timer() {
|
public Timer() {
|
||||||
executor = new ScheduledThreadPoolExecutor(1);
|
executor = new ScheduledThreadPoolExecutor(1, new DefaultThreadFactory("Timer", Thread.NORM_PRIORITY, true));
|
||||||
executor.setKeepAliveTime(200, TimeUnit.MILLISECONDS);
|
|
||||||
executor.allowCoreThreadTimeOut(true);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -67,7 +67,7 @@ public class SublightSubtitleClientTest {
|
||||||
assertEquals("English", sample.getLanguageName());
|
assertEquals("English", sample.getLanguageName());
|
||||||
|
|
||||||
// check size
|
// check size
|
||||||
assertTrue(list.size() > 20);
|
assertTrue(list.size() > 15);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue