Your ROOT_URL in app.ini is https://git.cloudchain.link/ but you are visiting https://dash.bss.nz/open-source-mirrors/jellyfin/src/commit/6afb2e38b384a0b5ae363e95fc317ac5c069a16c/MediaBrowser.Controller/ClientEvent/ClientEventLogger.cs You should set ROOT_URL correctly, otherwise the web may not work correctly.
jellyfin/MediaBrowser.Controller/ClientEvent/ClientEventLogger.cs

32 lines
1.2 KiB

using System;
using System.IO;
using System.Threading.Tasks;
namespace MediaBrowser.Controller.ClientEvent
{
/// <inheritdoc />
public class ClientEventLogger : IClientEventLogger
{
private readonly IServerApplicationPaths _applicationPaths;
/// <summary>
/// Initializes a new instance of the <see cref="ClientEventLogger"/> class.
/// </summary>
/// <param name="applicationPaths">Instance of the <see cref="IServerApplicationPaths"/> interface.</param>
public ClientEventLogger(IServerApplicationPaths applicationPaths)
{
_applicationPaths = applicationPaths;
}
/// <inheritdoc />
public async Task<string> WriteDocumentAsync(string clientName, string clientVersion, Stream fileContents)
{
var fileName = $"upload_{clientName}_{clientVersion}_{DateTime.UtcNow:yyyyMMddHHmmss}_{Guid.NewGuid():N}.log";
var logFilePath = Path.Combine(_applicationPaths.LogDirectoryPath, fileName);
await using var fileStream = new FileStream(logFilePath, FileMode.CreateNew, FileAccess.Write, FileShare.None);
await fileContents.CopyToAsync(fileStream).ConfigureAwait(false);
return fileName;
}
}
}