* fix Sublight by spoofing Sublight;3.6.0 auth credentials
This commit is contained in:
parent
f8b0eaea95
commit
32e40255c8
|
@ -12,5 +12,7 @@ analytics.WebPropertyID: UA-25379256-3
|
||||||
# database api keys
|
# database api keys
|
||||||
thetvdb.apikey: 58B4AA94C59AD656
|
thetvdb.apikey: 58B4AA94C59AD656
|
||||||
themoviedb.apikey: 5a6edae568130bf10617b6d45be99f13
|
themoviedb.apikey: 5a6edae568130bf10617b6d45be99f13
|
||||||
sublight.apikey: afa9ecb2-a3ee-42b1-9225-000b4038bc85
|
|
||||||
serienjunkies.apikey: 9fbhw9uebfiwvbefzuwv
|
serienjunkies.apikey: 9fbhw9uebfiwvbefzuwv
|
||||||
|
|
||||||
|
sublight.clientid: Sublight;3.6.0
|
||||||
|
sublight.apikey: YYa4Yajnqm5kXCEaetZeybYlfMIuGiJyTqqn0gfQv+mzC1KYEZq7jThuAFRehbti6d50PTqpBIy5wtfTyrMTb0IHWrGxDQHnHzcrtA8CO+337RhjZgw3OZsvJ/bJmd7ZAJbYMDoG/JXGYqpDFg38MteayjAZtQpNECUwZsbiuis=
|
||||||
|
|
|
@ -32,7 +32,7 @@ public final class WebServices {
|
||||||
|
|
||||||
// subtitle dbs
|
// subtitle dbs
|
||||||
public static final OpenSubtitlesClient OpenSubtitles = new OpenSubtitlesClient(String.format("%s %s", getApplicationName(), getApplicationVersion()));
|
public static final OpenSubtitlesClient OpenSubtitles = new OpenSubtitlesClient(String.format("%s %s", getApplicationName(), getApplicationVersion()));
|
||||||
public static final SublightSubtitleClient Sublight = new SublightSubtitleClient(getApplicationName(), getApplicationProperty("sublight.apikey"));
|
public static final SublightSubtitleClient Sublight = new SublightSubtitleClient(getApplicationProperty("sublight.clientid"), getApplicationProperty("sublight.apikey"));
|
||||||
public static final SubsceneSubtitleClient Subscene = new SubsceneSubtitleClient();
|
public static final SubsceneSubtitleClient Subscene = new SubsceneSubtitleClient();
|
||||||
|
|
||||||
// movie dbs
|
// movie dbs
|
||||||
|
|
|
@ -46,7 +46,7 @@ import net.sublight.webservice.SubtitleLanguage;
|
||||||
|
|
||||||
public class SublightSubtitleClient implements SubtitleProvider, VideoHashSubtitleService {
|
public class SublightSubtitleClient implements SubtitleProvider, VideoHashSubtitleService {
|
||||||
|
|
||||||
private static final String iid = "42cc1701-3752-49e2-a148-332960073452";
|
private static final String iid = "25f30171-518c-463b-a310-b9f8e1eddb40";
|
||||||
|
|
||||||
private final ClientInfo clientInfo = new ClientInfo();
|
private final ClientInfo clientInfo = new ClientInfo();
|
||||||
|
|
||||||
|
|
|
@ -19,7 +19,7 @@ import net.sublight.webservice.Subtitle;
|
||||||
|
|
||||||
public class SublightSubtitleClientTest {
|
public class SublightSubtitleClientTest {
|
||||||
|
|
||||||
private static SublightSubtitleClient client = new SublightSubtitleClient(getApplicationName(), getApplicationProperty("sublight.apikey"));
|
private static SublightSubtitleClient client = new SublightSubtitleClient(getApplicationProperty("sublight.clientid"), getApplicationProperty("sublight.apikey"));
|
||||||
|
|
||||||
|
|
||||||
@BeforeClass
|
@BeforeClass
|
||||||
|
@ -58,15 +58,12 @@ public class SublightSubtitleClientTest {
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
public void getSubtitleListAllLanguages() {
|
public void getSubtitleListAllLanguages() {
|
||||||
List<SubtitleDescriptor> list = client.getSubtitleList(new Movie("Terminator 2", 1991, 103064), null);
|
List<SubtitleDescriptor> list = client.getSubtitleList(new Movie("Terminator 2", 1991, 103064), "Croatian");
|
||||||
|
|
||||||
SubtitleDescriptor sample = list.get(0);
|
SubtitleDescriptor sample = list.get(0);
|
||||||
|
|
||||||
assertEquals("Terminator.2.1991.ULTIMATE.EDITION.DC.DVDXvID.AC3.CDx-HLS", sample.getName());
|
assertEquals("Terminator.2-Judgment.Day[1991]DvDrip-aXXo", sample.getName());
|
||||||
assertEquals("Slovenian", sample.getLanguageName());
|
assertEquals("Croatian", sample.getLanguageName());
|
||||||
|
|
||||||
// check size
|
|
||||||
assertTrue(list.size() > 15);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue