Merge remote-tracking branch 'origin/master'

# Conflicts:
#	.idea/misc.xml
#	.idea/workspace.xml
#	src/ffmpegconverter/Main.java
This commit is contained in:
Kristian Knarvik 2020-02-10 22:53:46 +01:00
commit f0fbe6f4a3
6 changed files with 87 additions and 148 deletions

View File

@ -1,11 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<module type="JAVA_MODULE" version="4">
<component name="NewModuleRootManager" inherit-compiler-output="true">
<exclude-output />
<content url="file://$MODULE_DIR$">
<sourceFolder url="file://$MODULE_DIR$/src" isTestSource="false" />
</content>
<orderEntry type="inheritedJdk" />
<orderEntry type="sourceFolder" forTests="false" />
</component>
</module>

View File

@ -0,0 +1,5 @@
<component name="ProjectCodeStyleConfiguration">
<state>
<option name="PREFERRED_PROJECT_CODE_STYLE" value="Default" />
</state>
</component>

View File

@ -2,7 +2,7 @@
<project version="4">
<component name="ProjectModuleManager">
<modules>
<module fileurl="file://$PROJECT_DIR$/.idea/FFmpegConvert1.iml" filepath="$PROJECT_DIR$/.idea/FFmpegConvert1.iml" />
<module fileurl="file://$PROJECT_DIR$/.idea/FFmpegConvert.iml" filepath="$PROJECT_DIR$/.idea/FFmpegConvert.iml" />
</modules>
</component>
</project>

View File

