aboutsummaryrefslogtreecommitdiff
path: root/MediaBrowser.Server.Implementations
diff options
context:
space:
mode:
authorTim Hobbs <jesus.tesh@gmail.com>2014-03-05 04:27:13 -0800
committerTim Hobbs <jesus.tesh@gmail.com>2014-03-05 04:27:13 -0800
commit482fde658746750075ff8a562ca1fb88f1739ef4 (patch)
tree7bd5084ffa6be20a4533eb37d94f852f2d888a84 /MediaBrowser.Server.Implementations
parent604f971477da4dca5247f7d531323175ad044150 (diff)
parent9396f16aed2f304789324afc83e0c9f385c5f00a (diff)
Merge branch 'master' of https://github.com/MediaBrowser/MediaBrowser
Conflicts: MediaBrowser.WebDashboard/dashboard-ui/scripts/mediaplayer.js
Diffstat (limited to 'MediaBrowser.Server.Implementations')
-rw-r--r--MediaBrowser.Server.Implementations/Dto/DtoService.cs9
-rw-r--r--MediaBrowser.Server.Implementations/EntryPoints/ExternalPortForwarding.cs28
-rw-r--r--MediaBrowser.Server.Implementations/Library/LibraryManager.cs20
-rw-r--r--MediaBrowser.Server.Implementations/Library/Resolvers/Audio/MusicAlbumResolver.cs1
-rw-r--r--MediaBrowser.Server.Implementations/LiveTv/LiveTvManager.cs3
-rw-r--r--MediaBrowser.Server.Implementations/MediaEncoder/EncodingManager.cs5
-rw-r--r--MediaBrowser.Server.Implementations/MediaEncoder/MediaEncoder.cs4
-rw-r--r--MediaBrowser.Server.Implementations/ScheduledTasks/PeopleValidationTask.cs4
-rw-r--r--MediaBrowser.Server.Implementations/ScheduledTasks/RefreshMediaLibraryTask.cs2
9 files changed, 52 insertions, 24 deletions
diff --git a/MediaBrowser.Server.Implementations/Dto/DtoService.cs b/MediaBrowser.Server.Implementations/Dto/DtoService.cs
index fee80c317..7bf87875e 100644
--- a/MediaBrowser.Server.Implementations/Dto/DtoService.cs
+++ b/MediaBrowser.Server.Implementations/Dto/DtoService.cs
@@ -664,6 +664,7 @@ namespace MediaBrowser.Server.Implementations.Dto
}
dto.DisplayMediaType = item.DisplayMediaType;
+ dto.IsUnidentified = item.IsUnidentified;
if (fields.Contains(ItemFields.Settings))
{
@@ -969,6 +970,12 @@ namespace MediaBrowser.Server.Implementations.Dto
}
}
+ var supportsPlaceHolders = item as ISupportsPlaceHolders;
+ if (supportsPlaceHolders != null)
+ {
+ dto.IsPlaceHolder = supportsPlaceHolders.IsPlaceHolder;
+ }
+
// Add audio info
var audio = item as Audio;
if (audio != null)
@@ -1092,6 +1099,8 @@ namespace MediaBrowser.Server.Implementations.Dto
{
dto.DisplaySpecialsWithSeasons = series.DisplaySpecialsWithSeasons;
}
+
+ dto.AnimeSeriesIndex = series.AnimeSeriesIndex;
}
if (episode != null)
diff --git a/MediaBrowser.Server.Implementations/EntryPoints/ExternalPortForwarding.cs b/MediaBrowser.Server.Implementations/EntryPoints/ExternalPortForwarding.cs
index 43037d6ce..c0d784fcc 100644
--- a/MediaBrowser.Server.Implementations/EntryPoints/ExternalPortForwarding.cs
+++ b/MediaBrowser.Server.Implementations/EntryPoints/ExternalPortForwarding.cs
@@ -42,7 +42,7 @@ namespace MediaBrowser.Server.Implementations.EntryPoints
public void Run()
{
- NatUtility.Logger = new LogWriter(_logger);
+ //NatUtility.Logger = new LogWriter(_logger);
Reload();
}
@@ -64,17 +64,17 @@ namespace MediaBrowser.Server.Implementations.EntryPoints
void NatUtility_UnhandledException(object sender, UnhandledExceptionEventArgs e)
{
- var ex = e.ExceptionObject as Exception;
-
- if (ex == null)
- {
- _logger.Error("Unidentified error reported by Mono.Nat");
- }
- else
- {
- // Seeing some blank exceptions coming through here
- _logger.ErrorException("Error reported by Mono.Nat: ", ex);
- }
+ //var ex = e.ExceptionObject as Exception;
+
+ //if (ex == null)
+ //{
+ // _logger.Error("Unidentified error reported by Mono.Nat");
+ //}
+ //else
+ //{
+ // // Seeing some blank exceptions coming through here
+ // _logger.ErrorException("Error reported by Mono.Nat: ", ex);
+ //}
}
void NatUtility_DeviceFound(object sender, DeviceEventArgs e)
@@ -88,7 +88,7 @@ namespace MediaBrowser.Server.Implementations.EntryPoints
}
catch (Exception ex)
{
- _logger.ErrorException("Error creating port forwarding rules", ex);
+ //_logger.ErrorException("Error creating port forwarding rules", ex);
}
}
@@ -106,7 +106,7 @@ namespace MediaBrowser.Server.Implementations.EntryPoints
private void CreatePortMap(INatDevice device, int port)
{
- _logger.Info("Creating port map on port {0}", port);
+ _logger.Debug("Creating port map on port {0}", port);
device.CreatePortMap(new Mapping(Protocol.Tcp, port, port)
{
diff --git a/MediaBrowser.Server.Implementations/Library/LibraryManager.cs b/MediaBrowser.Server.Implementations/Library/LibraryManager.cs
index 66e9e4fa1..6e9d803bf 100644
--- a/MediaBrowser.Server.Implementations/Library/LibraryManager.cs
+++ b/MediaBrowser.Server.Implementations/Library/LibraryManager.cs
@@ -451,7 +451,7 @@ namespace MediaBrowser.Server.Implementations.Library
}
}
- if (options.DeleteFileLocation && (locationType == LocationType.FileSystem || locationType == LocationType.Offline))
+ if (options.DeleteFileLocation && locationType != LocationType.Remote && locationType != LocationType.Virtual)
{
foreach (var path in item.GetDeletePaths().ToList())
{
@@ -922,6 +922,9 @@ namespace MediaBrowser.Server.Implementations.Library
/// <returns>Task.</returns>
public Task ValidatePeople(CancellationToken cancellationToken, IProgress<double> progress)
{
+ // Ensure the location is unavailable.
+ Directory.CreateDirectory(ConfigurationManager.ApplicationPaths.PeoplePath);
+
return new PeopleValidator(this, _logger).ValidatePeople(cancellationToken, progress);
}
@@ -933,6 +936,9 @@ namespace MediaBrowser.Server.Implementations.Library
/// <returns>Task.</returns>
public Task ValidateArtists(CancellationToken cancellationToken, IProgress<double> progress)
{
+ // Ensure the location is unavailable.
+ Directory.CreateDirectory(ConfigurationManager.ApplicationPaths.ArtistsPath);
+
return new ArtistsValidator(this, _userManager, _logger).Run(progress, cancellationToken);
}
@@ -944,6 +950,9 @@ namespace MediaBrowser.Server.Implementations.Library
/// <returns>Task.</returns>
public Task ValidateMusicGenres(CancellationToken cancellationToken, IProgress<double> progress)
{
+ // Ensure the location is unavailable.
+ Directory.CreateDirectory(ConfigurationManager.ApplicationPaths.MusicGenrePath);
+
return new MusicGenresValidator(this, _userManager, _logger).Run(progress, cancellationToken);
}
@@ -955,6 +964,9 @@ namespace MediaBrowser.Server.Implementations.Library
/// <returns>Task.</returns>
public Task ValidateGameGenres(CancellationToken cancellationToken, IProgress<double> progress)
{
+ // Ensure the location is unavailable.
+ Directory.CreateDirectory(ConfigurationManager.ApplicationPaths.GameGenrePath);
+
return new GameGenresValidator(this, _userManager, _logger).Run(progress, cancellationToken);
}
@@ -966,6 +978,9 @@ namespace MediaBrowser.Server.Implementations.Library
/// <returns>Task.</returns>
public Task ValidateStudios(CancellationToken cancellationToken, IProgress<double> progress)
{
+ // Ensure the location is unavailable.
+ Directory.CreateDirectory(ConfigurationManager.ApplicationPaths.StudioPath);
+
return new StudiosValidator(this, _userManager, _logger).Run(progress, cancellationToken);
}
@@ -977,6 +992,9 @@ namespace MediaBrowser.Server.Implementations.Library
/// <returns>Task.</returns>
public Task ValidateGenres(CancellationToken cancellationToken, IProgress<double> progress)
{
+ // Ensure the location is unavailable.
+ Directory.CreateDirectory(ConfigurationManager.ApplicationPaths.GenrePath);
+
return new GenresValidator(this, _userManager, _logger).Run(progress, cancellationToken);
}
diff --git a/MediaBrowser.Server.Implementations/Library/Resolvers/Audio/MusicAlbumResolver.cs b/MediaBrowser.Server.Implementations/Library/Resolvers/Audio/MusicAlbumResolver.cs
index 7e643cd99..871171541 100644
--- a/MediaBrowser.Server.Implementations/Library/Resolvers/Audio/MusicAlbumResolver.cs
+++ b/MediaBrowser.Server.Implementations/Library/Resolvers/Audio/MusicAlbumResolver.cs
@@ -132,6 +132,7 @@ namespace MediaBrowser.Server.Implementations.Library.Resolvers.Audio
return true;
}
if (EntityResolutionHelper.IsVideoFile(fullName)) return false;
+ if (EntityResolutionHelper.IsVideoPlaceHolder(fullName)) return false;
}
// or a single audio file and no video files
diff --git a/MediaBrowser.Server.Implementations/LiveTv/LiveTvManager.cs b/MediaBrowser.Server.Implementations/LiveTv/LiveTvManager.cs
index 192f84a6f..bd315530e 100644
--- a/MediaBrowser.Server.Implementations/LiveTv/LiveTvManager.cs
+++ b/MediaBrowser.Server.Implementations/LiveTv/LiveTvManager.cs
@@ -7,7 +7,6 @@ using MediaBrowser.Controller.Dto;
using MediaBrowser.Controller.Entities;
using MediaBrowser.Controller.Library;
using MediaBrowser.Controller.LiveTv;
-using MediaBrowser.Controller.MediaEncoding;
using MediaBrowser.Controller.Persistence;
using MediaBrowser.Controller.Providers;
using MediaBrowser.Controller.Sorting;
@@ -49,7 +48,7 @@ namespace MediaBrowser.Server.Implementations.LiveTv
private List<Guid> _channelIdList = new List<Guid>();
private Dictionary<Guid, LiveTvProgram> _programs = new Dictionary<Guid, LiveTvProgram>();
- private SemaphoreSlim _refreshSemaphore = new SemaphoreSlim(1, 1);
+ private readonly SemaphoreSlim _refreshSemaphore = new SemaphoreSlim(1, 1);
public LiveTvManager(IServerConfigurationManager config, IFileSystem fileSystem, ILogger logger, IItemRepository itemRepo, IImageProcessor imageProcessor, IUserDataManager userDataManager, IDtoService dtoService, IUserManager userManager, ILibraryManager libraryManager, ITaskManager taskManager)
{
diff --git a/MediaBrowser.Server.Implementations/MediaEncoder/EncodingManager.cs b/MediaBrowser.Server.Implementations/MediaEncoder/EncodingManager.cs
index 6f4b7a8a7..f74865d2c 100644
--- a/MediaBrowser.Server.Implementations/MediaEncoder/EncodingManager.cs
+++ b/MediaBrowser.Server.Implementations/MediaEncoder/EncodingManager.cs
@@ -84,6 +84,11 @@ namespace MediaBrowser.Server.Implementations.MediaEncoder
/// <returns><c>true</c> if [is eligible for chapter image extraction] [the specified video]; otherwise, <c>false</c>.</returns>
private bool IsEligibleForChapterImageExtraction(Video video)
{
+ if (video.IsPlaceHolder)
+ {
+ return false;
+ }
+
if (video is Movie)
{
if (!_config.Configuration.EnableMovieChapterImageExtraction)
diff --git a/MediaBrowser.Server.Implementations/MediaEncoder/MediaEncoder.cs b/MediaBrowser.Server.Implementations/MediaEncoder/MediaEncoder.cs
index e71867b05..25b9c687c 100644
--- a/MediaBrowser.Server.Implementations/MediaEncoder/MediaEncoder.cs
+++ b/MediaBrowser.Server.Implementations/MediaEncoder/MediaEncoder.cs
@@ -125,13 +125,11 @@ namespace MediaBrowser.Server.Implementations.MediaEncoder
switch (type)
{
+ case InputType.Bluray:
case InputType.Dvd:
case InputType.File:
inputPath = GetConcatInputArgument(inputFiles);
break;
- case InputType.Bluray:
- inputPath = GetBlurayInputArgument(inputFiles[0]);
- break;
case InputType.Url:
inputPath = GetHttpInputArgument(inputFiles);
break;
diff --git a/MediaBrowser.Server.Implementations/ScheduledTasks/PeopleValidationTask.cs b/MediaBrowser.Server.Implementations/ScheduledTasks/PeopleValidationTask.cs
index 7d0593c5f..bfa4fe944 100644
--- a/MediaBrowser.Server.Implementations/ScheduledTasks/PeopleValidationTask.cs
+++ b/MediaBrowser.Server.Implementations/ScheduledTasks/PeopleValidationTask.cs
@@ -34,9 +34,7 @@ namespace MediaBrowser.Server.Implementations.ScheduledTasks
{
return new ITaskTrigger[]
{
- new DailyTrigger { TimeOfDay = TimeSpan.FromHours(2) },
-
- new IntervalTrigger{ Interval = TimeSpan.FromHours(24)}
+ new DailyTrigger { TimeOfDay = TimeSpan.FromHours(3) },
};
}
diff --git a/MediaBrowser.Server.Implementations/ScheduledTasks/RefreshMediaLibraryTask.cs b/MediaBrowser.Server.Implementations/ScheduledTasks/RefreshMediaLibraryTask.cs
index 462dc1e78..97dfb2c5d 100644
--- a/MediaBrowser.Server.Implementations/ScheduledTasks/RefreshMediaLibraryTask.cs
+++ b/MediaBrowser.Server.Implementations/ScheduledTasks/RefreshMediaLibraryTask.cs
@@ -40,7 +40,7 @@ namespace MediaBrowser.Server.Implementations.ScheduledTasks
new SystemEventTrigger{ SystemEvent = SystemEvent.WakeFromSleep},
- new IntervalTrigger{ Interval = TimeSpan.FromHours(4)}
+ new IntervalTrigger{ Interval = TimeSpan.FromHours(6)}
};
}