Skip to content

Usenet streaming with a WebDAV server and a SABnzbd-compatible API

C#

Added extension query-param to strm links.

nzbdav-dev0a9d0cf57dc8
diff --git a/backend/Queue/PostProcessors/CreateStrmFilesPostProcessor.cs b/backend/Queue/PostProcessors/CreateStrmFilesPostProcessor.cs
index e762ae95..37734ad2 100644
--- a/backend/Queue/PostProcessors/CreateStrmFilesPostProcessor.cs
+++ b/backend/Queue/PostProcessors/CreateStrmFilesPostProcessor.cs
@@ -50,6 +50,7 @@ public class CreateStrmFilesPostProcessor(ConfigManager configManager, DavDataba
if (pathUrl.StartsWith('/')) pathUrl = pathUrl.TrimStart('/');
var strmKey = configManager.GetStrmKey();
var downloadKey = GetWebdavItemRequest.GenerateDownloadKey(strmKey, pathUrl);
- return $"{baseUrl}/view/{pathUrl}?downloadKey={downloadKey}";
+ var extension = Path.GetExtension(davItem.Name).ToLowerInvariant().TrimStart('.');
+ return $"{baseUrl}/view/{pathUrl}?downloadKey={downloadKey}&extension={extension}";
}
}
\ No newline at end of file