mirror of
https://github.com/mitb-archive/filebot
synced 2025-01-08 12:28:04 -05:00
Default to false instead of null so we don't crash during DnD
This commit is contained in:
parent
dfc9658553
commit
c0f7397784
@ -24,7 +24,6 @@ import java.util.stream.Stream;
|
||||
|
||||
import net.filebot.media.XattrMetaInfoProvider;
|
||||
import net.filebot.similarity.MetricAvg;
|
||||
import net.filebot.util.SystemProperty;
|
||||
import net.filebot.web.AcoustIDClient;
|
||||
import net.filebot.web.AnidbClient;
|
||||
import net.filebot.web.Datasource;
|
||||
@ -54,7 +53,7 @@ public final class WebServices {
|
||||
|
||||
// movie sources
|
||||
public static final OMDbClient OMDb = new OMDbClient(getApiKey("omdb"));
|
||||
public static final TMDbClient TheMovieDB = new TMDbClientWithLocalSearch(getApiKey("themoviedb"), SystemProperty.of("net.filebot.WebServices.TheMovieDB.adult", Boolean::parseBoolean, false).get());
|
||||
public static final TMDbClient TheMovieDB = new TMDbClientWithLocalSearch(getApiKey("themoviedb"), Boolean.parseBoolean(System.getProperty("net.filebot.WebServices.TheMovieDB.adult")));
|
||||
|
||||
// episode sources
|
||||
public static final TVMazeClient TVmaze = new TVMazeClient();
|
||||
|
@ -20,11 +20,10 @@ import java.util.List;
|
||||
import java.util.Scanner;
|
||||
|
||||
import net.filebot.platform.gnome.GVFS;
|
||||
import net.filebot.util.SystemProperty;
|
||||
|
||||
public class FileTransferable implements Transferable {
|
||||
|
||||
public static final SystemProperty<Boolean> forceSortOrder = SystemProperty.of("net.filebot.dnd.sort", Boolean::valueOf, false);
|
||||
public static final boolean forceSortOrder = Boolean.parseBoolean(System.getProperty("net.filebot.dnd.sort"));
|
||||
|
||||
public static final DataFlavor uriListFlavor = createUriListFlavor();
|
||||
|
||||
@ -138,11 +137,9 @@ public class FileTransferable implements Transferable {
|
||||
if (transferable instanceof List) {
|
||||
List<File> files = (List<File>) transferable;
|
||||
|
||||
System.out.println(files);
|
||||
|
||||
// Windows Explorer DnD / Selection Order is broken and will probably never be fixed,
|
||||
// so we provide an override for users that want to enforce alphanumeric sort order of files dragged in
|
||||
if (forceSortOrder.get()) {
|
||||
if (forceSortOrder) {
|
||||
return files.stream().sorted(HUMAN_NAME_ORDER).collect(toList());
|
||||
}
|
||||
|
||||
|
@ -57,7 +57,6 @@ import org.xml.sax.XMLReader;
|
||||
import org.xml.sax.helpers.DefaultHandler;
|
||||
|
||||
import net.filebot.util.ByteBufferOutputStream;
|
||||
import net.filebot.util.SystemProperty;
|
||||
|
||||
public final class WebRequest {
|
||||
|
||||
@ -346,7 +345,7 @@ public final class WebRequest {
|
||||
String log = String.format(Locale.ROOT, "Received %,d bytes", data.remaining());
|
||||
|
||||
// log entire response content if enabled
|
||||
boolean printResponse = SystemProperty.of("net.filebot.web.WebRequest.log.response", Boolean::parseBoolean, Boolean.FALSE).get();
|
||||
boolean printResponse = Boolean.parseBoolean(System.getProperty("net.filebot.web.WebRequest.log.response"));
|
||||
|
||||
if (printResponse) {
|
||||
try {
|
||||
|
Loading…
Reference in New Issue
Block a user