@ -6,10 +6,23 @@
</artifacts-to-build>
</component>
<component name="ChangeListManager">
<list default="true" id="e9b48a04-29ff-46ce-9630-42742dc34d68" name="Default" comment="Rewrites a lot of code&#10;&#10;Streams are now parsed to objects, making it easier to get required information.&#10;Improved styling.&#10;Some better comments.&#10;Better input parsing.">
<change beforePath="$PROJECT_DIR$/.gitignore" beforeDir="false" afterPath="$PROJECT_DIR$/.gitignore" afterDir="false" />
<list default="true" id="e9b48a04-29ff-46ce-9630-42742dc34d68" name="Default" comment="Updates to changes done while the server was down&#10;&#10;Better reading&#10;Better output&#10;Things which can be final are final&#10;Adds more lines to prevent signs + songs instead of full subtitles">
<change afterPath="$PROJECT_DIR$/.idea/codeStyles/codeStyleConfig.xml" afterDir="false" />
<change beforePath="$PROJECT_DIR$/.idea/FFmpegConvert1.iml" beforeDir="false" />
<change beforePath="$PROJECT_DIR$/.idea/misc.xml" beforeDir="false" afterPath="$PROJECT_DIR$/.idea/misc.xml" afterDir="false" />
<change beforePath="$PROJECT_DIR$/.idea/modules.xml" beforeDir="false" afterPath="$PROJECT_DIR$/.idea/modules.xml" afterDir="false" />
<change beforePath="$PROJECT_DIR$/.idea/workspace.xml" beforeDir="false" afterPath="$PROJECT_DIR$/.idea/workspace.xml" afterDir="false" />
<change beforePath="$PROJECT_DIR$/FFmpegConvert.iml" beforeDir="false" afterPath="$PROJECT_DIR$/.idea/FFmpegConvert.iml" afterDir="false" />
<change beforePath="$PROJECT_DIR$/FFmpegConvert/pom.xml" beforeDir="false" />
<change beforePath="$PROJECT_DIR$/FFmpegConvert/src/main/java/net/knarcraft/ffmpegconvert/Main.java" beforeDir="false" />
<change beforePath="$PROJECT_DIR$/FFmpegConvert/src/main/java/net/knarcraft/ffmpegconvert/converter/AnimeConverter.java" beforeDir="false" />
<change beforePath="$PROJECT_DIR$/FFmpegConvert/src/main/java/net/knarcraft/ffmpegconvert/converter/AudioConverter.java" beforeDir="false" />
<change beforePath="$PROJECT_DIR$/FFmpegConvert/src/main/java/net/knarcraft/ffmpegconvert/converter/Converter.java" beforeDir="false" />
<change beforePath="$PROJECT_DIR$/FFmpegConvert/src/main/java/net/knarcraft/ffmpegconvert/converter/VideoConverter.java" beforeDir="false" />
<change beforePath="$PROJECT_DIR$/FFmpegConvert/src/main/java/net/knarcraft/ffmpegconvert/streams/AudioStream.java" beforeDir="false" />
<change beforePath="$PROJECT_DIR$/FFmpegConvert/src/main/java/net/knarcraft/ffmpegconvert/streams/StreamObject.java" beforeDir="false" />
<change beforePath="$PROJECT_DIR$/FFmpegConvert/src/main/java/net/knarcraft/ffmpegconvert/streams/SubtitleStream.java" beforeDir="false" />
<change beforePath="$PROJECT_DIR$/FFmpegConvert/src/main/java/net/knarcraft/ffmpegconvert/streams/VideoStream.java" beforeDir="false" />
<change beforePath="$PROJECT_DIR$/src/ffmpegconverter/Main.java" beforeDir="false" afterPath="$PROJECT_DIR$/src/ffmpegconverter/Main.java" afterDir="false" />
<change beforePath="$PROJECT_DIR$/src/ffmpegconverter/converter/AnimeConverter.java" beforeDir="false" afterPath="$PROJECT_DIR$/src/ffmpegconverter/converter/AnimeConverter.java" afterDir="false" />
<change beforePath="$PROJECT_DIR$/src/ffmpegconverter/converter/Converter.java" beforeDir="false" afterPath="$PROJECT_DIR$/src/ffmpegconverter/converter/Converter.java" afterDir="false" />
@ -51,35 +64,39 @@
<option name="ROOT_SYNC" value="DONT_SYNC" />
<option name="RECENT_GIT_ROOT_PATH" value="$PROJECT_DIR$" />
</component>
<component name="ProjectId" id="1XaYXLh1NRiz0qdcyxwpVTUquTI" />
<component name="ProjectId" id="1WfbPiqozXBDbQKoOXR3kRo6QDL" />
<component name="ProjectViewState">
<option name="hideEmptyMiddlePackages" value="true" />
<option name="showExcludedFiles" value="true" />
<option name="showLibraryContents" value="true" />
</component>
<component name="PropertiesComponent">
<property name="SHARE_PROJECT_CONFIGURATION_FILES" value="true" />
<property name="WebServerToolWindowFactoryState" value="false" />
<property name="aspect.path.notification.shown" value="true" />
<property name="com.android.tools.idea.instantapp.provision.ProvisionBeforeRunTaskProvider.myTimeStamp" value="1570424750556" />
<property name="last_opened_file_path" value="$PROJECT_DIR$" />
<property name="com.android.tools.idea.instantapp.provision.ProvisionBeforeRunTaskProvider.myTimeStamp" value="1570316553479" />
<property name="last_opened_file_path" value="$PROJECT_DIR$/src/ffmpegconverter" />
<property name="nodejs_interpreter_path.stuck_in_default_project" value="undefined stuck path" />
<property name="nodejs_npm_path_reset_for_default_project" value="true" />
<property name="nodejs_package_manager_path" value="npm" />
<property name="project.structure.last.edited" value="Project" />
<property name="project.structure.last.edited" value="Problems" />
<property name="project.structure.proportion" value="0.15332031" />
<property name="project.structure.side.proportion" value="0.2" />
<property name="settings.editor.selected.configurable" value="vcs.Git" />
<property name="settings.editor.selected.configurable" value="preferences.sourceCode" />
</component>
<component name="RecentsManager">
<key name="CopyFile.RECENT_KEYS">
<recent name="C:\Users\Kristian\IdeaProjects\FFmpegConvert1" />
<recent name="$PROJECT_DIR$/src/ffmpegconverter" />
<recent name="C:\Users\Kristian\IdeaProjects\FFmpegConvert" />
</key>
<key name="MoveFile.RECENT_KEYS">
<recent name="$PROJECT_DIR$/.idea" />
</key>
</component>
<component name="RunManager">
<configuration name="Main" type="Application" factoryName="Application" temporary="true" nameIsGenerated="true">
<option name="MAIN_CLASS_NAME" value="ffmpegconverter.Main" />
<module name="FFmpegConvert1" />
<option name="WORKING_DIRECTORY" value="$PROJECT_DIR$" />
<module name="FFmpegConvert" />
<extension name="coverage">
<pattern>
<option name="PATTERN" value="ffmpegconverter.*" />
@ -118,6 +135,18 @@
</list>
</recent_temporary>
</component>
<component name="ServiceViewManager">
<option name="viewStates">
<list>
<serviceView>
<treeState>
<expand />
<select />
</treeState>
</serviceView>
</list>
</option>
</component>
<component name="SvnConfiguration">
<configuration />
</component>
@ -199,7 +228,7 @@
<workItem from="1561850923206" duration="1264000" />
<workItem from="1566295287966" duration="29127000" />
<workItem from="1568269273856" duration="26000" />
<workItem from="1570010166713" duration="21035000" />
<workItem from="1570010166713" duration="19096000" />
</task>
<task id="LOCAL-00001" summary="Adds missing files">
<created>1538261222377</created>
@ -236,18 +265,11 @@
<option name="project" value="LOCAL" />
<updated>1566327932040</updated>
</task>
<task id="LOCAL-00006" summary="Rewrites a lot of code&#10;&#10;Streams are now parsed to objects, making it easier to get required information.&#10;Improved styling.&#10;Some better comments.&#10;Better input parsing.">
<created>1570316567291</created>
<option name="number" value="00006" />
<option name="presentableId" value="LOCAL-00006" />
<option name="project" value="LOCAL" />
<updated>1570316567291</updated>
</task>
<option name="localTasksCounter" value="7" />
<option name="localTasksCounter" value="6" />
<servers />
</component>
<component name="TimeTrackingManager">
<option name="totallyTimeSpent" value="152768000" />
<option name="totallyTimeSpent" value="150829000" />
</component>
<component name="TodoView" selected-index="4">
<todo-panel id="selected-file">
@ -268,121 +290,45 @@
<MESSAGE value="Adds surround to stereo" />
<MESSAGE value="Improves reading of input" />
<MESSAGE value="Rewrites a lot of code&#10;&#10;Streams are now parsed to objects, making it easier to get required information.&#10;Improved styling.&#10;Some better comments.&#10;Better input parsing." />
<option name="LAST_COMMIT_MESSAGE" value="Rewrites a lot of code&#10;&#10;Streams are now parsed to objects, making it easier to get required information.&#10;Improved styling.&#10;Some better comments.&#10;Better input parsing." />
<MESSAGE value="Updates to changes done while the server was down&#10;&#10;Better reading&#10;Better output&#10;Things which can be final are final&#10;Adds more lines to prevent signs + songs instead of full subtitles" />
<option name="LAST_COMMIT_MESSAGE" value="Updates to changes done while the server was down&#10;&#10;Better reading&#10;Better output&#10;Things which can be final are final&#10;Adds more lines to prevent signs + songs instead of full subtitles" />
</component>
<component name="WindowStateProjectService">
<state x="335" y="409" key="#com.intellij.ide.util.projectWizard.JdkChooserPanel.MyDialog" timestamp="1581285739239">
<screen x="0" y="0" width="1920" height="1040" />
<state x="379" y="60" key="#Main" timestamp="1579543971698">
<screen x="0" y="36" width="1366" height="732" />
</state>
<state x="335" y="409" key="#com.intellij.ide.util.projectWizard.JdkChooserPanel.MyDialog/0.0.1920.1040@0.0.1920.1040" timestamp="1581285739239" />
<state x="49" y="65" key="CommitChangelistDialog2" timestamp="1581371268799">
<screen x="0" y="0" width="1920" height="1040" />
<state x="379" y="60" key="#Main/0.36.1366.732@0.36.1366.732" timestamp="1579543971698" />
<state x="0" y="36" width="1366" height="732" key="CommitChangelistDialog2" timestamp="1579545452859">
<screen x="0" y="36" width="1366" height="732" />
</state>
<state x="49" y="65" key="CommitChangelistDialog2/0.0.1920.1040@0.0.1920.1040" timestamp="1581371268799" />
<state width="914" height="354" key="GridCell.Tab.0.bottom" timestamp="1581371268844">
<screen x="0" y="0" width="1920" height="1040" />
<state x="0" y="36" width="1366" height="732" key="CommitChangelistDialog2/0.36.1366.732@0.36.1366.732" timestamp="1579545452859" />
<state width="1320" height="162" key="GridCell.Tab.0.bottom" timestamp="1579544838853">
<screen x="0" y="36" width="1366" height="732" />
</state>
<state width="914" height="354" key="GridCell.Tab.0.bottom/0.0.1920.1040@0.0.1920.1040" timestamp="1581371268844" />
<state width="914" height="354" key="GridCell.Tab.0.center" timestamp="1581371268844">
<screen x="0" y="0" width="1920" height="1040" />
<state width="1320" height="162" key="GridCell.Tab.0.bottom/0.36.1366.732@0.36.1366.732" timestamp="1579544838853" />
<state width="1320" height="162" key="GridCell.Tab.0.center" timestamp="1579544838853">
<screen x="0" y="36" width="1366" height="732" />
</state>
<state width="914" height="354" key="GridCell.Tab.0.center/0.0.1920.1040@0.0.1920.1040" timestamp="1581371268844" />
<state width="914" height="354" key="GridCell.Tab.0.left" timestamp="1581371268844">
<screen x="0" y="0" width="1920" height="1040" />
<state width="1320" height="162" key="GridCell.Tab.0.center/0.36.1366.732@0.36.1366.732" timestamp="1579544838853" />
<state width="1320" height="162" key="GridCell.Tab.0.left" timestamp="1579544838848">
<screen x="0" y="36" width="1366" height="732" />
</state>
<state width="914" height="354" key="GridCell.Tab.0.left/0.0.1920.1040@0.0.1920.1040" timestamp="1581371268844" />
<state width="914" height="354" key="GridCell.Tab.0.right" timestamp="1581371268844">
<screen x="0" y="0" width="1920" height="1040" />
<state width="1320" height="162" key="GridCell.Tab.0.left/0.36.1366.732@0.36.1366.732" timestamp="1579544838848" />
<state width="1320" height="162" key="GridCell.Tab.0.right" timestamp="1579544838853">
<screen x="0" y="36" width="1366" height="732" />
</state>
<state width="914" height="354" key="GridCell.Tab.0.right/0.0.1920.1040@0.0.1920.1040" timestamp="1581371268844" />
</component>
<component name="masterDetails">
<states>
<state key="ArtifactsStructureConfigurable.UI">
<settings>
<artifact-editor />
<last-edited>FFmpegConvert</last-edited>
<splitter-proportions>
<option name="proportions">
<list>
<option value="0.2" />
<option value="0.5" />
</list>
</option>
</splitter-proportions>
</settings>
</state>
<state key="FacetStructureConfigurable.UI">
<settings>
<last-edited>No facets are configured</last-edited>
<splitter-proportions>
<option name="proportions">
<list>
<option value="0.2" />
</list>
</option>
</splitter-proportions>
</settings>
</state>
<state key="GlobalLibrariesConfigurable.UI">
<settings>
<splitter-proportions>
<option name="proportions">
<list>
<option value="0.2" />
</list>
</option>
</splitter-proportions>
</settings>
</state>
<state key="JdkListConfigurable.UI">
<settings>
<last-edited>1.8</last-edited>
<splitter-proportions>
<option name="proportions">
<list>
<option value="0.2" />
</list>
</option>
</splitter-proportions>
</settings>
</state>
<state key="ModuleStructureConfigurable.UI">
<settings>
<last-edited>FFmpegConvert1</last-edited>
<splitter-proportions>
<option name="proportions">
<list>
<option value="0.2" />
<option value="0.6" />
</list>
</option>
</splitter-proportions>
</settings>
</state>
<state key="ProjectJDKs.UI">
<settings>
<last-edited>1.8</last-edited>
<splitter-proportions>
<option name="proportions">
<list>
<option value="0.2" />
</list>
</option>
</splitter-proportions>
</settings>
</state>
<state key="ProjectLibrariesConfigurable.UI">
<settings>
<splitter-proportions>
<option name="proportions">
<list>
<option value="0.2" />
</list>
</option>
</splitter-proportions>
</settings>
</state>
</states>
<state width="1320" height="162" key="GridCell.Tab.0.right/0.36.1366.732@0.36.1366.732" timestamp="1579544838853" />
<state x="0" y="36" width="1032" height="732" key="SettingsEditor" timestamp="1579544527545">
<screen x="0" y="36" width="1366" height="732" />
</state>
<state x="0" y="36" width="1032" height="732" key="SettingsEditor/0.36.1366.732@0.36.1366.732" timestamp="1579544527545" />
<state x="279" y="136" key="Vcs.Push.Dialog.v2" timestamp="1579547079762">
<screen x="0" y="36" width="1366" height="732" />
</state>
<state x="279" y="136" key="Vcs.Push.Dialog.v2/0.36.1366.732@0.36.1366.732" timestamp="1579547079762" />
<state x="364" y="230" key="com.intellij.ide.util.TipDialog" timestamp="1579543587189">
<screen x="0" y="36" width="1366" height="732" />
</state>
<state x="364" y="230" key="com.intellij.ide.util.TipDialog/0.36.1366.732@0.36.1366.732" timestamp="1579543587189" />
</component>
</project>

