1
0
mirror of https://github.com/mitb-archive/filebot synced 2024-11-15 13:55:03 -05:00

* added <sortitle> (set :: name :: year) to .nfo files

* make sure everything is trimmed
This commit is contained in:
Reinhard Pointner 2012-07-31 07:46:33 +00:00
parent b9bcd3415d
commit 87cfae4c76
4 changed files with 6 additions and 4 deletions

View File

@ -286,7 +286,7 @@ public class ReleaseInfo {
List<Movie> movies = new ArrayList<Movie>(); List<Movie> movies = new ArrayList<Movie>();
while (scanner.hasNext()) { while (scanner.hasNext()) {
int imdbid = scanner.nextInt(); int imdbid = scanner.nextInt();
String name = scanner.next(); String name = scanner.next().trim();
int year = scanner.nextInt(); int year = scanner.nextInt();
movies.add(new Movie(name, year, imdbid, -1)); movies.add(new Movie(name, year, imdbid, -1));
} }

View File

@ -133,7 +133,7 @@ public class SerienjunkiesClient extends AbstractEpisodeListProvider {
String title = (String) obj.get("german"); String title = (String) obj.get("german");
Date airdate = Date.parse((String) ((JSONObject) obj.get("airdates")).get("premiere"), "yyyy-MM-dd"); 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 // make sure episodes are in ordered correctly

View File

@ -68,6 +68,7 @@ def fetchSeriesNfo(outputFile, series, locale) {
def info = TheTVDB.getSeriesInfo(series, locale) def info = TheTVDB.getSeriesInfo(series, locale)
info.applyXml('''<tvshow xmlns:gsp='http://groovy.codehaus.org/2005/gsp'> info.applyXml('''<tvshow xmlns:gsp='http://groovy.codehaus.org/2005/gsp'>
<title>$name</title> <title>$name</title>
<sorttitle>${[name, firstAired as String].findAll{ !it.empty }.join(/ :: /)}</sorttitle>
<year>$firstAired.year</year> <year>$firstAired.year</year>
<rating>$rating</rating> <rating>$rating</rating>
<votes>$ratingCount</votes> <votes>$ratingCount</votes>
@ -191,6 +192,7 @@ def fetchMovieNfo(outputFile, movieInfo, movieFile) {
movieInfo.applyXml('''<movie xmlns:gsp='http://groovy.codehaus.org/2005/gsp'> movieInfo.applyXml('''<movie xmlns:gsp='http://groovy.codehaus.org/2005/gsp'>
<title>$name</title> <title>$name</title>
<originaltitle>$originalName</originaltitle> <originaltitle>$originalName</originaltitle>
<sorttitle>${[collection, name, released as String].findAll{ !it.empty }.join(/ :: /)}</sorttitle>
<set>$collection</set> <set>$collection</set>
<year>$released.year</year> <year>$released.year</year>
<rating>$rating</rating> <rating>$rating</rating>
@ -208,7 +210,7 @@ def fetchMovieNfo(outputFile, movieInfo, movieFile) {
<role>${it?.character}</role> <role>${it?.character}</role>
</actor> </actor>
<gsp:scriptlet> } </gsp:scriptlet> <gsp:scriptlet> } </gsp:scriptlet>
''' + (createFileInfoXml(movieFile) ?: '') + ''' ''' + ((movieFile != null ? createFileInfoXml(movieFile) : null) ?: '') + '''
<imdb id='tt${imdbId.pad(7)}'>http://www.imdb.com/title/tt${imdbId.pad(7)}/</imdb> <imdb id='tt${imdbId.pad(7)}'>http://www.imdb.com/title/tt${imdbId.pad(7)}/</imdb>
<tmdb id='$id'>http://www.themoviedb.org/movie/$id</tmdb> <tmdb id='$id'>http://www.themoviedb.org/movie/$id</tmdb>
</movie> </movie>

View File

@ -198,7 +198,7 @@ if (gmail && getRenameLog().size() > 0) {
} }
}, },
messagemimetype: "text/html", 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] user: gmail[0], password: gmail[1]
) )
} }