[web-src] recently added - only show up to requested limit on albums

This commit is contained in:
whatdoineed2do/Ray 2020-12-01 17:49:09 +00:00 committed by chme
parent 5fa2955bff
commit 52d765900c
1 changed files with 7 additions and 1 deletions

View File

@ -124,6 +124,12 @@ const browseData = {
vm.recently_added_week = response[1].data.albums vm.recently_added_week = response[1].data.albums
vm.recently_added_month = response[2].data.albums vm.recently_added_month = response[2].data.albums
vm.recently_added_older = response[3].data.albums vm.recently_added_older = response[3].data.albums
if (vm.recently_added_older.items.length) {
const keep = vm.recently_added_older.items.length - store.getters.settings_option_recently_added_limit - vm.recently_added_month.items.length
vm.recently_added_older.items.splice(keep)
vm.recently_added_older.total = keep
}
} }
} }
@ -160,7 +166,7 @@ export default {
return this.recently_added_older.items.length > 0 return this.recently_added_older.items.length > 0
}, },
recently_added () { recently_added () {
return this.recently_added_today.items.length + this.recently_added_week.items.length + this.recently_added_month.items.length + this.recently_added_older.items.length return this.recently_added_older.items.length + this.recently_added_month.items.length
} }
} }
} }