fix lib
authorNiki Roo <niki@nikiroo.be>
Sun, 12 May 2019 10:57:04 +0000 (12:57 +0200)
committerNiki Roo <niki@nikiroo.be>
Sun, 12 May 2019 10:57:04 +0000 (12:57 +0200)
src/be/nikiroo/fanfix/library/RemoteLibrary.java
src/be/nikiroo/fanfix/library/RemoteLibraryServer.java

index 6e3380b4a2239a074c26750436f8abc0df368e12..f1ff214d5671f3cf52bc4a82e1472a2d9b9e414f 100644 (file)
@@ -143,11 +143,11 @@ public class RemoteLibrary extends BasicLibrary {
 
                                @Override
                                protected void onError(Exception e) {
-                                       // if (e instanceof SSLException) {
-                                       result[0] = Status.UNAUTHORIZED;
-                                       // } else {
-                                       // result[0] = Status.UNAVAILABLE;
-                                       // }
+                                       if (e instanceof SSLException) {
+                                               result[0] = Status.UNAUTHORIZED;
+                                       } else {
+                                               result[0] = Status.UNAVAILABLE;
+                                       }
                                }
                        }.connect();
                } catch (UnknownHostException e) {
index 1f288ab7ab3b920ca8ee6830f523295d40f0f4c1..015fb7bf33c9c2beb79a81173b1f02f180f48db9 100644 (file)
@@ -209,7 +209,16 @@ public class RemoteLibraryServer extends ServerObject {
 
                                forcePgDoneSent(pg);
                        } else {
-                               metas.add(Instance.getLibrary().getInfo((String) args[0]));
+                               MetaData meta = Instance.getLibrary().getInfo((String) args[0]);
+                               MetaData light;
+                               if (meta.getCover() == null) {
+                                       light = meta;
+                               } else {
+                                       light = meta.clone();
+                                       light.setCover(null);
+                               }
+
+                               metas.add(light);
                        }
 
                        if (!whitelist.isEmpty()) {