added getAllNotCachedEntries()
* added a method to get all not cached entries from the films db
This commit is contained in:
@ -213,6 +213,8 @@ public class MainWindowController {
|
||||
initUI();
|
||||
initActions();
|
||||
dbController.init();
|
||||
|
||||
checkAllPosters(); // TODO testing
|
||||
}
|
||||
|
||||
// Initialize general UI elements
|
||||
@ -801,6 +803,22 @@ public class MainWindowController {
|
||||
String mimeType = URLConnection.guessContentTypeFromName(film.getStreamUrl());
|
||||
return mimeType != null && (mimeType.contains("mp4") || mimeType.contains("vp6"));
|
||||
}
|
||||
|
||||
private void posterModeStartup() {
|
||||
checkAllPosters();
|
||||
}
|
||||
|
||||
/**
|
||||
* check if all posters are cached, if not cache the missing ones
|
||||
*/
|
||||
private void checkAllPosters() {
|
||||
// get all not cached entries, none of them should have a cached poster
|
||||
for (FilmTabelDataType entry : dbController.getAllNotCachedEntries()) {
|
||||
System.out.println(entry.getStreamUrl() + " is NOT cached!");
|
||||
// TODO get all needed posters eg cache all not cached entries
|
||||
// TODO for entries not available show homeflix logo
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
// getter and setter
|
||||
|
Reference in New Issue
Block a user