View File

@ -80,7 +80,7 @@ public class Main {
/**
* Prints a string
* @param input <p>The string to print.</p>
* @throws IOException <p>If the writer can't be written to.</p>
* @throws IOException <p>If the writer fails to write.</p>
*/
private static void print(String input) throws IOException {
WRITER.write(input);
@ -90,7 +90,7 @@ public class Main {
/**
* Prints a string and a line break
* @param input <p>The string to print.</p>
* @throws IOException <p>If the writer can't be written to.</p>
* @throws IOException <p>If the writer fails to write.</p>
*/
private static void printl(String input) throws IOException {
WRITER.write(input);
@ -213,11 +213,10 @@ public class Main {
/**
* Initializes the anime converter
* @throws IOException <p>If something goes wrong.</p>
* @throws IOException <p>If reading or writing fails.</p>
*/
private static void animeConverter() throws IOException {
printl("[Audio languages jpn,eng,ger,fre] [Subtitle languages eng,ger,fre] " +
"[Convert to stereo if necessary true/false] [Prevent signs&songs subtitles true/false]\nYour input: ");
printl("[Audio languages jpn,eng,ger,fre] [Subtitle languages eng,ger,fre] [Convert to stereo if necessary true/false] [Prevent signs&songs subtitles true/false]\nYour input: ");
List<String> input = readInput(4);
String[] audioLang = new String[]{"jpn", "*"};
String[] subtitleLang = new String[]{"eng", "*"};
@ -274,7 +273,7 @@ public class Main {
* Gets the user's choice
* @param prompt <p>The prompt shown to the user.</p>
* @return <p>The non-empty choice given by the user.</p>
* @throws IOException <p>If the reader can't be read.</p>
* @throws IOException <p>If reading or writing fails.</p>
*/
private static String getChoice(String prompt) throws IOException {
printl(prompt);