Skip to content

Commit

Permalink
Serve TV files
Browse files Browse the repository at this point in the history
  • Loading branch information
Foxocube committed Jan 1, 2025
1 parent e1553a5 commit 66eaa05
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 3 deletions.
9 changes: 8 additions & 1 deletion MediaFeeder/MediaFeeder/Program.cs
Original file line number Diff line number Diff line change
Expand Up @@ -111,7 +111,6 @@
builder.Services.AddProblemDetails();
builder.Services.AddEndpointsApiExplorer();


builder.Services.AddScoped<IProvider, YoutubeProvider>();
builder.Services.AddScoped<IProvider, SonarrProvider>();
builder.Services.AddScoped<IProvider, RSSProvider>();
Expand Down Expand Up @@ -165,6 +164,14 @@
RequestPath = new PathString("/media")
});

var tvRoot = app.Configuration.GetValue<string>("TVRoot");
if (tvRoot != null)
app.UseStaticFiles(new StaticFileOptions()
{
FileProvider = new PhysicalFileProvider(tvRoot),
RequestPath = new PathString("/tv")
});

app.MapStaticAssets();
app.MapControllers();
app.MapRazorComponents<App>()
Expand Down
2 changes: 0 additions & 2 deletions MediaFeeder/MediaFeeder/Providers/DownloadedVideoFrame.razor
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,6 @@
@using AntDesign
@inherits VideoFrame

<h3>DownloadedVideoFrame</h3>

@if (Video != null)
{
@if (Video.DownloadedPath != null)
Expand Down

0 comments on commit 66eaa05

Please sign in to comment.