mirror of
https://github.com/jellyfin/jellyfin.git
synced 2026-03-24 02:56:31 +00:00
Merge branch 'master' into culture
This commit is contained in:
@@ -1,5 +1,6 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.IO;
|
||||
using System.Linq;
|
||||
using MediaBrowser.Controller.Entities;
|
||||
using MediaBrowser.Controller.Entities.TV;
|
||||
@@ -29,11 +30,11 @@ namespace MediaBrowser.LocalMetadata.Images
|
||||
|
||||
public List<LocalImageInfo> GetImages(BaseItem item, IDirectoryService directoryService)
|
||||
{
|
||||
var parentPath = _fileSystem.GetDirectoryName(item.Path);
|
||||
var parentPath = Path.GetDirectoryName(item.Path);
|
||||
|
||||
var parentPathFiles = directoryService.GetFiles(parentPath);
|
||||
|
||||
var nameWithoutExtension = _fileSystem.GetFileNameWithoutExtension(item.Path);
|
||||
var nameWithoutExtension = Path.GetFileNameWithoutExtension(item.Path);
|
||||
|
||||
return GetFilesFromParentFolder(nameWithoutExtension, parentPathFiles);
|
||||
}
|
||||
|
||||
@@ -102,7 +102,7 @@ namespace MediaBrowser.LocalMetadata.Parsers
|
||||
{
|
||||
item.ResetPeople();
|
||||
|
||||
using (var fileStream = FileSystem.OpenRead(metadataFile))
|
||||
using (var fileStream = File.OpenRead(metadataFile))
|
||||
{
|
||||
using (var streamReader = new StreamReader(fileStream, encoding))
|
||||
{
|
||||
|
||||
@@ -33,7 +33,7 @@ namespace MediaBrowser.LocalMetadata.Providers
|
||||
var specificFile = Path.ChangeExtension(info.Path, ".xml");
|
||||
var file = FileSystem.GetFileInfo(specificFile);
|
||||
|
||||
return info.IsInMixedFolder || file.Exists ? file : FileSystem.GetFileInfo(Path.Combine(FileSystem.GetDirectoryName(info.Path), "game.xml"));
|
||||
return info.IsInMixedFolder || file.Exists ? file : FileSystem.GetFileInfo(Path.Combine(Path.GetDirectoryName(info.Path), "game.xml"));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -94,7 +94,7 @@ namespace MediaBrowser.LocalMetadata.Savers
|
||||
|
||||
private void SaveToFile(Stream stream, string path)
|
||||
{
|
||||
FileSystem.CreateDirectory(FileSystem.GetDirectoryName(path));
|
||||
Directory.CreateDirectory(Path.GetDirectoryName(path));
|
||||
// On Windows, savint the file will fail if the file is hidden or readonly
|
||||
FileSystem.SetAttributes(path, false, false);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user