1
0
mirror of https://github.com/mitb-archive/filebot synced 2025-03-09 13:59:49 -04:00

* clean-up

This commit is contained in:
Reinhard Pointner 2011-12-29 01:31:11 +00:00
parent c3093eb8d1
commit 49c549bf3c
3 changed files with 7 additions and 7 deletions

View File

@ -4,4 +4,4 @@ while [ -h "$SOURCE" ] ; do SOURCE="$(readlink "$SOURCE")"; done
dir_bin="$( cd -P "$( dirname "$SOURCE" )" && pwd )"
# WARNING: NOT TESTED / HERE THERE BE DRAGONS
javaw -Dapplication.deployment=portable -Dapplication.dir="$dir_bin" -Duser.home="$dir_bin" -Djava.io.tmpdir="$dir_bin/temp" -Djna.library.path="$dir_bin" -Djava.util.prefs.PreferencesFactory=net.sourceforge.tuned.prefs.FilePreferencesFactory -Dnet.sourceforge.tuned.prefs.file=prefs.properties -Xmx256m -jar "$dir_app/FileBot.jar" "$@"
java -Dapplication.deployment=portable -Dapplication.dir="$dir_bin" -Duser.home="$dir_bin" -Djava.io.tmpdir="$dir_bin/temp" -Djna.library.path="$dir_bin" -Djava.util.prefs.PreferencesFactory=net.sourceforge.tuned.prefs.FilePreferencesFactory -Dnet.sourceforge.tuned.prefs.file=prefs.properties -Xmx256m -jar "$dir_app/FileBot.jar" "$@"

View File

@ -641,7 +641,7 @@ public class TheTVDBClient extends AbstractEpisodeListProvider {
public BannerDescriptor getBanner(TheTVDBSearchResult series, String bannerType, String bannerType2, Integer season, Locale locale, int index) throws Exception {
// search for a banner matching the selector
int n = 0;
for (BannerDescriptor it : getBannerList(series.seriesId)) {
for (BannerDescriptor it : getBannerList(series)) {
if ((bannerType == null || it.getBannerType().equalsIgnoreCase(bannerType)) && (bannerType2 == null || it.getBannerType2().equalsIgnoreCase(bannerType2)) && (season == null || it.getSeason().equals(season))
&& ((locale == null && it.getLocale().getLanguage().equals("en")) || it.getLocale().getLanguage().equals(locale.getLanguage()))) {
if (index == n++) {
@ -654,14 +654,14 @@ public class TheTVDBClient extends AbstractEpisodeListProvider {
}
public List<BannerDescriptor> getBannerList(int seriesid) throws Exception {
public List<BannerDescriptor> getBannerList(TheTVDBSearchResult series) throws Exception {
// check cache first
BannerDescriptor[] cachedList = getCache().getData("banners", seriesid, BannerDescriptor[].class);
BannerDescriptor[] cachedList = getCache().getData("banners", series.seriesId, BannerDescriptor[].class);
if (cachedList != null) {
return asList(cachedList);
}
Document dom = getDocument(getResource(MirrorType.XML, "/api/" + apikey + "/series/" + seriesid + "/banners.xml"));
Document dom = getDocument(getResource(MirrorType.XML, "/api/" + apikey + "/series/" + series.seriesId + "/banners.xml"));
List<Node> nodes = selectNodes("//Banner", dom);
List<BannerDescriptor> banners = new ArrayList<BannerDescriptor>();
@ -688,7 +688,7 @@ public class TheTVDBClient extends AbstractEpisodeListProvider {
}
}
getCache().putData("banners", seriesid, banners.toArray(new BannerDescriptor[0]));
getCache().putData("banners", series.seriesId, banners.toArray(new BannerDescriptor[0]));
return banners;
}

View File

@ -51,7 +51,7 @@ def fetchNfo(outputFile, series) {
def fetchSeriesBannersAndNfo(seriesDir, seasonDir, series, season) {
println "Fetch nfo and banners for $series / Season $season"
TheTVDB.getBannerList(series.seriesId).each {
TheTVDB.getBannerList(series).each {
println "Available banner: $it.url => $it"
}