v0.8.3 Minor notes.

This commit is contained in:
Dmitry Isaenko 2018-05-03 05:05:34 +03:00
parent 1fca4f93b9
commit 392349192b
3 changed files with 22 additions and 23 deletions

View file

@ -55,22 +55,12 @@ public class AppPreferences {
} }
/** Handle lists of the subtitles extensions selector */ /** Handle lists of the subtitles extensions selector */
public void setSubsExtensionsList(String[] subsList){ public void setSubsExtensionsList(String[] subsList){ storeSingleStringList("SUBS_EXTENSIONS_LIST", subsList); }
storeSingleStringList("SUBS_EXTENSIONS_LIST", subsList); public String[] getSubsExtensionsList(){ return preferences.get("SUBS_EXTENSIONS_LIST", ".ass@@@.crt@@@").split("@@@"); }
}
public String[] getSubsExtensionsList(){
return preferences.get("SUBS_EXTENSIONS_LIST", ".ass@@@.crt@@@").split("@@@");
}
/** Handle lists of the subtitles codepage selector */ /** Handle lists of the subtitles codepage selector */
public void setSubsCodepageList(String[] subsCodepageList){ public void setSubsCodepageList(String[] subsCodepageList){ storeSingleStringList("SUBS_CODEPAGE_LIST", subsCodepageList); }
storeSingleStringList("SUBS_CODEPAGE_LIST", subsCodepageList); public String[] getSubsCodepageList(){ return preferences.get("SUBS_CODEPAGE_LIST", "default@@@utf8@@@cp1251@@@koi8-r").split("@@@"); }
}
public String[] getSubsCodepageList(){
return preferences.get("SUBS_CODEPAGE_LIST", "default@@@utf8@@@cp1251@@@koi8-r").split("@@@");
}
// Save & recover selected by user Subtitles format // Save & recover selected by user Subtitles format
public void setLastTimeUsedSusExt(String selected){ preferences.put("SUBS_EXT_LAST_TIME_SELECTED", selected); } public void setLastTimeUsedSusExt(String selected){ preferences.put("SUBS_EXT_LAST_TIME_SELECTED", selected); }

View file

@ -29,7 +29,6 @@ public class Controller implements Initializable {
private ResourceBundle resourceBundle; private ResourceBundle resourceBundle;
@FXML @FXML
private CheckMenuItem fullScreen; private CheckMenuItem fullScreen;
@ -69,7 +68,7 @@ public class Controller implements Initializable {
/* Populating settings from the previous run /*/ /* Populating settings from the previous run /*/
// Populating lists // 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()){ if (!appPreferences.getListMKV().isEmpty()){
mkvPaneController.getFilesFromFolder(new File(appPreferences.getListMKV()), ".mkv"); mkvPaneController.getFilesFromFolder(new File(appPreferences.getListMKV()), ".mkv");
} }
@ -205,9 +204,8 @@ public class Controller implements Initializable {
if (subPaneController.paneFileList.isEmpty()) if (subPaneController.paneFileList.isEmpty())
appPreferences.setListSUB(""); appPreferences.setListSUB("");
else { else
appPreferences.setListSUB(subPaneController.paneFileList.get(0).getParent()); appPreferences.setListSUB(subPaneController.paneFileList.get(0).getParent());
}
} }
appPreferences.setLastTimeUsedSusExt(subPaneController.subtExt.getValue()); appPreferences.setLastTimeUsedSusExt(subPaneController.subtExt.getValue());
appPreferences.setLastTimeUsedSubsCodepage(subPaneController.subtCodepage.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 // 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. // This function called from MediatorControl after mediator receives request form SettingsController indicating that user updated some required fields.
public void updateAfterSettingsChanged(){ public void updateAfterSettingsChanged(){
//** update list of extensions */ /** update list of extensions */
// Clear and update list // Clear and update list
String extensionPrevSelected = subPaneController.subtExt.getValue(); String extensionPrevSelected = subPaneController.subtExt.getValue();
subPaneController.subtExtList.clear(); subPaneController.subtExtList.clear();
@ -240,8 +237,7 @@ public class Controller implements Initializable {
// In case of application failure should be better to save this immediately // In case of application failure should be better to save this immediately
appPreferences.setLastTimeUsedSusExt(subPaneController.subtExt.getValue()); appPreferences.setLastTimeUsedSusExt(subPaneController.subtExt.getValue());
//** update list of codepage */ /** update list of codepage */
String codepagePrevSelected = subPaneController.subtCodepage.getValue(); String codepagePrevSelected = subPaneController.subtCodepage.getValue();
subPaneController.subtCodepageList.clear(); subPaneController.subtCodepageList.clear();
subPaneController.subtCodepageList.setAll(appPreferences.getSubsCodepageList()); subPaneController.subtCodepageList.setAll(appPreferences.getSubsCodepageList());

View file

@ -16,4 +16,17 @@ For example, in Debian Stretch you should install 'openjfx' package.
Just start it as usual Java application: Just start it as usual Java application:
``` ```
$ java -jar mplayer4anime.jar $ java -jar mplayer4anime.jar
``` ```
## 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.