From 410dc9e75afe84801bc6a712900724c41eb3a112 Mon Sep 17 00:00:00 2001 From: aj Date: Wed, 22 May 2019 13:49:52 +0100 Subject: [PATCH] changed refresh buttons to pull from cache --- .../fx/controller/borderpane/AlbumBorderPaneController.java | 4 +--- .../fx/controller/borderpane/ArtistBorderPaneController.java | 4 +--- .../fx/controller/borderpane/TrackBorderPaneController.java | 2 +- 3 files changed, 3 insertions(+), 7 deletions(-) diff --git a/src/main/java/sarsoo/fmframework/fx/controller/borderpane/AlbumBorderPaneController.java b/src/main/java/sarsoo/fmframework/fx/controller/borderpane/AlbumBorderPaneController.java index b2fc66c..904012e 100644 --- a/src/main/java/sarsoo/fmframework/fx/controller/borderpane/AlbumBorderPaneController.java +++ b/src/main/java/sarsoo/fmframework/fx/controller/borderpane/AlbumBorderPaneController.java @@ -124,9 +124,7 @@ public class AlbumBorderPaneController extends FMObjBorderPaneController { @Override protected Void call() throws Exception { - Config config = FmFramework.getSessionConfig(); - - album = new FmUserNetwork(config.getValue("api_key"), config.getValue("username")).refresh(album); + album = FmFramework.getAlbumPool().getNew(album); Platform.runLater(new Runnable() { @Override diff --git a/src/main/java/sarsoo/fmframework/fx/controller/borderpane/ArtistBorderPaneController.java b/src/main/java/sarsoo/fmframework/fx/controller/borderpane/ArtistBorderPaneController.java index 1c75a25..ef0e76a 100644 --- a/src/main/java/sarsoo/fmframework/fx/controller/borderpane/ArtistBorderPaneController.java +++ b/src/main/java/sarsoo/fmframework/fx/controller/borderpane/ArtistBorderPaneController.java @@ -90,9 +90,7 @@ public class ArtistBorderPaneController extends FMObjBorderPaneController{ @Override protected Void call() throws Exception { - Config config = FmFramework.getSessionConfig(); - - artist = new FmUserNetwork(config.getValue("api_key"), config.getValue("username")).refresh(artist); + artist = FmFramework.getArtistPool().getNew(artist); Platform.runLater(new Runnable() { @Override diff --git a/src/main/java/sarsoo/fmframework/fx/controller/borderpane/TrackBorderPaneController.java b/src/main/java/sarsoo/fmframework/fx/controller/borderpane/TrackBorderPaneController.java index 918c1f3..8e68f24 100644 --- a/src/main/java/sarsoo/fmframework/fx/controller/borderpane/TrackBorderPaneController.java +++ b/src/main/java/sarsoo/fmframework/fx/controller/borderpane/TrackBorderPaneController.java @@ -134,7 +134,7 @@ public class TrackBorderPaneController extends FMObjBorderPaneController { FmUserNetwork net = new FmUserNetwork(config.getValue("api_key"), config.getValue("username")); - track = net.refresh(track); + track = FmFramework.getTrackPool().getNew(track); track.setScrobbles(net.getTrackScrobbles(track)); Platform.runLater(new Runnable() {