Add:Api route to sync stream data for use in android native

This commit is contained in:
advplyr 2021-12-19 18:45:56 -06:00
parent a052366dac
commit 1b03af4041
4 changed files with 51 additions and 4 deletions

View file

@ -172,6 +172,8 @@ class ApiController {
this.router.post('/syncUserAudiobookData', this.syncUserAudiobookData.bind(this))
this.router.post('/purgecache', this.purgeCache.bind(this))
this.router.post('/syncStream', this.syncStream.bind(this))
}
async findBooks(req, res) {
@ -405,6 +407,11 @@ class ApiController {
res.json(allUserAudiobookData)
}
async syncStream(req, res) {
Logger.debug(`[ApiController] syncStream for ${req.user.username} - ${req.body.streamId}`)
this.streamManager.streamSyncFromApi(req, res)
}
//
// Helper Methods
//