mirror of
https://github.com/SoPat712/allstarr.git
synced 2026-02-10 07:58:39 -05:00
Make kept path configurable via web UI
- Added Library:KeptPath to appsettings.json (default: /app/kept) - Added Library Settings card to web UI with DownloadPath and KeptPath - Updated GetDownloads and DeleteDownload endpoints to use configured path - Updated JellyfinController to use configured kept path - Injected IConfiguration into JellyfinController - Users can now customize where favorited tracks are stored
This commit is contained in:
@@ -1450,6 +1450,11 @@ public class AdminController : ControllerBase
|
||||
userId = _jellyfinSettings.UserId ?? "(not set)",
|
||||
libraryId = _jellyfinSettings.LibraryId
|
||||
},
|
||||
library = new
|
||||
{
|
||||
downloadPath = _configuration["Library:DownloadPath"] ?? "./downloads",
|
||||
keptPath = _configuration["Library:KeptPath"] ?? "/app/kept"
|
||||
},
|
||||
deezer = new
|
||||
{
|
||||
arl = MaskValue(_deezerSettings.Arl, showLast: 8),
|
||||
@@ -3331,7 +3336,7 @@ public class LinkPlaylistRequest
|
||||
{
|
||||
try
|
||||
{
|
||||
var keptPath = "/app/kept";
|
||||
var keptPath = _configuration["Library:KeptPath"] ?? "/app/kept";
|
||||
|
||||
_logger.LogInformation("📂 Checking kept folder: {Path}", keptPath);
|
||||
_logger.LogInformation("📂 Directory exists: {Exists}", Directory.Exists(keptPath));
|
||||
@@ -3414,7 +3419,7 @@ public class LinkPlaylistRequest
|
||||
return BadRequest(new { error = "Path is required" });
|
||||
}
|
||||
|
||||
var keptPath = "/app/kept";
|
||||
var keptPath = _configuration["Library:KeptPath"] ?? "/app/kept";
|
||||
var fullPath = Path.Combine(keptPath, path);
|
||||
|
||||
_logger.LogInformation("🗑️ Delete request for: {Path}", fullPath);
|
||||
|
||||
Reference in New Issue
Block a user