v0.8.3 Minor notes.

master
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 */
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); }

View File

@ -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());

View File

@ -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
```
```
## 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.