From 392349192b25612fb67ef78b9510840b46bc85f4 Mon Sep 17 00:00:00 2001 From: Dmitry Isaenko Date: Thu, 3 May 2018 05:05:34 +0300 Subject: [PATCH] v0.8.3 Minor notes. --- AppPreferences.java | 18 ++++-------------- Controller.java | 12 ++++-------- Readme.md | 15 ++++++++++++++- 3 files changed, 22 insertions(+), 23 deletions(-) diff --git a/AppPreferences.java b/AppPreferences.java index 60f8011..52c1303 100644 --- a/AppPreferences.java +++ b/AppPreferences.java @@ -55,22 +55,12 @@ public class AppPreferences { } /** Handle lists of the subtitles extensions selector */ - public void setSubsExtensionsList(String[] subsList){ - storeSingleStringList("SUBS_EXTENSIONS_LIST", subsList); - } - - public String[] getSubsExtensionsList(){ - return preferences.get("SUBS_EXTENSIONS_LIST", ".ass@@@.crt@@@").split("@@@"); - } + public void setSubsExtensionsList(String[] subsList){ storeSingleStringList("SUBS_EXTENSIONS_LIST", subsList); } + public String[] getSubsExtensionsList(){ return preferences.get("SUBS_EXTENSIONS_LIST", ".ass@@@.crt@@@").split("@@@"); } /** Handle lists of the subtitles codepage selector */ - public void setSubsCodepageList(String[] subsCodepageList){ - storeSingleStringList("SUBS_CODEPAGE_LIST", subsCodepageList); - } - - public String[] getSubsCodepageList(){ - return preferences.get("SUBS_CODEPAGE_LIST", "default@@@utf8@@@cp1251@@@koi8-r").split("@@@"); - } + public void setSubsCodepageList(String[] subsCodepageList){ storeSingleStringList("SUBS_CODEPAGE_LIST", subsCodepageList); } + public String[] getSubsCodepageList(){ return preferences.get("SUBS_CODEPAGE_LIST", "default@@@utf8@@@cp1251@@@koi8-r").split("@@@"); } // Save & recover selected by user Subtitles format public void setLastTimeUsedSusExt(String selected){ preferences.put("SUBS_EXT_LAST_TIME_SELECTED", selected); } diff --git a/Controller.java b/Controller.java index bb8cb11..e46374f 100644 --- a/Controller.java +++ b/Controller.java @@ -29,7 +29,6 @@ public class Controller implements Initializable { private ResourceBundle resourceBundle; - @FXML private CheckMenuItem fullScreen; @@ -69,7 +68,7 @@ public class Controller implements Initializable { /* Populating settings from the previous run /*/ // Populating lists - if (appPreferences.getLoadListsOnStart()){ // TODO: probably should be dedicated method in abstract class defined + if (appPreferences.getLoadListsOnStart()){ // TODO: probably should be dedicated method in abstract class defined if (!appPreferences.getListMKV().isEmpty()){ mkvPaneController.getFilesFromFolder(new File(appPreferences.getListMKV()), ".mkv"); } @@ -205,9 +204,8 @@ public class Controller implements Initializable { if (subPaneController.paneFileList.isEmpty()) appPreferences.setListSUB(""); - else { + else appPreferences.setListSUB(subPaneController.paneFileList.get(0).getParent()); - } } appPreferences.setLastTimeUsedSusExt(subPaneController.subtExt.getValue()); appPreferences.setLastTimeUsedSubsCodepage(subPaneController.subtCodepage.getValue()); @@ -226,8 +224,7 @@ public class Controller implements Initializable { // Get event that notify application in case some settings has been changed // This function called from MediatorControl after mediator receives request form SettingsController indicating that user updated some required fields. public void updateAfterSettingsChanged(){ - //** update list of extensions */ - + /** update list of extensions */ // Clear and update list String extensionPrevSelected = subPaneController.subtExt.getValue(); subPaneController.subtExtList.clear(); @@ -240,8 +237,7 @@ public class Controller implements Initializable { // In case of application failure should be better to save this immediately appPreferences.setLastTimeUsedSusExt(subPaneController.subtExt.getValue()); - //** update list of codepage */ - + /** update list of codepage */ String codepagePrevSelected = subPaneController.subtCodepage.getValue(); subPaneController.subtCodepageList.clear(); subPaneController.subtCodepageList.setAll(appPreferences.getSubsCodepageList()); diff --git a/Readme.md b/Readme.md index dd7bc0d..3f755f1 100644 --- a/Readme.md +++ b/Readme.md @@ -16,4 +16,17 @@ For example, in Debian Stretch you should install 'openjfx' package. Just start it as usual Java application: ``` $ java -jar mplayer4anime.jar -``` \ No newline at end of file +``` + +## Run on windows +Step 1. +Download and install JRE (8 or later): +http://www.oracle.com/technetwork/java/javase/downloads/jre8-downloads-2133155.html + +Step 2. +Download and install (unpack) mplayer: +http://oss.netfarm.it/mplayer/ +(see 'Build selection table', for example click 'generic') + +Step 3. +Download and run jar file. \ No newline at end of file