From 87cfae4c769b2e5027acab6427b02b91839b68ef Mon Sep 17 00:00:00 2001 From: Reinhard Pointner Date: Tue, 31 Jul 2012 07:46:33 +0000 Subject: [PATCH] * added (set :: name :: year) to .nfo files * make sure everything is trimmed --- source/net/sourceforge/filebot/media/ReleaseInfo.java | 2 +- source/net/sourceforge/filebot/web/SerienjunkiesClient.java | 2 +- website/scripts/lib/htpc.groovy | 4 +++- website/scripts/utorrent-postprocess.groovy | 2 +- 4 files changed, 6 insertions(+), 4 deletions(-) diff --git a/source/net/sourceforge/filebot/media/ReleaseInfo.java b/source/net/sourceforge/filebot/media/ReleaseInfo.java index 71435cc7..e449b7c7 100644 --- a/source/net/sourceforge/filebot/media/ReleaseInfo.java +++ b/source/net/sourceforge/filebot/media/ReleaseInfo.java @@ -286,7 +286,7 @@ public class ReleaseInfo { List movies = new ArrayList(); while (scanner.hasNext()) { int imdbid = scanner.nextInt(); - String name = scanner.next(); + String name = scanner.next().trim(); int year = scanner.nextInt(); movies.add(new Movie(name, year, imdbid, -1)); } diff --git a/source/net/sourceforge/filebot/web/SerienjunkiesClient.java b/source/net/sourceforge/filebot/web/SerienjunkiesClient.java index 68e6086a..ab68e40b 100644 --- a/source/net/sourceforge/filebot/web/SerienjunkiesClient.java +++ b/source/net/sourceforge/filebot/web/SerienjunkiesClient.java @@ -133,7 +133,7 @@ public class SerienjunkiesClient extends AbstractEpisodeListProvider { String title = (String) obj.get("german"); Date airdate = Date.parse((String) ((JSONObject) obj.get("airdates")).get("premiere"), "yyyy-MM-dd"); - episodes.add(new Episode(seriesName, series.getStartDate(), season, episode, title, i + 1, null, airdate)); + episodes.add(new Episode(seriesName.trim(), series.getStartDate(), season, episode, title.trim(), i + 1, null, airdate)); } // make sure episodes are in ordered correctly diff --git a/website/scripts/lib/htpc.groovy b/website/scripts/lib/htpc.groovy index f1b491f4..26d3bed7 100644 --- a/website/scripts/lib/htpc.groovy +++ b/website/scripts/lib/htpc.groovy @@ -68,6 +68,7 @@ def fetchSeriesNfo(outputFile, series, locale) { def info = TheTVDB.getSeriesInfo(series, locale) info.applyXml(''' $name + ${[name, firstAired as String].findAll{ !it.empty }.join(/ :: /)} $firstAired.year $rating $ratingCount @@ -191,6 +192,7 @@ def fetchMovieNfo(outputFile, movieInfo, movieFile) { movieInfo.applyXml(''' $name $originalName + ${[collection, name, released as String].findAll{ !it.empty }.join(/ :: /)} $collection $released.year $rating @@ -208,7 +210,7 @@ def fetchMovieNfo(outputFile, movieInfo, movieFile) { ${it?.character} } - ''' + (createFileInfoXml(movieFile) ?: '') + ''' + ''' + ((movieFile != null ? createFileInfoXml(movieFile) : null) ?: '') + ''' http://www.imdb.com/title/tt${imdbId.pad(7)}/ http://www.themoviedb.org/movie/$id diff --git a/website/scripts/utorrent-postprocess.groovy b/website/scripts/utorrent-postprocess.groovy index 914b6e40..9315c9b4 100644 --- a/website/scripts/utorrent-postprocess.groovy +++ b/website/scripts/utorrent-postprocess.groovy @@ -198,7 +198,7 @@ if (gmail && getRenameLog().size() > 0) { } }, messagemimetype: "text/html", - to: tryQuietly{ gmail2 } ?: gmail[0] + '@gmail.com', + to: tryQuietly{ mailto } ?: gmail[0] + '@gmail.com', // mail to self by default user: gmail[0], password: gmail[1] ) }