changed season & episode to string
* changed season & episode to string, if the entry is not part of a series those columns are empty * changed rating to boolean * renamed rating to favorite * updated translations
This commit is contained in:
parent
27cce4fc4f
commit
b4176d0dfa
|
@ -205,17 +205,17 @@ public class MainWindowController {
|
||||||
private ImageView imv1;
|
private ImageView imv1;
|
||||||
|
|
||||||
@FXML
|
@FXML
|
||||||
private TreeItem<FilmTabelDataType> filmRoot = new TreeItem<>(new FilmTabelDataType("", "", 0, 0, 0, false, imv1));
|
private TreeItem<FilmTabelDataType> filmRoot = new TreeItem<>(new FilmTabelDataType("", "", "", "", false, false, imv1));
|
||||||
@FXML
|
@FXML
|
||||||
private TreeTableColumn<FilmTabelDataType, String> columnStreamUrl = new TreeTableColumn<>("File Name");
|
private TreeTableColumn<FilmTabelDataType, String> columnStreamUrl = new TreeTableColumn<>("File Name");
|
||||||
@FXML
|
@FXML
|
||||||
private TreeTableColumn<FilmTabelDataType, String> columnTitle = new TreeTableColumn<>("Title");
|
private TreeTableColumn<FilmTabelDataType, String> columnTitle = new TreeTableColumn<>("Title");
|
||||||
@FXML
|
@FXML
|
||||||
private TreeTableColumn<FilmTabelDataType, Integer> columnSeason = new TreeTableColumn<>("Season");
|
private TreeTableColumn<FilmTabelDataType, String> columnSeason = new TreeTableColumn<>("Season");
|
||||||
@FXML
|
@FXML
|
||||||
private TreeTableColumn<FilmTabelDataType, Integer> columnEpisode = new TreeTableColumn<>("Episode");
|
private TreeTableColumn<FilmTabelDataType, String> columnEpisode = new TreeTableColumn<>("Episode");
|
||||||
@FXML
|
@FXML
|
||||||
private TreeTableColumn<FilmTabelDataType, ImageView> columnRating = new TreeTableColumn<>("Rating");
|
private TreeTableColumn<FilmTabelDataType, ImageView> columnFavorite = new TreeTableColumn<>("Favorite");
|
||||||
|
|
||||||
@FXML
|
@FXML
|
||||||
private TreeItem<SourceDataType> sourceRoot =new TreeItem<>(new SourceDataType("", ""));
|
private TreeItem<SourceDataType> sourceRoot =new TreeItem<>(new SourceDataType("", ""));
|
||||||
|
@ -304,10 +304,10 @@ public class MainWindowController {
|
||||||
// film Table
|
// film Table
|
||||||
columnStreamUrl.setMaxWidth(0);
|
columnStreamUrl.setMaxWidth(0);
|
||||||
columnTitle.setMaxWidth(215);
|
columnTitle.setMaxWidth(215);
|
||||||
columnRating.setMaxWidth(60);
|
columnFavorite.setMaxWidth(60);
|
||||||
columnSeason.setMaxWidth(55);
|
columnSeason.setMaxWidth(55);
|
||||||
columnEpisode.setMaxWidth(64);
|
columnEpisode.setMaxWidth(64);
|
||||||
columnRating.setStyle("-fx-alignment: CENTER;");
|
columnFavorite.setStyle("-fx-alignment: CENTER;");
|
||||||
|
|
||||||
filmsTreeTable.setRoot(filmRoot);
|
filmsTreeTable.setRoot(filmRoot);
|
||||||
filmsTreeTable.setColumnResizePolicy(TreeTableView.CONSTRAINED_RESIZE_POLICY);
|
filmsTreeTable.setColumnResizePolicy(TreeTableView.CONSTRAINED_RESIZE_POLICY);
|
||||||
|
@ -316,14 +316,14 @@ public class MainWindowController {
|
||||||
// write content into cell
|
// write content into cell
|
||||||
columnStreamUrl.setCellValueFactory(cellData -> cellData.getValue().getValue().streamUrlProperty());
|
columnStreamUrl.setCellValueFactory(cellData -> cellData.getValue().getValue().streamUrlProperty());
|
||||||
columnTitle.setCellValueFactory(cellData -> cellData.getValue().getValue().titleProperty());
|
columnTitle.setCellValueFactory(cellData -> cellData.getValue().getValue().titleProperty());
|
||||||
columnSeason.setCellValueFactory(cellData -> cellData.getValue().getValue().seasonProperty().asObject());
|
columnSeason.setCellValueFactory(cellData -> cellData.getValue().getValue().seasonProperty());
|
||||||
columnEpisode.setCellValueFactory(cellData -> cellData.getValue().getValue().episodeProperty().asObject());
|
columnEpisode.setCellValueFactory(cellData -> cellData.getValue().getValue().episodeProperty());
|
||||||
columnRating.setCellValueFactory(cellData -> cellData.getValue().getValue().imageProperty());
|
columnFavorite.setCellValueFactory(cellData -> cellData.getValue().getValue().imageProperty());
|
||||||
|
|
||||||
// add columns to treeTableViewfilm
|
// add columns to treeTableViewfilm
|
||||||
filmsTreeTable.getColumns().add(columnStreamUrl);
|
filmsTreeTable.getColumns().add(columnStreamUrl);
|
||||||
filmsTreeTable.getColumns().add(columnTitle);
|
filmsTreeTable.getColumns().add(columnTitle);
|
||||||
filmsTreeTable.getColumns().add(columnRating);
|
filmsTreeTable.getColumns().add(columnFavorite);
|
||||||
filmsTreeTable.getColumns().add(columnSeason);
|
filmsTreeTable.getColumns().add(columnSeason);
|
||||||
filmsTreeTable.getColumns().add(columnEpisode);
|
filmsTreeTable.getColumns().add(columnEpisode);
|
||||||
filmsTreeTable.getColumns().get(0).setVisible(false); //hide columnStreamUrl (important)
|
filmsTreeTable.getColumns().get(0).setVisible(false); //hide columnStreamUrl (important)
|
||||||
|
@ -442,7 +442,7 @@ public class MainWindowController {
|
||||||
/**
|
/**
|
||||||
* FIXME fix bug when sort by ASCENDING, wrong order
|
* FIXME fix bug when sort by ASCENDING, wrong order
|
||||||
*/
|
*/
|
||||||
columnRating.sortTypeProperty().addListener(new ChangeListener<SortType>() {
|
columnFavorite.sortTypeProperty().addListener(new ChangeListener<SortType>() {
|
||||||
@Override
|
@Override
|
||||||
public void changed(ObservableValue<? extends SortType> paramObservableValue, SortType paramT1, SortType paramT2) {
|
public void changed(ObservableValue<? extends SortType> paramObservableValue, SortType paramT1, SortType paramT2) {
|
||||||
LOGGER.info("NAME Clicked -- sortType = " + paramT1 + ", SortType=" + paramT2);
|
LOGGER.info("NAME Clicked -- sortType = " + paramT1 + ", SortType=" + paramT2);
|
||||||
|
@ -456,7 +456,7 @@ public class MainWindowController {
|
||||||
helpData = filmsList;
|
helpData = filmsList;
|
||||||
|
|
||||||
for (int i = 0; i < helpData.size(); i++) {
|
for (int i = 0; i < helpData.size(); i++) {
|
||||||
if (helpData.get(i).getRating() == 1.0) {
|
if (helpData.get(i).getFavorite() == true) {
|
||||||
fav_true.add(i);
|
fav_true.add(i);
|
||||||
} else {
|
} else {
|
||||||
fav_false.add(i);
|
fav_false.add(i);
|
||||||
|
@ -688,7 +688,9 @@ public class MainWindowController {
|
||||||
public void addDataUI() {
|
public void addDataUI() {
|
||||||
|
|
||||||
for (FilmTabelDataType element : filmsList) {
|
for (FilmTabelDataType element : filmsList) {
|
||||||
if (element.getSeason() != 0) {
|
|
||||||
|
// only if the entry contains a season and a episode it's a valid series
|
||||||
|
if (!element.getSeason().isEmpty() && !element.getEpisode().isEmpty()) {
|
||||||
// System.out.println("Found Series: " + element.getTitle());
|
// System.out.println("Found Series: " + element.getTitle());
|
||||||
// check if there is a series node to add the item
|
// check if there is a series node to add the item
|
||||||
for (int i = 0; i < filmRoot.getChildren().size(); i++) {
|
for (int i = 0; i < filmRoot.getChildren().size(); i++) {
|
||||||
|
@ -696,14 +698,14 @@ public class MainWindowController {
|
||||||
// System.out.println("Found a root node to add child");
|
// System.out.println("Found a root node to add child");
|
||||||
// System.out.println("Adding: " + element.getStreamUrl());
|
// System.out.println("Adding: " + element.getStreamUrl());
|
||||||
TreeItem<FilmTabelDataType> episodeNode = new TreeItem<>(new FilmTabelDataType(element.getStreamUrl(),
|
TreeItem<FilmTabelDataType> episodeNode = new TreeItem<>(new FilmTabelDataType(element.getStreamUrl(),
|
||||||
element.getTitle(), element.getSeason(), element.getEpisode(), element.getRating(),
|
element.getTitle(), element.getSeason(), element.getEpisode(), element.getFavorite(),
|
||||||
element.getCached(), element.getImage()));
|
element.getCached(), element.getImage()));
|
||||||
filmRoot.getChildren().get(i).getChildren().add(episodeNode);
|
filmRoot.getChildren().get(i).getChildren().add(episodeNode);
|
||||||
} else if (i == filmRoot.getChildren().size() - 1) {
|
} else if (i == filmRoot.getChildren().size() - 1) {
|
||||||
// System.out.println("Create a root node to add child");
|
// System.out.println("Create a root node to add child");
|
||||||
// System.out.println("Adding: " + element.getStreamUrl());
|
// System.out.println("Adding: " + element.getStreamUrl());
|
||||||
TreeItem<FilmTabelDataType> seriesRootNode = new TreeItem<>(new FilmTabelDataType(element.getStreamUrl(),
|
TreeItem<FilmTabelDataType> seriesRootNode = new TreeItem<>(new FilmTabelDataType(element.getStreamUrl(),
|
||||||
element.getTitle(), 0, 0, element.getRating(), element.getCached(), element.getImage()));
|
element.getTitle(), "", "", element.getFavorite(), element.getCached(), element.getImage()));
|
||||||
filmRoot.getChildren().add(seriesRootNode);
|
filmRoot.getChildren().add(seriesRootNode);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -831,10 +833,11 @@ public class MainWindowController {
|
||||||
languageLbl.setText(getBundle().getString("languageLbl"));
|
languageLbl.setText(getBundle().getString("languageLbl"));
|
||||||
autoUpdateToggleBtn.setText(getBundle().getString("autoUpdate"));
|
autoUpdateToggleBtn.setText(getBundle().getString("autoUpdate"));
|
||||||
branchLbl.setText(getBundle().getString("branchLbl"));
|
branchLbl.setText(getBundle().getString("branchLbl"));
|
||||||
columnTitle.setText(getBundle().getString("columnName"));
|
|
||||||
columnRating.setText(getBundle().getString("columnRating"));
|
|
||||||
columnStreamUrl.setText(getBundle().getString("columnStreamUrl"));
|
columnStreamUrl.setText(getBundle().getString("columnStreamUrl"));
|
||||||
|
columnTitle.setText(getBundle().getString("columnName"));
|
||||||
columnSeason.setText(getBundle().getString("columnSeason"));
|
columnSeason.setText(getBundle().getString("columnSeason"));
|
||||||
|
columnEpisode.setText(getBundle().getString("columnEpisode"));
|
||||||
|
columnFavorite.setText(getBundle().getString("columnFavorite"));
|
||||||
errorPlay = getBundle().getString("errorPlay");
|
errorPlay = getBundle().getString("errorPlay");
|
||||||
errorLoad = getBundle().getString("errorLoad");
|
errorLoad = getBundle().getString("errorLoad");
|
||||||
errorSave = getBundle().getString("errorSave");
|
errorSave = getBundle().getString("errorSave");
|
||||||
|
@ -884,7 +887,7 @@ public class MainWindowController {
|
||||||
props.setProperty("useBeta", String.valueOf(isUseBeta()));
|
props.setProperty("useBeta", String.valueOf(isUseBeta()));
|
||||||
props.setProperty("size", getSize().toString());
|
props.setProperty("size", getSize().toString());
|
||||||
props.setProperty("local", getLocal());
|
props.setProperty("local", getLocal());
|
||||||
props.setProperty("ratingSortType", columnRating.getSortType().toString());
|
props.setProperty("ratingSortType", columnFavorite.getSortType().toString());
|
||||||
|
|
||||||
OutputStream outputStream = new FileOutputStream(main.getConfigFile()); // new output-stream
|
OutputStream outputStream = new FileOutputStream(main.getConfigFile()); // new output-stream
|
||||||
props.storeToXML(outputStream, "Project HomeFlix settings"); // writes new .xml
|
props.storeToXML(outputStream, "Project HomeFlix settings"); // writes new .xml
|
||||||
|
|
|
@ -99,7 +99,7 @@ public class DBController {
|
||||||
private void createDatabase() {
|
private void createDatabase() {
|
||||||
try {
|
try {
|
||||||
Statement stmt = connection.createStatement();
|
Statement stmt = connection.createStatement();
|
||||||
stmt.executeUpdate("create table if not exists films (streamUrl, title, season, episode, rating, cached)");
|
stmt.executeUpdate("create table if not exists films (streamUrl, title, season, episode, favorite, cached)");
|
||||||
stmt.executeUpdate("create table if not exists cache ("
|
stmt.executeUpdate("create table if not exists cache ("
|
||||||
+ "streamUrl, Title, Year, Rated, Released, Runtime, Genre, Director, Writer,"
|
+ "streamUrl, Title, Year, Rated, Released, Runtime, Genre, Director, Writer,"
|
||||||
+ " Actors, Plot, Language, Country, Awards, Metascore, imdbRating, imdbVotes,"
|
+ " Actors, Plot, Language, Country, Awards, Metascore, imdbRating, imdbVotes,"
|
||||||
|
@ -189,13 +189,14 @@ public class DBController {
|
||||||
Statement stmt = connection.createStatement();
|
Statement stmt = connection.createStatement();
|
||||||
ResultSet rs = stmt.executeQuery("SELECT * FROM films ORDER BY title");
|
ResultSet rs = stmt.executeQuery("SELECT * FROM films ORDER BY title");
|
||||||
while (rs.next()) {
|
while (rs.next()) {
|
||||||
if (rs.getInt("rating") == 1) {
|
// System.out.println(rs.getString("title") + "Season:" + rs.getString("season") + ":");
|
||||||
|
if (rs.getBoolean("favorite") == true) {
|
||||||
mainWindowController.getFilmsList().add(new FilmTabelDataType(rs.getString("streamUrl"),
|
mainWindowController.getFilmsList().add(new FilmTabelDataType(rs.getString("streamUrl"),
|
||||||
rs.getString("title"), rs.getInt("season"), rs.getInt("episode") ,rs.getDouble("rating"),
|
rs.getString("title"), rs.getString("season"), rs.getString("episode") ,rs.getBoolean("favorite"),
|
||||||
rs.getBoolean("cached"), new ImageView(favorite_black)));
|
rs.getBoolean("cached"), new ImageView(favorite_black)));
|
||||||
} else {
|
} else {
|
||||||
mainWindowController.getFilmsList().add(new FilmTabelDataType(rs.getString("streamUrl"),
|
mainWindowController.getFilmsList().add(new FilmTabelDataType(rs.getString("streamUrl"),
|
||||||
rs.getString("title"), rs.getInt("season"), rs.getInt("episode"), rs.getDouble("rating"),
|
rs.getString("title"), rs.getString("season"), rs.getString("episode"), rs.getBoolean("favorite"),
|
||||||
rs.getBoolean("cached"), new ImageView(favorite_border_black)));
|
rs.getBoolean("cached"), new ImageView(favorite_border_black)));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -220,13 +221,13 @@ public class DBController {
|
||||||
Statement stmt = connection.createStatement();
|
Statement stmt = connection.createStatement();
|
||||||
ResultSet rs = stmt.executeQuery("SELECT * FROM films WHERE streamUrl = \"" + streamUrl + "\";");
|
ResultSet rs = stmt.executeQuery("SELECT * FROM films WHERE streamUrl = \"" + streamUrl + "\";");
|
||||||
|
|
||||||
if (rs.getInt("rating") == 1) {
|
if (rs.getBoolean("favorite") == true) {
|
||||||
mainWindowController.getFilmsList().set(indexList, new FilmTabelDataType(rs.getString("streamUrl"),
|
mainWindowController.getFilmsList().set(indexList, new FilmTabelDataType(rs.getString("streamUrl"),
|
||||||
rs.getString("title"), rs.getInt("season"), rs.getInt("episode") ,rs.getDouble("rating"),
|
rs.getString("title"), rs.getString("season"), rs.getString("episode"), rs.getBoolean("favorite"),
|
||||||
rs.getBoolean("cached"), new ImageView(favorite_black)));
|
rs.getBoolean("cached"), new ImageView(favorite_black)));
|
||||||
} else {
|
} else {
|
||||||
mainWindowController.getFilmsList().set(indexList, new FilmTabelDataType(rs.getString("streamUrl"),
|
mainWindowController.getFilmsList().set(indexList, new FilmTabelDataType(rs.getString("streamUrl"),
|
||||||
rs.getString("title"), rs.getInt("season"), rs.getInt("episode"), rs.getDouble("rating"),
|
rs.getString("title"), rs.getString("season"), rs.getString("episode"), rs.getBoolean("favorite"),
|
||||||
rs.getBoolean("cached"), new ImageView(favorite_border_black)));
|
rs.getBoolean("cached"), new ImageView(favorite_border_black)));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -316,7 +317,7 @@ public class DBController {
|
||||||
if (!filmsdbStreamURL.contains(file.getPath())) {
|
if (!filmsdbStreamURL.contains(file.getPath())) {
|
||||||
stmt.executeUpdate("insert into films values ("
|
stmt.executeUpdate("insert into films values ("
|
||||||
+ "'" + file.getPath() + "',"
|
+ "'" + file.getPath() + "',"
|
||||||
+ "'" + cutOffEnd(file.getName()) + "', 0, 0, 0, 0)");
|
+ "'" + cutOffEnd(file.getName()) + "', '', '', 0, 0)");
|
||||||
connection.commit();
|
connection.commit();
|
||||||
stmt.close();
|
stmt.close();
|
||||||
LOGGER.info("Added \"" + file.getName() + "\" to database");
|
LOGGER.info("Added \"" + file.getName() + "\" to database");
|
||||||
|
@ -333,7 +334,7 @@ public class DBController {
|
||||||
LOGGER.info("Added \"" + file.getName() + "\", Episode: " + episode.getName() + " to database");
|
LOGGER.info("Added \"" + file.getName() + "\", Episode: " + episode.getName() + " to database");
|
||||||
stmt.executeUpdate("insert into films values ("
|
stmt.executeUpdate("insert into films values ("
|
||||||
+ "'" + episode.getPath() + "',"
|
+ "'" + episode.getPath() + "',"
|
||||||
+ "'" + cutOffEnd(file.getName()) + "',"+ sn + "," + ep + ", 0, 0)");
|
+ "'" + cutOffEnd(file.getName()) + "','" + sn + "','" + ep + "', 0, 0)");
|
||||||
connection.commit();
|
connection.commit();
|
||||||
stmt.close();
|
stmt.close();
|
||||||
filmsStreamURL.add(episode.getPath());
|
filmsStreamURL.add(episode.getPath());
|
||||||
|
@ -361,8 +362,8 @@ public class DBController {
|
||||||
if (streamUrl.equals(entry)) {
|
if (streamUrl.equals(entry)) {
|
||||||
ps.setString(1, streamUrl);
|
ps.setString(1, streamUrl);
|
||||||
ps.setString(2, title);
|
ps.setString(2, title);
|
||||||
ps.setInt(3, item.asObject().getInt("season", 0));
|
ps.setString(3, item.asObject().getString("season", ""));
|
||||||
ps.setInt(4, item.asObject().getInt("episode", 0));
|
ps.setString(4, item.asObject().getString("episode", ""));
|
||||||
ps.setInt(5, 0);
|
ps.setInt(5, 0);
|
||||||
ps.setBoolean(6, false);
|
ps.setBoolean(6, false);
|
||||||
ps.addBatch(); // adds the entry
|
ps.addBatch(); // adds the entry
|
||||||
|
@ -401,15 +402,14 @@ public class DBController {
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* update the database entry for the given film, rating = 0
|
* update the database entry for the given film, favorite = 0
|
||||||
* @param name of the film
|
|
||||||
* @param streamUrl URL of the film
|
* @param streamUrl URL of the film
|
||||||
*/
|
*/
|
||||||
public void dislike(String streamUrl) {
|
public void dislike(String streamUrl) {
|
||||||
LOGGER.info("dislike " + streamUrl);
|
LOGGER.info("dislike " + streamUrl);
|
||||||
try {
|
try {
|
||||||
Statement stmt = connection.createStatement();
|
Statement stmt = connection.createStatement();
|
||||||
stmt.executeUpdate("UPDATE films SET rating=0 WHERE streamUrl=\"" + streamUrl + "\";");
|
stmt.executeUpdate("UPDATE films SET favorite=0 WHERE streamUrl=\"" + streamUrl + "\";");
|
||||||
connection.commit();
|
connection.commit();
|
||||||
stmt.close();
|
stmt.close();
|
||||||
} catch (SQLException e) {
|
} catch (SQLException e) {
|
||||||
|
@ -418,15 +418,14 @@ public class DBController {
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* update the database entry for the given film, rating = 1
|
* update the database entry for the given film, favorite = 1
|
||||||
* @param name of the film
|
|
||||||
* @param streamUrl URL of the film
|
* @param streamUrl URL of the film
|
||||||
*/
|
*/
|
||||||
public void like(String streamUrl) {
|
public void like(String streamUrl) {
|
||||||
LOGGER.info("like " + streamUrl);
|
LOGGER.info("like " + streamUrl);
|
||||||
try {
|
try {
|
||||||
Statement stmt = connection.createStatement();
|
Statement stmt = connection.createStatement();
|
||||||
stmt.executeUpdate("UPDATE films SET rating=1 WHERE streamUrl=\"" + streamUrl + "\";");
|
stmt.executeUpdate("UPDATE films SET favorite=1 WHERE streamUrl=\"" + streamUrl + "\";");
|
||||||
connection.commit();
|
connection.commit();
|
||||||
stmt.close();
|
stmt.close();
|
||||||
} catch (SQLException e) {
|
} catch (SQLException e) {
|
||||||
|
|
|
@ -22,42 +22,39 @@
|
||||||
package kellerkinder.HomeFlix.datatypes;
|
package kellerkinder.HomeFlix.datatypes;
|
||||||
|
|
||||||
import javafx.beans.property.BooleanProperty;
|
import javafx.beans.property.BooleanProperty;
|
||||||
import javafx.beans.property.DoubleProperty;
|
|
||||||
import javafx.beans.property.IntegerProperty;
|
|
||||||
import javafx.beans.property.SimpleBooleanProperty;
|
import javafx.beans.property.SimpleBooleanProperty;
|
||||||
import javafx.beans.property.SimpleDoubleProperty;
|
|
||||||
import javafx.beans.property.SimpleIntegerProperty;
|
|
||||||
import javafx.beans.property.SimpleObjectProperty;
|
import javafx.beans.property.SimpleObjectProperty;
|
||||||
import javafx.beans.property.SimpleStringProperty;
|
import javafx.beans.property.SimpleStringProperty;
|
||||||
import javafx.beans.property.StringProperty;
|
import javafx.beans.property.StringProperty;
|
||||||
import javafx.scene.image.ImageView;
|
import javafx.scene.image.ImageView;
|
||||||
|
|
||||||
public class FilmTabelDataType {
|
public class FilmTabelDataType {
|
||||||
private final IntegerProperty season = new SimpleIntegerProperty();
|
|
||||||
private final IntegerProperty episode = new SimpleIntegerProperty();
|
|
||||||
private final DoubleProperty rating = new SimpleDoubleProperty();
|
|
||||||
private final StringProperty title = new SimpleStringProperty();
|
|
||||||
private final StringProperty streamUrl = new SimpleStringProperty();
|
private final StringProperty streamUrl = new SimpleStringProperty();
|
||||||
private final SimpleObjectProperty<ImageView> image = new SimpleObjectProperty<>();
|
private final StringProperty title = new SimpleStringProperty();
|
||||||
|
private final StringProperty season = new SimpleStringProperty();
|
||||||
|
private final StringProperty episode = new SimpleStringProperty();
|
||||||
|
private final BooleanProperty favorite = new SimpleBooleanProperty();
|
||||||
private final BooleanProperty cached = new SimpleBooleanProperty();
|
private final BooleanProperty cached = new SimpleBooleanProperty();
|
||||||
|
private final SimpleObjectProperty<ImageView> image = new SimpleObjectProperty<>();
|
||||||
|
|
||||||
|
|
||||||
/** TODO rating boolean
|
/**
|
||||||
* tableData is the data-type of tree-table-view
|
* tableData is the data-type of tree-table-view
|
||||||
* @param streamUrl the concrete path to the file or the URL
|
* @param streamUrl the concrete path to the file or the URL
|
||||||
* @param title title of the film
|
* @param title title of the film
|
||||||
* @param season season if it's a series
|
* @param season season if it's a series
|
||||||
* @param episode episode if it's a series
|
* @param episode episode if it's a series
|
||||||
* @param rating indicator for favorites, used for sorting the items
|
* @param favorite indicator for favorites, used for sorting the items
|
||||||
* @param cached indicator for caching status
|
* @param cached indicator for caching status
|
||||||
* @param image favorite icon
|
* @param image favorite icon
|
||||||
*/
|
*/
|
||||||
public FilmTabelDataType(final String streamUrl, final String title, final int season, final int episode,
|
public FilmTabelDataType(final String streamUrl, final String title, final String season, final String episode,
|
||||||
final double rating, final boolean cached, final ImageView image) {
|
final boolean favorite, final boolean cached, final ImageView image) {
|
||||||
this.streamUrl.set(streamUrl);
|
this.streamUrl.set(streamUrl);
|
||||||
this.title.set(title);
|
this.title.set(title);
|
||||||
this.season.set(season);
|
this.season.set(season);
|
||||||
this.episode.set(episode);
|
this.episode.set(episode);
|
||||||
this.rating.set(rating);
|
this.favorite.set(favorite);
|
||||||
this.cached.set(cached);
|
this.cached.set(cached);
|
||||||
this.image.set(image);
|
this.image.set(image);
|
||||||
}
|
}
|
||||||
|
@ -70,16 +67,16 @@ public class FilmTabelDataType {
|
||||||
return title;
|
return title;
|
||||||
}
|
}
|
||||||
|
|
||||||
public IntegerProperty seasonProperty(){
|
public StringProperty seasonProperty(){
|
||||||
return season;
|
return season;
|
||||||
}
|
}
|
||||||
|
|
||||||
public IntegerProperty episodeProperty(){
|
public StringProperty episodeProperty(){
|
||||||
return episode;
|
return episode;
|
||||||
}
|
}
|
||||||
|
|
||||||
public DoubleProperty ratingProperty(){
|
public BooleanProperty favoriteProperty(){
|
||||||
return rating;
|
return favorite;
|
||||||
}
|
}
|
||||||
|
|
||||||
public BooleanProperty cachedProperty(){
|
public BooleanProperty cachedProperty(){
|
||||||
|
@ -99,16 +96,16 @@ public class FilmTabelDataType {
|
||||||
return titleProperty().get();
|
return titleProperty().get();
|
||||||
}
|
}
|
||||||
|
|
||||||
public final int getSeason() {
|
public final String getSeason() {
|
||||||
return seasonProperty().get();
|
return seasonProperty().get();
|
||||||
}
|
}
|
||||||
|
|
||||||
public final int getEpisode() {
|
public final String getEpisode() {
|
||||||
return episodeProperty().get();
|
return episodeProperty().get();
|
||||||
}
|
}
|
||||||
|
|
||||||
public final double getRating() {
|
public final boolean getFavorite() {
|
||||||
return ratingProperty().get();
|
return favoriteProperty().get();
|
||||||
}
|
}
|
||||||
|
|
||||||
public final boolean getCached(){
|
public final boolean getCached(){
|
||||||
|
@ -128,16 +125,16 @@ public class FilmTabelDataType {
|
||||||
titleProperty().set(title);
|
titleProperty().set(title);
|
||||||
}
|
}
|
||||||
|
|
||||||
public final void setSeason(int season) {
|
public final void setSeason(String season) {
|
||||||
seasonProperty().set(season);
|
seasonProperty().set(season);
|
||||||
}
|
}
|
||||||
|
|
||||||
public final void setEpisode(int season) {
|
public final void setEpisode(String season) {
|
||||||
episodeProperty().set(season);
|
episodeProperty().set(season);
|
||||||
}
|
}
|
||||||
|
|
||||||
public final void setRating(int rating) {
|
public final void setFavorite(boolean favorite) {
|
||||||
ratingProperty().set(rating);
|
favoriteProperty().set(favorite);
|
||||||
}
|
}
|
||||||
|
|
||||||
public final void setCached(boolean cached){
|
public final void setCached(boolean cached){
|
||||||
|
|
|
@ -23,10 +23,11 @@ autoUpdate = beim Start nach Updates suchen:
|
||||||
branchLbl = Updatezweig
|
branchLbl = Updatezweig
|
||||||
|
|
||||||
#column translations
|
#column translations
|
||||||
columnName = Name
|
|
||||||
columnRating = Bewertung
|
|
||||||
columnStreamUrl = Datei Name
|
columnStreamUrl = Datei Name
|
||||||
|
columnName = Name
|
||||||
columnSeason = Staffel
|
columnSeason = Staffel
|
||||||
|
columnEpisode = Episode
|
||||||
|
columnFavorite = Favorit
|
||||||
|
|
||||||
#error translations
|
#error translations
|
||||||
errorUpdateV = Beim ausf\u00FChren des Updates ist ein Fehler aufgetreten! \nError: could not check update version (nvc)\nWeitere Hilfe erhalten sie unter www.kellerkinder.xyz \noder wenden sie sich an support@kellerkinder.xyz
|
errorUpdateV = Beim ausf\u00FChren des Updates ist ein Fehler aufgetreten! \nError: could not check update version (nvc)\nWeitere Hilfe erhalten sie unter www.kellerkinder.xyz \noder wenden sie sich an support@kellerkinder.xyz
|
||||||
|
|
|
@ -23,10 +23,11 @@ autoUpdate = check at startup for updates:
|
||||||
branchLbl = Branch
|
branchLbl = Branch
|
||||||
|
|
||||||
#column translations
|
#column translations
|
||||||
columnName = Name
|
|
||||||
columnRating = Rating
|
|
||||||
columnStreamUrl = File Name
|
columnStreamUrl = File Name
|
||||||
|
columnName = Name
|
||||||
columnSeason = Season
|
columnSeason = Season
|
||||||
|
columnEpisode = Episode
|
||||||
|
columnFavorite = Favorite
|
||||||
|
|
||||||
#error translations
|
#error translations
|
||||||
errorUpdateV = An error has occurred during update! \nError: could not check update version (nvc) \nTo get help, visit www.kellerkinder.xyz \nor contcat support@kellerkinder.xyz
|
errorUpdateV = An error has occurred during update! \nError: could not check update version (nvc) \nTo get help, visit www.kellerkinder.xyz \nor contcat support@kellerkinder.xyz
|
||||||
|
|
Loading…
Reference in New Issue