remote: exceptions
[nikiroo-utils.git] / src / be / nikiroo / fanfix / library / RemoteLibraryServer.java
index 1f288ab7ab3b920ca8ee6830f523295d40f0f4c1..c3933ebb276c65e171546109c59d6daa96df8501 100644 (file)
@@ -144,7 +144,12 @@ public class RemoteLibraryServer extends ServerObject {
                }
                System.out.println(trace);
 
-               Object rep = doRequest(action, command, args, rw, whitelist);
+               Object rep = null;
+               try {
+                       rep = doRequest(action, command, args, rw, whitelist);
+               } catch (IOException e) {
+                       rep = new RemoteLibraryException(e);
+               }
 
                commands.put(id, command);
                wls.put(id, wl);
@@ -209,7 +214,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()) {