mirror of
https://github.com/koel/koel.git
synced 2026-04-26 09:15:59 +03:00
[GH-ISSUE #647] Hybrid backend for song storage/streaming #462
Labels
No labels
Authentication
Dependencies
Documentation
Feature Request
Flac
Help Wanted
Installation/Setup
Integration
Mobile
PR Welcome
Pending Release
Performance
Playlist
S3
Search
Sync
[Pri] Low
[Pri] Normal
[Status] Keep Open
[Status] Needs Author Reply
[Status] Needs Review
[Status] Stale
[Status] Will Implement
[Type] Blessed
[Type] Bug
[Type] Duplicate
[Type] Enhancement
[Type] Help Request
[Type] Question
[Type] Task
pull-request
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
starred/koel-koel#462
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @DeftNerd on GitHub (Aug 29, 2017).
Original GitHub issue: https://github.com/koel/koel/issues/647
I run a server on a provider and also have access to a large S3-compatible storage system at the same provider. It's not AWS, so it doesn't have Lambda.
Adding music to the S3 system won't trigger the Lambda function to update the Koel database with the new addition, but I can mount the S3 bucket to the local filesystem using s3fs.
Would I would love to have is a backend choice where you can select a directory for scanning and music detection, but also specify a URL schema prefix to supply to clients.
So if the root scanning directory is /mnt/music and the URL prefix might be https://bucket.someprovider.com then "/mnt/music/Artist Name/Album Name/01 - Song Name.mp3" would be pushed to the client as "https://bucket.someprovider.com/Artist Name/Album Name/01 - Song Name.mp3"
This edge case might also be useful for people who have NAS on their network that stores the music and then a different machine that runs the Koel software. It would allow the music to be streamed directly from the NAS without passing through the Koel server machine.
@DeftNerd commented on GitHub (Aug 29, 2017):
Actually, after some thought, I think it might be better to just use the Laravel storage system more fully when it comes to song storage.
Laravel lets you specify multiple storage disk configurations in config/storage.php
Koel could be extended to use multiple disk configurations that can be called fluently.
You could allow for different configurations for upload, scanning, and playback configurations. By default they could all be identical so one set of config values in the .env file would configure all of them, but users could specify different configurations at will.
Upload would be the directory that uploaded music gets placed in. Once uploaded, it could trigger a series of configurable queue jobs such as:
The scanning storage location would be another Laravel storage subsystem configuration. It might be a mounted FTP site, S3 bucket, local filesystem location, or anything else supported flysystem library.
The playback storage subsystem configuration would often be the same as the scanning storage configuration, but sometimes it might be different.
@phanan commented on GitHub (Aug 30, 2017):
I don't really get it – is it something a symlink can do just fine?