aboutsummaryrefslogtreecommitdiff
path: root/MediaBrowser.Server.Implementations
diff options
context:
space:
mode:
Diffstat (limited to 'MediaBrowser.Server.Implementations')
-rw-r--r--MediaBrowser.Server.Implementations/Library/LibraryManager.cs27
-rw-r--r--MediaBrowser.Server.Implementations/MediaEncoder/EncodingManager.cs26
-rw-r--r--MediaBrowser.Server.Implementations/Session/SessionManager.cs3
3 files changed, 20 insertions, 36 deletions
diff --git a/MediaBrowser.Server.Implementations/Library/LibraryManager.cs b/MediaBrowser.Server.Implementations/Library/LibraryManager.cs
index f6fb158ae..93ee91c21 100644
--- a/MediaBrowser.Server.Implementations/Library/LibraryManager.cs
+++ b/MediaBrowser.Server.Implementations/Library/LibraryManager.cs
@@ -1216,12 +1216,7 @@ namespace MediaBrowser.Server.Implementations.Library
if (libraryFolder != null)
{
info.ItemId = libraryFolder.Id.ToString("N");
- }
-
- var collectionFolder = libraryFolder as CollectionFolder;
- if (collectionFolder != null)
- {
- info.LibraryOptions = collectionFolder.GetLibraryOptions();
+ info.LibraryOptions = GetLibraryOptions(libraryFolder);
}
return info;
@@ -1889,11 +1884,23 @@ namespace MediaBrowser.Server.Implementations.Library
public LibraryOptions GetLibraryOptions(BaseItem item)
{
- var collectionFolder = GetCollectionFolders(item)
- .OfType<CollectionFolder>()
- .FirstOrDefault();
+ var collectionFolder = item as CollectionFolder;
+ if (collectionFolder == null)
+ {
+ collectionFolder = GetCollectionFolders(item)
+ .OfType<CollectionFolder>()
+ .FirstOrDefault();
+ }
+
+ var options = collectionFolder == null ? new LibraryOptions() : collectionFolder.GetLibraryOptions();
+
+ if (options.SchemaVersion < 3)
+ {
+ options.SaveLocalMetadata = ConfigurationManager.Configuration.SaveLocalMeta;
+ options.EnableInternetProviders = ConfigurationManager.Configuration.EnableInternetProviders;
+ }
- return collectionFolder == null ? new LibraryOptions() : collectionFolder.GetLibraryOptions();
+ return options;
}
public string GetContentType(BaseItem item)
diff --git a/MediaBrowser.Server.Implementations/MediaEncoder/EncodingManager.cs b/MediaBrowser.Server.Implementations/MediaEncoder/EncodingManager.cs
index 06c109dfc..21e847c68 100644
--- a/MediaBrowser.Server.Implementations/MediaEncoder/EncodingManager.cs
+++ b/MediaBrowser.Server.Implementations/MediaEncoder/EncodingManager.cs
@@ -61,7 +61,7 @@ namespace MediaBrowser.Server.Implementations.MediaEncoder
}
var libraryOptions = _libraryManager.GetLibraryOptions(video);
- if (libraryOptions != null && libraryOptions.SchemaVersion >= 2)
+ if (libraryOptions != null)
{
if (!libraryOptions.EnableChapterImageExtraction)
{
@@ -70,29 +70,7 @@ namespace MediaBrowser.Server.Implementations.MediaEncoder
}
else
{
- var options = _chapterManager.GetConfiguration();
-
- if (video is Movie)
- {
- if (!options.EnableMovieChapterImageExtraction)
- {
- return false;
- }
- }
- else if (video is Episode)
- {
- if (!options.EnableEpisodeChapterImageExtraction)
- {
- return false;
- }
- }
- else
- {
- if (!options.EnableOtherVideoChapterImageExtraction)
- {
- return false;
- }
- }
+ return false;
}
// Can't extract images if there are no video streams
diff --git a/MediaBrowser.Server.Implementations/Session/SessionManager.cs b/MediaBrowser.Server.Implementations/Session/SessionManager.cs
index d2bdee9fa..2fcc76588 100644
--- a/MediaBrowser.Server.Implementations/Session/SessionManager.cs
+++ b/MediaBrowser.Server.Implementations/Session/SessionManager.cs
@@ -242,8 +242,7 @@ namespace MediaBrowser.Server.Implementations.Session
var userLastActivityDate = user.LastActivityDate ?? DateTime.MinValue;
user.LastActivityDate = activityDate;
- // Don't log in the db anymore frequently than 10 seconds
- if ((activityDate - userLastActivityDate).TotalSeconds > 10)
+ if ((activityDate - userLastActivityDate).TotalSeconds > 60)
{
try
{