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

Force re-encoding, artwork fixes #340

Merged
merged 9 commits into from
Dec 20, 2021
Merged
3 changes: 2 additions & 1 deletion app/path.properties
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
ffmpeg=external/x64/windows/ffmpeg.exe
ffprobe=external/x64/windows/ffprobe.exe
mp4art=external/x64/windows/mp4art.exe
mp4info=external/x64/windows/mp4info.exe
mp4info=external/x64/windows/mp4info.exe
platform=steam
3 changes: 2 additions & 1 deletion external/x64/linux/path.properties
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
ffmpeg=../lib/app/external/ffmpeg
ffprobe=../lib/app/external/ffprobe
mp4art=../lib/app/external/mp4art
mp4info=../lib/app/external/mp4info
mp4info=../lib/app/external/mp4info
platform=linux
3 changes: 2 additions & 1 deletion external/x64/windows/path.properties
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
ffmpeg=app/external/ffmpeg.exe
ffprobe=app/external/ffprobe.exe
mp4art=app/external/mp4art.exe
mp4info=app/external/mp4info.exe
mp4info=app/external/mp4info.exe
platform=windows
2 changes: 1 addition & 1 deletion src/main/java/uk/yermak/audiobookconverter/Utils.java
Original file line number Diff line number Diff line change
Expand Up @@ -218,7 +218,7 @@ private static String getPath(String binary) {

}

private static synchronized Properties loadAppProperties() {
public static synchronized Properties loadAppProperties() {
if (PATH.isEmpty()) {
File file = new File((isLinux()) ? "../lib/app/path.properties" : "app/path.properties");

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,8 @@
import org.controlsfx.control.Notifications;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import uk.yermak.audiobookconverter.AppProperties;
import uk.yermak.audiobookconverter.Utils;
import uk.yermak.audiobookconverter.Version;

import java.io.File;
Expand Down Expand Up @@ -134,7 +136,10 @@ static class VersionChecker implements Runnable {
@Override
public void run() {
try {
String version = readStringFromURL("https://raw.githubusercontent.com/yermak/AudioBookConverter/version/version.txt");
String platform = Utils.loadAppProperties().getProperty("platform");
if (platform == null) platform = "version";
if ("steam".equals(platform)) return;
String version = readStringFromURL("https://raw.githubusercontent.com/yermak/AudioBookConverter/version/" + platform + ".txt");
if (!Version.getVersionString().equals(StringUtils.trim(version))) {
logger.info("New version found: {}", version);
Platform.runLater(() -> {
Expand All @@ -143,7 +148,7 @@ public void run() {
alert.setContentText("Would you like to download new version?");
Optional<ButtonType> result = alert.showAndWait();
if ((result.isPresent()) && (result.get() == ButtonType.OK)) {
ConverterApplication.getEnv().showDocument("https://github.com/yermak/AudioBookConverter/releases/latest");
ConverterApplication.getEnv().showDocument("https://store.steampowered.com/app/1529240/AudioBookConverter/");
}
});
}
Expand Down