mirror of
https://github.com/advplyr/audiobookshelf.git
synced 2026-07-06 09:21:37 +00:00
Compare commits
No commits in common. "db9019a94f81ef339e15cf4f703b581363c91ccb" and "a36f097095dd811dbbaa1f71c5c1fda273c9b4da" have entirely different histories.
db9019a94f
...
a36f097095
1 changed files with 2 additions and 8 deletions
|
|
@ -186,16 +186,10 @@ export default {
|
|||
daysInARow() {
|
||||
var count = 0
|
||||
while (true) {
|
||||
const _date = this.$addDaysToToday(count * -1 - 1)
|
||||
const datestr = this.$formatJsDate(_date, 'yyyy-MM-dd')
|
||||
var _date = this.$addDaysToToday(count * -1)
|
||||
var datestr = this.$formatJsDate(_date, 'yyyy-MM-dd')
|
||||
|
||||
if (!this.listeningStatsDays[datestr] || this.listeningStatsDays[datestr] === 0) {
|
||||
// don't require listening today to count towards days in a row, but do count it if already listened today
|
||||
const today = this.$formatJsDate(new Date(), 'yyyy-MM-dd')
|
||||
if (this.listeningStatsDays[today]) {
|
||||
count++
|
||||
}
|
||||
|
||||
return count
|
||||
}
|
||||
count++
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue