Merge pull request #700 from Zer0xFF/tgdb

Update TheGamesDB to legacy domain
This commit is contained in:
Jean-Philip Desjardins 2018-06-07 12:53:16 -04:00 committed by GitHub
commit 4154887e7b
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 5 additions and 5 deletions

View File

@ -229,7 +229,7 @@ public class GameInfo
}
else
{
api = "http://thegamesdb.net/banners/" + boxart;
api = "http://legacy.thegamesdb.net/banners/" + boxart;
}
InputStream im = null;
try

View File

@ -42,9 +42,9 @@ public class GamesDbAPI extends AsyncTask<File, Integer, Boolean>
private String gameID;
private GameInfo gameInfo;
private boolean elastic;
private static final String games_url = "http://thegamesdb.net/api/GetGamesList.php?platform=sony+playstation+2&name=";
private static final String games_url_id = "http://thegamesdb.net/api/GetGame.php?platform=sony+playstation+2&id=";
private static final String games_list = "http://thegamesdb.net/api/GetPlatformGames.php?platform=11";
private static final String games_url = "http://legacy.thegamesdb.net/api/GetGamesList.php?platform=sony+playstation+2&name=";
private static final String games_url_id = "http://legacy.thegamesdb.net/api/GetGame.php?platform=sony+playstation+2&id=";
private static final String games_list = "http://legacy.thegamesdb.net/api/GetPlatformGames.php?platform=11";
public GamesDbAPI(Context mContext, GameInfoStruct gameInfoStruct, int pos)
{

View File

@ -102,7 +102,7 @@ static NSString * const reuseIdentifier = @"coverCell";
UIImage *placeholder = [UIImage imageNamed:@"boxart.png"];
cell.backgroundView = [[UIImageView alloc] initWithImage:placeholder];
if ([game objectForKey:@"boxart"] != nil && ![[game objectForKey:@"boxart"] isEqual:@"404"]) {
NSString *imageIcon = [[NSString alloc] initWithFormat:@"http://thegamesdb.net/banners/_gameviewcache/%@", [game objectForKey:@"boxart"]];
NSString *imageIcon = [[NSString alloc] initWithFormat:@"http://legacy.thegamesdb.net/banners/_gameviewcache/%@", [game objectForKey:@"boxart"]];
[(UIImageView *)cell.backgroundView sd_setImageWithURL:[NSURL URLWithString:imageIcon] placeholderImage:placeholder];
} else {
cell.nameLabel.text = [[[disk objectForKey:@"file"] lastPathComponent] stringByDeletingPathExtension];