Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Version 6 initial release #362

Merged
merged 47 commits into from
Dec 29, 2021
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
Show all changes
47 commits
Select commit Hold shift + click to select a range
42cec03
Mac OS Build
yermak Oct 29, 2021
d041e26
Merge branch 'issues/312_m4b_optimisatin' into macos
yermak Dec 13, 2021
1e8adde
Merge branch 'feature/318_force_reencoding' into macos
yermak Dec 13, 2021
4148a0c
moved os dependand tools and Dev plugs into Environment
yermak Dec 13, 2021
4608538
Merge branch 'development' into macos
yermak Dec 20, 2021
d7a7259
merge fixes
yermak Dec 20, 2021
e3172b7
fixed macos/windows environment issues
yermak Dec 20, 2021
eef4f07
fixed macos/windows environment issues
yermak Dec 20, 2021
bd62c63
fixed macos/windows environment issues
yermak Dec 20, 2021
1b0ba8f
Merge pull request #341 from yermak/macos
yermak Dec 20, 2021
6e1fd64
fixed version hack
yermak Dec 20, 2021
fd5d7bc
fixed version hack
yermak Dec 20, 2021
fa6300c
clean-up
yermak Dec 20, 2021
7177de8
clean-up
yermak Dec 20, 2021
344c18a
Merge pull request #342 from yermak/clean-up
yermak Dec 20, 2021
fa13b0f
fixed potential image name clash in temp files
yermak Dec 22, 2021
f85a14d
Merge pull request #344 from yermak/issue/343_artwork_conflict
yermak Dec 22, 2021
9dc738d
Fixed random io bug on iOS while searching artwork on samba network d…
yermak Dec 23, 2021
3e003a5
Fixed combining Parts
yermak Dec 23, 2021
f03f61c
Fixed splitting chapters
yermak Dec 23, 2021
843e697
Merge pull request #346 from yermak/issue/345_split_combine
yermak Dec 23, 2021
16af7b6
added Xodus database instead of property file, Moved genres to database
yermak Dec 24, 2021
2b9b105
moved presets to database
yermak Dec 24, 2021
5e63bf1
propperties moved to database
yermak Dec 24, 2021
62ec7e2
renamed properties into settings
yermak Dec 24, 2021
e6f2923
fixed NPE in loading properties from settings db
yermak Dec 25, 2021
6249091
adding lazy reencoding option and fixing optimisation error
yermak Dec 27, 2021
49d81b2
adding lazy reencoding option and fixing optimisation error
yermak Dec 27, 2021
7e7ad8b
Merge pull request #348
yermak Dec 27, 2021
b705e98
Merge pull request #350 from yermak/features/206_avoid_reencoding
yermak Dec 27, 2021
24572e2
adding progress for artwork and optimisation, fixed force reencoding
yermak Dec 28, 2021
0923da5
Merge pull request #351 from yermak/features/332_progress_for_art_wor…
yermak Dec 28, 2021
25be3d3
fixed preset saving behaviour
yermak Dec 28, 2021
5d83963
fixed preset saving behaviour
yermak Dec 28, 2021
955fb44
fixed preset saving behaviour
yermak Dec 28, 2021
622a381
fixed preset saving behaviour
yermak Dec 28, 2021
97922cf
Merge pull request #354 from yermak/issue/347_app_settings
yermak Dec 28, 2021
c59aea2
fixed #269
yermak Dec 28, 2021
61a88d7
Merge pull request #355 from yermak/issues/269_subtracks_single_file
yermak Dec 28, 2021
82c62bf
packaging jdk for xodus
yermak Dec 28, 2021
9c30da0
Merge pull request #356
yermak Dec 28, 2021
3fb7ad5
division by zero fix
yermak Dec 28, 2021
3e04887
Merge pull request #357
yermak Dec 28, 2021
db10c17
fixed optimsation issue with jpg art added as binary data
yermak Dec 29, 2021
bac8f37
Merge pull request #360
yermak Dec 29, 2021
cd3f709
version bump
yermak Dec 29, 2021
0208959
Merge pull request #361
yermak Dec 29, 2021
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
fixed optimsation issue with jpg art added as binary data
  • Loading branch information
yermak committed Dec 29, 2021
commit db10c175f673d5d20b78154c0eedb1920ed6920d
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
import java.io.FileInputStream;
import java.io.FileNotFoundException;

