This commit is contained in:
Zach 2026-05-05 17:56:42 -06:00 committed by GitHub
commit 3de0dedfd9
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
11 changed files with 236 additions and 1 deletions

View file

@ -437,6 +437,10 @@ class LibraryItemController {
* @param {Response} res
*/
startPlaybackSession(req, res) {
if (!req.user.canStream) {
Logger.warn(`User "${req.user.username}" attempted to stream without permission`)
return res.sendStatus(403)
}
if (!req.libraryItem.hasAudioTracks) {
Logger.error(`[LibraryItemController] startPlaybackSession cannot playback ${req.libraryItem.id}`)
return res.sendStatus(404)
@ -454,6 +458,10 @@ class LibraryItemController {
* @param {Response} res
*/
startEpisodePlaybackSession(req, res) {
if (!req.user.canStream) {
Logger.warn(`User "${req.user.username}" attempted to stream without permission`)
return res.sendStatus(403)
}
if (!req.libraryItem.isPodcast) {
Logger.error(`[LibraryItemController] startEpisodePlaybackSession invalid media type ${req.libraryItem.id}`)
return res.sendStatus(400)