Make statistics filter start at 00:00 (#6371)
This commit is contained in:
parent
95b97b6f49
commit
835f007b67
|
@ -1193,7 +1193,7 @@ public class PodDBAdapter {
|
||||||
+ TABLE_NAME_FEED_MEDIA + "." + KEY_POSITION + "> 0";
|
+ TABLE_NAME_FEED_MEDIA + "." + KEY_POSITION + "> 0";
|
||||||
}
|
}
|
||||||
final String timeFilter = lastPlayedTime + ">=" + timeFilterFrom
|
final String timeFilter = lastPlayedTime + ">=" + timeFilterFrom
|
||||||
+ " AND " + lastPlayedTime + "<=" + timeFilterTo;
|
+ " AND " + lastPlayedTime + "<" + timeFilterTo;
|
||||||
String playedTime = TABLE_NAME_FEED_MEDIA + "." + KEY_PLAYED_DURATION;
|
String playedTime = TABLE_NAME_FEED_MEDIA + "." + KEY_PLAYED_DURATION;
|
||||||
if (includeMarkedAsPlayed) {
|
if (includeMarkedAsPlayed) {
|
||||||
playedTime = "(CASE WHEN " + playedTime + " != 0"
|
playedTime = "(CASE WHEN " + playedTime + " != 0"
|
||||||
|
|
|
@ -107,6 +107,10 @@ public class StatisticsFilterDialog {
|
||||||
private Pair<String[], Long[]> makeMonthlyList(long oldestDate, boolean inclusive) {
|
private Pair<String[], Long[]> makeMonthlyList(long oldestDate, boolean inclusive) {
|
||||||
Calendar date = Calendar.getInstance();
|
Calendar date = Calendar.getInstance();
|
||||||
date.setTimeInMillis(oldestDate);
|
date.setTimeInMillis(oldestDate);
|
||||||
|
date.set(Calendar.HOUR_OF_DAY, 0);
|
||||||
|
date.set(Calendar.MINUTE, 0);
|
||||||
|
date.set(Calendar.SECOND, 0);
|
||||||
|
date.set(Calendar.MILLISECOND, 0);
|
||||||
date.set(Calendar.DAY_OF_MONTH, 1);
|
date.set(Calendar.DAY_OF_MONTH, 1);
|
||||||
ArrayList<String> names = new ArrayList<>();
|
ArrayList<String> names = new ArrayList<>();
|
||||||
ArrayList<Long> timestamps = new ArrayList<>();
|
ArrayList<Long> timestamps = new ArrayList<>();
|
||||||
|
|
Loading…
Reference in New Issue