From 95177c77f496395e7d4490a17386a8b721cfa477 Mon Sep 17 00:00:00 2001 From: aj Date: Sat, 26 May 2018 17:13:28 +0100 Subject: [PATCH] migrating to streams, working on time zone updates for daily scrobbles --- fmframework/src/sarsoo/fmframework/fx/ui/main.fxml | 2 +- fmframework/src/sarsoo/fmframework/net/URLBuilder.java | 2 +- fmframework/src/sarsoo/fmframework/util/FMObjList.java | 6 +----- 3 files changed, 3 insertions(+), 7 deletions(-) diff --git a/fmframework/src/sarsoo/fmframework/fx/ui/main.fxml b/fmframework/src/sarsoo/fmframework/fx/ui/main.fxml index 4134de9..a7ec35c 100644 --- a/fmframework/src/sarsoo/fmframework/fx/ui/main.fxml +++ b/fmframework/src/sarsoo/fmframework/fx/ui/main.fxml @@ -50,7 +50,7 @@
- + diff --git a/fmframework/src/sarsoo/fmframework/net/URLBuilder.java b/fmframework/src/sarsoo/fmframework/net/URLBuilder.java index 2dbb9e7..b4b6ac2 100644 --- a/fmframework/src/sarsoo/fmframework/net/URLBuilder.java +++ b/fmframework/src/sarsoo/fmframework/net/URLBuilder.java @@ -192,7 +192,7 @@ public class URLBuilder { day = Integer.toString(now.getDayOfMonth()); } - String date = String.format("%d-%s-%sT07:00:00.00Z", now.getYear(), month, day); + String date = String.format("%d-%s-%sT00:00:00.00Z", now.getYear(), month, day); // System.out.println(date); // long midnight = Instant.parse("2018-04-05T07:00:00.00Z").getEpochSecond(); long midnight = Instant.parse(date).getEpochSecond(); diff --git a/fmframework/src/sarsoo/fmframework/util/FMObjList.java b/fmframework/src/sarsoo/fmframework/util/FMObjList.java index 0801c9d..50ef2c0 100644 --- a/fmframework/src/sarsoo/fmframework/util/FMObjList.java +++ b/fmframework/src/sarsoo/fmframework/util/FMObjList.java @@ -100,10 +100,6 @@ public class FMObjList extends ArrayList implements Comparable } public void refresh() { - int counter; - for (counter = 0; counter < size(); counter++) { - get(counter).refresh(); - } - + stream().forEach(FMObj::refresh); } }