mirror of
https://github.com/advplyr/audiobookshelf.git
synced 2026-05-17 00:41:30 +00:00
Add backend support for users to follow series
Introduces a UserSeriesFollow model with a dedicated join table so users can follow/unfollow series and receive socket notifications when new books are added to followed series. The user JSON response now includes a seriesFollowing array, and three new API endpoints are available under /api/me/follows/. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
parent
8b89b27654
commit
37b95582a2
9 changed files with 744 additions and 5 deletions
|
|
@ -162,6 +162,11 @@ class Database {
|
|||
return this.models.device
|
||||
}
|
||||
|
||||
/** @type {typeof import('./models/UserSeriesFollow')} */
|
||||
get userSeriesFollowModel() {
|
||||
return this.models.userSeriesFollow
|
||||
}
|
||||
|
||||
/**
|
||||
* Check if db file exists
|
||||
* @returns {boolean}
|
||||
|
|
@ -345,6 +350,7 @@ class Database {
|
|||
require('./models/Setting').init(this.sequelize)
|
||||
require('./models/CustomMetadataProvider').init(this.sequelize)
|
||||
require('./models/MediaItemShare').init(this.sequelize)
|
||||
require('./models/UserSeriesFollow').init(this.sequelize)
|
||||
|
||||
return this.sequelize.sync({ force, alter: false })
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue