* fix Sublight by spoofing Sublight;3.6.0 auth credentials

This commit is contained in:
Reinhard Pointner 2012-06-30 08:43:51 +00:00
parent f8b0eaea95
commit 32e40255c8
4 changed files with 29 additions and 30 deletions

View File

@ -12,5 +12,7 @@ analytics.WebPropertyID: UA-25379256-3
# database api keys
thetvdb.apikey: 58B4AA94C59AD656
themoviedb.apikey: 5a6edae568130bf10617b6d45be99f13
sublight.apikey: afa9ecb2-a3ee-42b1-9225-000b4038bc85
serienjunkies.apikey: 9fbhw9uebfiwvbefzuwv
sublight.clientid: Sublight;3.6.0
sublight.apikey: YYa4Yajnqm5kXCEaetZeybYlfMIuGiJyTqqn0gfQv+mzC1KYEZq7jThuAFRehbti6d50PTqpBIy5wtfTyrMTb0IHWrGxDQHnHzcrtA8CO+337RhjZgw3OZsvJ/bJmd7ZAJbYMDoG/JXGYqpDFg38MteayjAZtQpNECUwZsbiuis=

View File

@ -32,7 +32,7 @@ public final class WebServices {
// subtitle dbs
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();
// movie dbs

View File

@ -46,7 +46,7 @@ import net.sublight.webservice.SubtitleLanguage;
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();

View File

@ -19,7 +19,7 @@ import net.sublight.webservice.Subtitle;
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
@ -58,15 +58,12 @@ public class SublightSubtitleClientTest {
@Test
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);
assertEquals("Terminator.2.1991.ULTIMATE.EDITION.DC.DVDXvID.AC3.CDx-HLS", sample.getName());
assertEquals("Slovenian", sample.getLanguageName());
// check size
assertTrue(list.size() > 15);
assertEquals("Terminator.2-Judgment.Day[1991]DvDrip-aXXo", sample.getName());
assertEquals("Croatian", sample.getLanguageName());
}