@Deprecated
public class ArtWorkBean implements ArtWork {
private final String fileName;
private final long crc32;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -145,8 +145,6 @@ public void run() {
javafx.application.Platform.runLater(() -> {
Alert alert = new Alert(Alert.AlertType.CONFIRMATION);
alert.setTitle("New Version Available!");
String path = FileManager.getPathToApplicationBundle();
// alert.setContentText("path:"+ path);
alert.setContentText("Would you like to download new version?");
Optional<ButtonType> result = alert.showAndWait();
if ((result.isPresent()) && (result.get() == ButtonType.OK)) {
Expand Down
8 changes: 6 additions & 2 deletions src/main/java/uk/yermak/audiobookconverter/FFMediaLoader.java
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@

import com.google.common.collect.ImmutableMap;
import com.google.common.collect.ImmutableSet;
import javafx.scene.image.Image;
import net.bramp.ffmpeg.FFprobe;
import net.bramp.ffmpeg.probe.FFmpegChapter;
import net.bramp.ffmpeg.probe.FFmpegFormat;
Expand All @@ -15,6 +16,8 @@
import uk.yermak.audiobookconverter.fx.ConversionContext;

import java.io.File;
import java.io.FileInputStream;
import java.io.FileNotFoundException;
import java.io.IOException;
import java.lang.invoke.MethodHandles;
import java.nio.charset.StandardCharsets;
Expand Down Expand Up @@ -220,7 +223,7 @@ static Collection<File> findPictures(File dir) {
}
}

static void searchForPosters(List<MediaInfo> media) {
static void searchForPosters(List<MediaInfo> media) throws FileNotFoundException {
Set<File> searchDirs = new HashSet<>();
media.forEach(mi -> searchDirs.add(new File(mi.getFileName()).getParentFile()));

Expand All @@ -234,7 +237,8 @@ static void searchForPosters(List<MediaInfo> media) {
//adding artificial limit of image count to address issue #153.
if (!pictures.isEmpty()) {
for (int i = 0; i < 10 && i < pictures.size(); i++) {
context.addPosterIfMissingWithDelay(new ArtWorkBean(Utils.tempCopy(pictures.get(i).getPath())));
// context.addPosterIfMissingWithDelay(new ArtWorkBean(Utils.tempCopy(pictures.get(i).getPath())));
context.addPosterIfMissingWithDelay(new ArtWorkImage(new Image(new FileInputStream(pictures.get(i).getPath()))));
}
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ String optimize() throws InterruptedException, IOException {
optimize = new String[]{
Platform.FFMPEG,
"-i", tempFile,
"-map", "0:v",
"-map", "0:v?",
"-map", "0:a",
"-c", "copy",
"-progress", progressParser.getUri().toString(),
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,10 @@
package uk.yermak.audiobookconverter;

import javafx.scene.image.Image;

import java.io.ByteArrayOutputStream;
import java.io.File;
import java.io.FileInputStream;
import java.util.concurrent.Callable;
import java.util.concurrent.TimeUnit;

Expand Down Expand Up @@ -47,7 +50,7 @@ public ArtWork call() throws Exception {
FFMediaLoader.logger.debug("ArtWork Out: {}", out);
FFMediaLoader.logger.error("ArtWork Error: {}", err);

ArtWorkBean artWorkBean = new ArtWorkBean(poster);
ArtWork artWorkBean = new ArtWorkImage(new Image(new FileInputStream(poster)));
javafx.application.Platform.runLater(() -> {
if (!conversionGroup.isOver() && !conversionGroup.isStarted() && !conversionGroup.isDetached()) {
AudiobookConverter.getContext().addPosterIfMissingWithDelay(artWorkBean);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,9 +18,7 @@
import java.awt.datatransfer.Transferable;
import java.awt.image.BufferedImage;
import java.awt.image.RenderedImage;
import java.io.ByteArrayInputStream;
import java.io.ByteArrayOutputStream;
import java.io.File;
import java.io.*;
import java.lang.invoke.MethodHandles;

/**
Expand All @@ -43,20 +41,25 @@ private void initialize() {

@FXML
private void addImage(ActionEvent actionEvent) {
FileChooser fileChooser = new FileChooser();
String sourceFolder = AppSetting.getProperty("source.folder");
fileChooser.setInitialDirectory(Platform.getInitialDirecotory(sourceFolder));
fileChooser.setTitle("Select JPG or PNG file");
fileChooser.getExtensionFilters().addAll(
new FileChooser.ExtensionFilter("jpg", "*.jpg", "*.jpeg", "*.jfif"),
new FileChooser.ExtensionFilter("png", "*.png"),
new FileChooser.ExtensionFilter("bmp", "*.bmp"));

File file = fileChooser.showOpenDialog(AudiobookConverter.getEnv().getWindow());
logger.debug("Opened dialog for art image in folder: {}", sourceFolder);
if (file != null) {
imageList.getItems().add(new ArtWorkBean(Utils.tempCopy(file.getAbsolutePath())));
logger.info("Added art work from file: {}", file);
try {
FileChooser fileChooser = new FileChooser();
String sourceFolder = AppSetting.getProperty("source.folder");
fileChooser.setInitialDirectory(Platform.getInitialDirecotory(sourceFolder));
fileChooser.setTitle("Select JPG or PNG file");
fileChooser.getExtensionFilters().addAll(
new FileChooser.ExtensionFilter("jpg", "*.jpg", "*.jpeg", "*.jfif"),
new FileChooser.ExtensionFilter("png", "*.png"),
new FileChooser.ExtensionFilter("bmp", "*.bmp"));

File file = fileChooser.showOpenDialog(AudiobookConverter.getEnv().getWindow());
logger.debug("Opened dialog for art image in folder: {}", sourceFolder);
if (file != null) {
imageList.getItems().add(new ArtWorkImage(new Image(new FileInputStream(file.getAbsolutePath()))));
// imageList.getItems().add(new ArtWorkBean(Utils.tempCopy(file.getAbsolutePath())));
logger.info("Added art work from file: {}", file);
}
} catch (FileNotFoundException e) {
throw new RuntimeException(e);
}
}

Expand Down Expand Up @@ -110,7 +113,12 @@ public void pasteImage(ActionEvent actionEvent) {
java.util.List<String> artFiles = (java.util.List<String>) transferable.getTransferData(DataFlavor.javaFileListFlavor);

artFiles.stream().filter(s -> ArrayUtils.contains(ArtWork.IMAGE_EXTENSIONS, FilenameUtils.getExtension(s))).forEach(f -> {
AudiobookConverter.getContext().addPosterIfMissingWithDelay(new ArtWorkBean(Utils.tempCopy(f)));
// AudiobookConverter.getContext().addPosterIfMissingWithDelay(new ArtWorkBean(Utils.tempCopy(f)));
try {
AudiobookConverter.getContext().addPosterIfMissingWithDelay(new ArtWorkImage(new Image(new FileInputStream(f))));
} catch (FileNotFoundException e) {
logger.error("failed to paste image", e);
}
});
}
}
Expand Down