Your ROOT_URL in app.ini is https://git.cloudchain.link/ but you are visiting https://dash.bss.nz/open-source-mirrors/jellyfin/commit/38885ffd744e1b9d15fae80167ea67c94127acdd You should set ROOT_URL correctly, otherwise the web may not work correctly.

Fix nullability errors in MediaBrowser.LocalMetadata

pull/4480/head
crobibero 4 years ago
parent 9b7c5cddae
commit 38885ffd74

@ -486,7 +486,7 @@ namespace MediaBrowser.LocalMetadata.Images
return false;
}
private FileSystemMetadata GetImage(IEnumerable<FileSystemMetadata> files, string name)
private FileSystemMetadata? GetImage(IEnumerable<FileSystemMetadata> files, string name)
{
return files.FirstOrDefault(i => !i.IsDirectory && string.Equals(name, _fileSystem.GetFileNameWithoutExtension(i), StringComparison.OrdinalIgnoreCase) && i.Length > 0);
}

@ -683,7 +683,7 @@ namespace MediaBrowser.LocalMetadata.Parsers
default:
{
string readerName = reader.Name;
if (_validProviderIds!.TryGetValue(readerName, out string providerIdValue))
if (_validProviderIds!.TryGetValue(readerName, out string? providerIdValue))
{
var id = reader.ReadElementContentAsString();
if (!string.IsNullOrWhiteSpace(id))

@ -127,7 +127,13 @@ namespace MediaBrowser.LocalMetadata.Savers
private void SaveToFile(Stream stream, string path)
{
Directory.CreateDirectory(Path.GetDirectoryName(path));
var directory = Path.GetDirectoryName(path);
if (directory == null)
{
throw new NullReferenceException(nameof(directory));
}
Directory.CreateDirectory(directory);
// On Windows, savint the file will fail if the file is hidden or readonly
FileSystem.SetAttributes(path, false, false);

Loading…
Cancel
Save