Skip to content

Commit

Permalink
change Optional logic
Browse files Browse the repository at this point in the history
  • Loading branch information
awidesky committed May 19, 2021
1 parent 41eb97e commit 4c6f19a
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions src/com/awidesky/YoutubeClipboardAutoDownloader/Main.java
Original file line number Diff line number Diff line change
Expand Up @@ -260,12 +260,12 @@ private static void readProperties() {
try (BufferedReader br = new BufferedReader(new FileReader(new File(
YoutubeAudioDownloader.getProjectpath() + File.separator + "YoutubeAudioAutoDownloader-resources" + File.separator + "config.txt")))) {

p = Optional.of(br.readLine()).get().split("=")[1];
f = Optional.of(br.readLine()).get().split("=")[1];
q = Optional.of(br.readLine()).get().split("=")[1];
l = Optional.of(br.readLine()).get().split("=")[1];
n = Optional.of(br.readLine()).get().split("=")[1];
c = Optional.of(br.readLine()).get().split("=")[1];
p = Optional.of(br.readLine()).orElse("SavePath=" + p) .split("=")[1];
f = Optional.of(br.readLine()).orElse("Format=" + f) .split("=")[1];
q = Optional.of(br.readLine()).orElse("Quality=" + q) .split("=")[1];
l = Optional.of(br.readLine()).orElse("Playlist=" + l) .split("=")[1];
n = Optional.of(br.readLine()).orElse("FileNameFormat=" + n) .split("=")[1];
c = Optional.of(br.readLine()).orElse("ClipboardListenOption=" + c) .split("=")[1];

} catch (FileNotFoundException e1) {

Expand Down

0 comments on commit 4c6f19a

Please sign in to comment.