Skip to content

Commit

Permalink
Merge branch 'dev'
Browse files Browse the repository at this point in the history
  • Loading branch information
erickok committed Feb 23, 2018
2 parents 6bfa4c9 + 0299d41 commit 18bb1a7
Show file tree
Hide file tree
Showing 4 changed files with 16 additions and 4 deletions.
4 changes: 2 additions & 2 deletions app/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,8 @@ android {
applicationId "org.transdroid.search"
minSdkVersion 8
targetSdkVersion 25
versionCode 32
versionName "3.9"
versionCode 33
versionName "3.10"
testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
}
buildTypes {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -122,6 +122,11 @@ public void search_TorrentLeech() throws Exception {
searchSite(TorrentSite.TorrentLeech);
}

@Test
public void search_Yts() throws Exception {
searchSite(TorrentSite.Yts);
}

private void searchSite(TorrentSite torrentSite) throws Exception {
// Set test user and password
if (torrentSite.getAdapter().getAuthType() != NONE) {
Expand Down
7 changes: 7 additions & 0 deletions app/src/main/java/org/transdroid/search/TorrentSite.java
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@
import android.content.SharedPreferences;

import org.transdroid.search.adapters.html.publictrackers.ScambioEticoAdapter;
import org.transdroid.search.adapters.publictrackers.YtsAdapter;
import org.transdroid.search.adapters.rss.publictrackers.NyaaTorrentsAdapter;
import org.transdroid.search.adapters.html.privatetrackers.AudioBookTorrentsAdapter;
import org.transdroid.search.adapters.html.privatetrackers.MoreThanTvAdapter;
Expand Down Expand Up @@ -175,6 +176,12 @@ public ISearchAdapter getAdapter() {
public ISearchAdapter getAdapter() {
return new TorrentLeechAdapter();
}
},
Yts {
@Override
public ISearchAdapter getAdapter() {
return new YtsAdapter();
}
};

/**
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@
*/
public class YtsAdapter implements ISearchAdapter {

private static final String BASE_URL = "https://yts.immunicity.world/api/v2/list_movies.json";
private static final String BASE_URL = "https://yts.am/api/v2/list_movies.json";
private static final int CONNECTION_TIMEOUT = 10000;

/**
Expand Down Expand Up @@ -126,7 +126,7 @@ public String buildRssFeedUrlFromSearch(SharedPreferences prefs, String query, S

@Override
public String getSiteName() {
return "YTS (proxied)";
return "YTS";
}

public AuthType getAuthType() {
Expand Down

0 comments on commit 18bb1a7

Please sign in to comment.