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

com.cedarsoftware.util.io.JsonReader requires a public constructor with no arguments (otherwise it'll try to find another constructor and call it with default values, e.g. null may change to 0)

This commit is contained in:
Reinhard Pointner 2016-10-09 17:39:04 +08:00
parent fe30f8a8d5
commit 4833391729
7 changed files with 22 additions and 13 deletions

View File

@ -7,8 +7,12 @@ import java.util.Arrays;
public class SimpleFileInfo implements FileInfo, Comparable<FileInfo> { public class SimpleFileInfo implements FileInfo, Comparable<FileInfo> {
private final String path; private String path;
private final long length; private long length;
public SimpleFileInfo() {
// used by deserializer
}
public SimpleFileInfo(String path, long length) { public SimpleFileInfo(String path, long length) {
this.path = path; this.path = path;

View File

@ -20,7 +20,8 @@ public class AudioTrack implements Serializable {
protected String mbid; // MusicBrainz Identifier protected String mbid; // MusicBrainz Identifier
protected AudioTrack() { public AudioTrack() {
// used by deserializer
} }
public AudioTrack(AudioTrack other) { public AudioTrack(AudioTrack other) {

View File

@ -26,8 +26,8 @@ public class Episode implements Serializable {
// extended series metadata // extended series metadata
protected SeriesInfo seriesInfo; protected SeriesInfo seriesInfo;
protected Episode() { public Episode() {
// used by deserializer
} }
public Episode(Episode obj) { public Episode(Episode obj) {
@ -45,8 +45,8 @@ public class Episode implements Serializable {
this.title = title; this.title = title;
this.absolute = absolute; this.absolute = absolute;
this.special = special; this.special = special;
this.airdate = (airdate == null ? null : airdate.clone()); this.airdate = airdate == null ? null : airdate.clone();
this.seriesInfo = (seriesInfo == null ? null : seriesInfo.clone()); this.seriesInfo = seriesInfo == null ? null : seriesInfo.clone();
} }
public String getSeriesName() { public String getSeriesName() {

View File

@ -14,8 +14,8 @@ public class Movie extends SearchResult {
// optional movie name language hint // optional movie name language hint
protected String language; protected String language;
protected Movie() { public Movie() {
// used by serializer // used by deserializer
} }
public Movie(int imdbId) { public Movie(int imdbId) {

View File

@ -5,8 +5,8 @@ public class MoviePart extends Movie {
protected int partIndex; protected int partIndex;
protected int partCount; protected int partCount;
protected MoviePart() { public MoviePart() {
// used by serializer // used by deserializer
} }
public MoviePart(MoviePart obj) { public MoviePart(MoviePart obj) {

View File

@ -11,8 +11,8 @@ public class MultiEpisode extends Episode {
protected Episode[] episodes; protected Episode[] episodes;
protected MultiEpisode() { public MultiEpisode() {
// used by serializer // used by deserializer
} }
public MultiEpisode(Episode... episodes) { public MultiEpisode(Episode... episodes) {

View File

@ -23,6 +23,10 @@ public class SubtitleSearchResult extends Movie {
private Kind kind; private Kind kind;
private int score; private int score;
public SubtitleSearchResult() {
// used by deserializer
}
public SubtitleSearchResult(int imdbId, String name, int year, String kind, int score) { public SubtitleSearchResult(int imdbId, String name, int year, String kind, int score) {
this(name, null, year, imdbId, -1, Locale.ENGLISH, Kind.forName(kind), score); this(name, null, year, imdbId, -1, Locale.ENGLISH, Kind.forName(kind), score);
} }