- } else if ("GET_SOURCE_COVER".equals(command)) {
- return Instance.getLibrary().getSourceCover((String) args[0]);
- } else if ("SET_SOURCE_COVER".equals(command)) {
- Instance.getLibrary().setSourceCover((String) args[0],
- (String) args[1]);
- } else if ("CHANGE_SOURCE".equals(command)) {
- Instance.getLibrary().changeSource((String) args[0],
- (String) args[1], createPgForwarder(action));
+ } else if ("GET_CUSTOM_COVER".equals(command)) {
+ if ("SOURCE".equals(args[0])) {
+ return Instance.getLibrary().getCustomSourceCover(
+ (String) args[1]);
+ } else if ("AUTHOR".equals(args[0])) {
+ return Instance.getLibrary().getCustomAuthorCover(
+ (String) args[1]);
+ } else {
+ return null;
+ }
+ } else if ("SET_COVER".equals(command)) {
+ if (!rw) {
+ throw new RemoteLibraryException("Read-Only remote library: "
+ + args[0] + ", " + args[1], false);
+ }
+
+ if ("SOURCE".equals(args[0])) {
+ Instance.getLibrary().setSourceCover((String) args[1],
+ (String) args[2]);
+ } else if ("AUTHOR".equals(args[0])) {
+ Instance.getLibrary().setAuthorCover((String) args[1],
+ (String) args[2]);
+ }
+ } else if ("CHANGE_STA".equals(command)) {
+ if (!rw) {
+ throw new RemoteLibraryException("Read-Only remote library: "
+ + args[0] + ", " + args[1], false);
+ }
+
+ Progress pg = createPgForwarder(action);
+ Instance.getLibrary().changeSTA((String) args[0], (String) args[1],
+ (String) args[2], (String) args[3], pg);
+ forcePgDoneSent(pg);