Allows setting max lines and max line length, enables DeepL, adds user setup bridge
This commit is contained in:
@@ -12,6 +12,10 @@
|
||||
<artifactId>autosubtitle-gui-run</artifactId>
|
||||
|
||||
<dependencies>
|
||||
<dependency>
|
||||
<groupId>com.github.gtache.autosubtitle</groupId>
|
||||
<artifactId>autosubtitle-deepl</artifactId>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>com.github.gtache.autosubtitle</groupId>
|
||||
<artifactId>autosubtitle-ffmpeg</artifactId>
|
||||
|
||||
@@ -1,53 +0,0 @@
|
||||
package com.github.gtache.autosubtitle.modules.gui.run;
|
||||
|
||||
import com.github.gtache.autosubtitle.Language;
|
||||
import com.github.gtache.autosubtitle.Translator;
|
||||
import com.github.gtache.autosubtitle.modules.setup.impl.TranslatorSetup;
|
||||
import com.github.gtache.autosubtitle.setup.SetupManager;
|
||||
import com.github.gtache.autosubtitle.subtitle.Subtitle;
|
||||
import com.github.gtache.autosubtitle.subtitle.SubtitleCollection;
|
||||
import dagger.Module;
|
||||
import dagger.Provides;
|
||||
|
||||
/**
|
||||
* Module for missing components
|
||||
*/
|
||||
@Module
|
||||
public abstract class MissingComponentsModule {
|
||||
|
||||
private MissingComponentsModule() {
|
||||
|
||||
}
|
||||
|
||||
@Provides
|
||||
static Translator providesTranslator() {
|
||||
return new Translator<>() {
|
||||
@Override
|
||||
public Language getLanguage(final String text) {
|
||||
return Language.getDefault();
|
||||
}
|
||||
|
||||
@Override
|
||||
public String translate(final String text, final Language to) {
|
||||
return text;
|
||||
}
|
||||
|
||||
@Override
|
||||
public Subtitle translate(final Subtitle subtitle, final Language to) {
|
||||
return subtitle;
|
||||
}
|
||||
|
||||
@Override
|
||||
public SubtitleCollection<Subtitle> translate(final SubtitleCollection<?> collection, final Language to) {
|
||||
return (SubtitleCollection<Subtitle>) collection;
|
||||
}
|
||||
};
|
||||
}
|
||||
|
||||
@Provides
|
||||
@TranslatorSetup
|
||||
static SetupManager providesTranslatorSetupManager() {
|
||||
return new NoOpSetupManager();
|
||||
}
|
||||
|
||||
}
|
||||
@@ -1,64 +0,0 @@
|
||||
package com.github.gtache.autosubtitle.modules.gui.run;
|
||||
|
||||
import com.github.gtache.autosubtitle.setup.SetupException;
|
||||
import com.github.gtache.autosubtitle.setup.SetupListener;
|
||||
import com.github.gtache.autosubtitle.setup.SetupManager;
|
||||
import com.github.gtache.autosubtitle.setup.SetupStatus;
|
||||
|
||||
class NoOpSetupManager implements SetupManager {
|
||||
|
||||
@Override
|
||||
public String name() {
|
||||
return "NoOpSetupManager";
|
||||
}
|
||||
|
||||
@Override
|
||||
public SetupStatus status() {
|
||||
return SetupStatus.NOT_INSTALLED;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean isInstalled() throws SetupException {
|
||||
return false;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void install() throws SetupException {
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public void uninstall() throws SetupException {
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public void reinstall() throws SetupException {
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean isUpdateAvailable() throws SetupException {
|
||||
return false;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void update() throws SetupException {
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public void addListener(final SetupListener listener) {
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public void removeListener(final SetupListener listener) {
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public void removeListeners() {
|
||||
|
||||
}
|
||||
}
|
||||
@@ -1,5 +1,6 @@
|
||||
package com.github.gtache.autosubtitle.modules.gui.run;
|
||||
|
||||
import com.github.gtache.autosubtitle.modules.deepl.DeepLModule;
|
||||
import com.github.gtache.autosubtitle.modules.ffmpeg.FFmpegModule;
|
||||
import com.github.gtache.autosubtitle.modules.gui.fx.FXModule;
|
||||
import com.github.gtache.autosubtitle.modules.gui.impl.GuiCoreModule;
|
||||
@@ -15,7 +16,7 @@ import javax.inject.Singleton;
|
||||
*/
|
||||
@Singleton
|
||||
@Component(modules = {CoreModule.class, GuiCoreModule.class, FXModule.class, FFmpegModule.class,
|
||||
WhisperXModule.class, MissingComponentsModule.class})
|
||||
WhisperXModule.class, DeepLModule.class})
|
||||
public interface RunComponent {
|
||||
|
||||
/**
|
||||
|
||||
@@ -1,7 +1,8 @@
|
||||
/**
|
||||
* Main module for auto-subtitle
|
||||
*/
|
||||
module com.github.gtache.autosubtitle.run {
|
||||
module com.github.gtache.autosubtitle.gui.run {
|
||||
requires com.github.gtache.autosubtitle.deepl;
|
||||
requires com.github.gtache.autosubtitle.ffmpeg;
|
||||
requires com.github.gtache.autosubtitle.gui.fx;
|
||||
requires com.github.gtache.autosubtitle.whisperx;
|
||||
|
||||
Reference in New Issue
Block a user