mirror of
https://github.com/jellyfin/jellyfin.git
synced 2026-03-16 15:16:41 +00:00
separate player selection into it's own script
This commit is contained in:
@@ -261,10 +261,11 @@ namespace Emby.Server.Implementations.IO
|
||||
// In order to determine if the file is being written to, we have to request write access
|
||||
// But if the server only has readonly access, this is going to cause this entire algorithm to fail
|
||||
// So we'll take a best guess about our access level
|
||||
var requestedFileAccess = ConfigurationManager.Configuration.SaveLocalMeta
|
||||
? FileAccessMode.ReadWrite
|
||||
: FileAccessMode.Read;
|
||||
//var requestedFileAccess = ConfigurationManager.Configuration.SaveLocalMeta
|
||||
// ? FileAccessMode.ReadWrite
|
||||
// : FileAccessMode.Read;
|
||||
|
||||
var requestedFileAccess = FileAccessMode.Read;
|
||||
try
|
||||
{
|
||||
using (_fileSystem.GetFileStream(path, FileOpenMode.Open, requestedFileAccess, FileShareMode.ReadWrite))
|
||||
|
||||
@@ -1956,30 +1956,6 @@ namespace Emby.Server.Implementations.Library
|
||||
|
||||
var options = collectionFolder == null ? new LibraryOptions() : collectionFolder.GetLibraryOptions();
|
||||
|
||||
if (options.SchemaVersion < 3)
|
||||
{
|
||||
options.SaveLocalMetadata = ConfigurationManager.Configuration.SaveLocalMeta;
|
||||
options.EnableInternetProviders = ConfigurationManager.Configuration.EnableInternetProviders;
|
||||
}
|
||||
|
||||
if (options.SchemaVersion < 2)
|
||||
{
|
||||
var chapterOptions = ConfigurationManager.GetConfiguration<ChapterOptions>("chapters");
|
||||
options.ExtractChapterImagesDuringLibraryScan = chapterOptions.ExtractDuringLibraryScan;
|
||||
|
||||
if (collectionFolder != null)
|
||||
{
|
||||
if (string.Equals(collectionFolder.CollectionType, "movies", StringComparison.OrdinalIgnoreCase))
|
||||
{
|
||||
options.EnableChapterImageExtraction = chapterOptions.EnableMovieChapterImageExtraction;
|
||||
}
|
||||
else if (string.Equals(collectionFolder.CollectionType, CollectionType.TvShows, StringComparison.OrdinalIgnoreCase))
|
||||
{
|
||||
options.EnableChapterImageExtraction = chapterOptions.EnableEpisodeChapterImageExtraction;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
return options;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user