got rid of dependency injection, it doesn't add anything at this point and only slows down things and makes a mess. Also some refactoring.
This commit is contained in:
@@ -30,17 +30,12 @@ import java.net.URLEncoder;
|
||||
import org.json.JSONArray;
|
||||
import org.json.JSONObject;
|
||||
import yugecin.opsudance.core.errorhandling.ErrorHandler;
|
||||
import yugecin.opsudance.core.inject.Inject;
|
||||
import yugecin.opsudance.core.inject.InstanceContainer;
|
||||
|
||||
/**
|
||||
* Download server: http://osu.mengsky.net/
|
||||
*/
|
||||
public class MengSkyServer extends DownloadServer {
|
||||
|
||||
@Inject
|
||||
private InstanceContainer instanceContainer;
|
||||
|
||||
/** Server name. */
|
||||
private static final String SERVER_NAME = "MengSky";
|
||||
|
||||
@@ -56,10 +51,6 @@ public class MengSkyServer extends DownloadServer {
|
||||
/** Total result count from the last query. */
|
||||
private int totalResults = -1;
|
||||
|
||||
@Inject
|
||||
public MengSkyServer() {
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getName() { return SERVER_NAME; }
|
||||
|
||||
@@ -93,10 +84,10 @@ public class MengSkyServer extends DownloadServer {
|
||||
// sometimes titleU is artistU instead of the proper title
|
||||
if (titleU.equals(artistU) && !titleU.equals(title))
|
||||
titleU = title;
|
||||
nodes[i] = instanceContainer.injectFields(new DownloadNode(
|
||||
nodes[i] = new DownloadNode(
|
||||
item.getInt("id"), item.getString("syncedDateTime"),
|
||||
title, titleU, artist, artistU, creator
|
||||
));
|
||||
);
|
||||
}
|
||||
|
||||
// store total result count
|
||||
|
||||
Reference in New Issue
Block a user