From 762ce0ad527290b7a773831506afcbde05f56f2a Mon Sep 17 00:00:00 2001 From: Andrew DeMaria Date: Fri, 23 Dec 2016 11:31:13 -0700 Subject: [PATCH] Revert "Auto locate transcoder binary" This reverts commit cadc1022f137be0944d830e5c9e1a1c136e2d033. On further testing, this needs more work. Signed-off-by: Andrew DeMaria --- .../player/service/TranscodingService.java | 18 ++---------------- 1 file changed, 2 insertions(+), 16 deletions(-) diff --git a/libresonic-main/src/main/java/org/libresonic/player/service/TranscodingService.java b/libresonic-main/src/main/java/org/libresonic/player/service/TranscodingService.java index f28da40f..36871490 100644 --- a/libresonic-main/src/main/java/org/libresonic/player/service/TranscodingService.java +++ b/libresonic-main/src/main/java/org/libresonic/player/service/TranscodingService.java @@ -329,8 +329,8 @@ public class TranscodingService { title = "Unknown Artist"; } - List result = new LinkedList<>(Arrays.asList(StringUtil.split(command))); - result.set(0, getExecutableName(result)); + List result = new LinkedList(Arrays.asList(StringUtil.split(command))); + result.set(0, getTranscodeDirectory().getPath() + File.separatorChar + result.get(0)); File tmpFile = null; @@ -381,20 +381,6 @@ public class TranscodingService { return new TranscodeInputStream(new ProcessBuilder(result), in, tmpFile); } - private String getExecutableName(List transcodeTokens) { - String executableName = transcodeTokens.get(0); - String transcodeDirectoryPath = getTranscodeDirectory().getPath() + File.separatorChar + executableName; - File file = new File(transcodeDirectoryPath); - if(file.exists()) { - if(!file.canExecute()) { - throw new RuntimeException("Transcoder is not executable at " + transcodeDirectoryPath); - } - return transcodeDirectoryPath; - } else { - return executableName; - } - } - /** * Returns an applicable transcoding for the given file and player, or null if no * transcoding should be done.