Skip to content

Commit

Permalink
3.2.30.8
Browse files Browse the repository at this point in the history
  • Loading branch information
LukePulverenti committed Sep 5, 2017
1 parent b7794e9 commit 7a3434f
Show file tree
Hide file tree
Showing 107 changed files with 238 additions and 218 deletions.
7 changes: 1 addition & 6 deletions Emby.Dlna/ContentDirectory/ContentDirectory.cs
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@

namespace Emby.Dlna.ContentDirectory
{
public class ContentDirectory : BaseService, IContentDirectory, IDisposable
public class ContentDirectory : BaseService, IContentDirectory
{
private readonly ILibraryManager _libraryManager;
private readonly IImageProcessor _imageProcessor;
Expand Down Expand Up @@ -143,10 +143,5 @@ private User GetUser(DeviceProfile profile)

return null;
}

public void Dispose()
{

}
}
}
1 change: 1 addition & 0 deletions Emby.Dlna/DlnaManager.cs
Original file line number Diff line number Diff line change
Expand Up @@ -596,6 +596,7 @@ private void DumpProfiles()

public void Dispose()
{
GC.SuppressFinalize(this);
}
}
}
1 change: 1 addition & 0 deletions Emby.Dlna/Main/DlnaEntryPoint.cs
Original file line number Diff line number Diff line change
Expand Up @@ -394,6 +394,7 @@ public void Dispose()
_communicationsServer.Dispose();
_communicationsServer = null;
}
GC.SuppressFinalize(this);
}

public void DisposeDlnaServer()
Expand Down
7 changes: 1 addition & 6 deletions Emby.Dlna/MediaReceiverRegistrar/MediaReceiverRegistrar.cs
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@

namespace Emby.Dlna.MediaReceiverRegistrar
{
public class MediaReceiverRegistrar : BaseService, IMediaReceiverRegistrar, IDisposable
public class MediaReceiverRegistrar : BaseService, IMediaReceiverRegistrar
{
private readonly IServerConfigurationManager _config;
protected readonly IXmlReaderSettingsFactory XmlReaderSettingsFactory;
Expand All @@ -33,10 +33,5 @@ public ControlResponse ProcessControlRequest(ControlRequest request)
Logger, XmlReaderSettingsFactory)
.ProcessControlRequest(request);
}

public void Dispose()
{

}
}
}
1 change: 1 addition & 0 deletions Emby.Dlna/PlayTo/Device.cs
Original file line number Diff line number Diff line change
Expand Up @@ -1105,6 +1105,7 @@ public void Dispose()
_disposed = true;

DisposeTimer();
GC.SuppressFinalize(this);
}
}

Expand Down
1 change: 1 addition & 0 deletions Emby.Dlna/PlayTo/PlayToController.cs
Original file line number Diff line number Diff line change
Expand Up @@ -685,6 +685,7 @@ public void Dispose()
_device.OnDeviceUnavailable = null;

_device.Dispose();
GC.SuppressFinalize(this);
}
}

Expand Down
1 change: 1 addition & 0 deletions Emby.Dlna/PlayTo/PlayToManager.cs
Original file line number Diff line number Diff line change
Expand Up @@ -225,6 +225,7 @@ public void Dispose()
{
_disposed = true;
_deviceDiscovery.DeviceDiscovered -= _deviceDiscovery_DeviceDiscovered;
GC.SuppressFinalize(this);
}
}
}
6 changes: 4 additions & 2 deletions Emby.Drawing.ImageMagick/ImageMagickEncoder.cs
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@

namespace Emby.Drawing.ImageMagick
{
public class ImageMagickEncoder : IImageEncoder
public class ImageMagickEncoder : IImageEncoder, IDisposable
{
private readonly ILogger _logger;
private readonly IApplicationPaths _appPaths;
Expand All @@ -38,7 +38,8 @@ public string[] SupportedInputFormats
// Some common file name extensions for RAW picture files include: .cr2, .crw, .dng, .nef, .orf, .rw2, .pef, .arw, .sr2, .srf, and .tif.
return new[]
{
"tiff",
"tiff",
"tif",
"jpeg",
"jpg",
"png",
Expand Down Expand Up @@ -327,6 +328,7 @@ public void Dispose()
{
_disposed = true;
Wand.CloseEnvironment();
GC.SuppressFinalize(this);
}

private void CheckDisposed()
Expand Down
43 changes: 20 additions & 23 deletions Emby.Drawing.Skia/SkiaEncoder.cs
Original file line number Diff line number Diff line change
Expand Up @@ -193,30 +193,31 @@ internal static SKBitmap Decode(string path, bool forceCleanBitmap, out SKCodecO
{
using (var stream = new SKFileStream(path))
{
var codec = SKCodec.Create(stream);

if (codec == null)
using (var codec = SKCodec.Create(stream))
{
origin = SKCodecOrigin.TopLeft;
return null;
}
if (codec == null)
{
origin = SKCodecOrigin.TopLeft;
return null;
}

// create the bitmap
var bitmap = new SKBitmap(codec.Info.Width, codec.Info.Height, !requiresTransparencyHack);
// create the bitmap
var bitmap = new SKBitmap(codec.Info.Width, codec.Info.Height, !requiresTransparencyHack);

if (bitmap != null)
{
// decode
codec.GetPixels(bitmap.Info, bitmap.GetPixels());
if (bitmap != null)
{
// decode
codec.GetPixels(bitmap.Info, bitmap.GetPixels());

origin = codec.Origin;
}
else
{
origin = SKCodecOrigin.TopLeft;
}
origin = codec.Origin;
}
else
{
origin = SKCodecOrigin.TopLeft;
}

return bitmap;
return bitmap;
}
}
}

Expand Down Expand Up @@ -593,10 +594,6 @@ public string Name
get { return "Skia"; }
}

public void Dispose()
{
}

public bool SupportsImageCollageCreation
{
get { return true; }
Expand Down
10 changes: 9 additions & 1 deletion Emby.Drawing/ImageProcessor.cs
Original file line number Diff line number Diff line change
Expand Up @@ -126,6 +126,7 @@ public string[] SupportedInputFormats
return new string[]
{
"tiff",
"tif",
"jpeg",
"jpg",
"png",
Expand Down Expand Up @@ -967,8 +968,15 @@ public List<IImageEnhancer> GetSupportedEnhancers(IHasMetadata item, ImageType i
public void Dispose()
{
_disposed = true;
_imageEncoder.Dispose();

var disposable = _imageEncoder as IDisposable;
if (disposable != null)
{
disposable.Dispose();
}

_saveImageSizeTimer.Dispose();
GC.SuppressFinalize(this);
}

private void CheckDisposed()
Expand Down
4 changes: 0 additions & 4 deletions Emby.Drawing/NullImageEncoder.cs
Original file line number Diff line number Diff line change
Expand Up @@ -61,9 +61,5 @@ public ImageSize GetImageSize(string path)
{
throw new NotImplementedException();
}

public void Dispose()
{
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -491,6 +491,7 @@ public void Dispose()
//_logManager.LoggerLoaded -= _logManager_LoggerLoaded;

_appHost.ApplicationUpdated -= _appHost_ApplicationUpdated;
GC.SuppressFinalize(this);
}

/// <summary>
Expand Down
4 changes: 3 additions & 1 deletion Emby.Server.Implementations/ApplicationHost.cs
Original file line number Diff line number Diff line change
Expand Up @@ -828,7 +828,7 @@ protected async Task RegisterResources(IProgress<double> progress)
RegisterSingleInstance(MemoryStreamFactory);
RegisterSingleInstance(SystemEvents);

RegisterSingleInstance(LogManager);
RegisterSingleInstance(LogManager, false);
RegisterSingleInstance(Logger);

RegisterSingleInstance(EnvironmentInfo);
Expand Down Expand Up @@ -2341,6 +2341,7 @@ public void Dispose()
_disposed = true;

Dispose(true);
GC.SuppressFinalize(this);
}
}

Expand All @@ -2354,6 +2355,7 @@ protected virtual void Dispose(bool dispose)
{
var type = GetType();

LogManager.AddConsoleOutput();
Logger.Info("Disposing " + type.Name);

var parts = DisposableParts.Distinct().Where(i => i.GetType() != type).ToList();
Expand Down
1 change: 1 addition & 0 deletions Emby.Server.Implementations/Channels/ChannelManager.cs
Original file line number Diff line number Diff line change
Expand Up @@ -1624,6 +1624,7 @@ private void SetSavedLastChannels(string value)

public void Dispose()
{
GC.SuppressFinalize(this);
}
}
}
1 change: 1 addition & 0 deletions Emby.Server.Implementations/Data/ManagedConnection.cs
Original file line number Diff line number Diff line change
Expand Up @@ -77,6 +77,7 @@ public void Dispose()
{
Close();
}
GC.SuppressFinalize(this);
}
}
}
1 change: 1 addition & 0 deletions Emby.Server.Implementations/Diagnostics/CommonProcess.cs
Original file line number Diff line number Diff line change
Expand Up @@ -104,6 +104,7 @@ public Task<bool> WaitForExitAsync(int timeMs)
public void Dispose()
{
_process.Dispose();
GC.SuppressFinalize(this);
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -112,6 +112,7 @@ public void Dispose()
_appHost.HasPendingRestartChanged -= _appHost_HasPendingRestartChanged;

DisposeTimer();
GC.SuppressFinalize(this);
}

private void DisposeTimer()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -294,6 +294,7 @@ public void Dispose()
{
_disposed = true;
DisposeNat();
GC.SuppressFinalize(this);
}

private void DisposeNat()
Expand Down
1 change: 1 addition & 0 deletions Emby.Server.Implementations/EntryPoints/KeepServerAwake.cs
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,7 @@ public void Dispose()
_timer.Dispose();
_timer = null;
}
GC.SuppressFinalize(this);
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -426,6 +426,7 @@ private IEnumerable<T> TranslatePhysicalItemToUserLibrary<T>(T item, User user,
public void Dispose()
{
Dispose(true);
GC.SuppressFinalize(this);
}

/// <summary>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -68,6 +68,7 @@ public void Dispose()
_timer.Dispose();
_timer = null;
}
GC.SuppressFinalize(this);
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -72,6 +72,7 @@ public void Dispose()
_liveTvManager.SeriesTimerCancelled -= _liveTvManager_SeriesTimerCancelled;
_liveTvManager.TimerCreated -= _liveTvManager_TimerCreated;
_liveTvManager.SeriesTimerCreated -= _liveTvManager_SeriesTimerCreated;
GC.SuppressFinalize(this);
}
}
}
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
using MediaBrowser.Controller.Library;
using System;
using MediaBrowser.Controller.Library;
using MediaBrowser.Controller.Plugins;
using System.Threading;

Expand Down Expand Up @@ -36,6 +37,7 @@ public async void Run()
/// </summary>
public void Dispose()
{
GC.SuppressFinalize(this);
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -174,6 +174,7 @@ private async void SendMessageToUserSession<T>(User user, string name, T data)
public void Dispose()
{
Dispose(true);
GC.SuppressFinalize(this);
}

/// <summary>
Expand Down
4 changes: 3 additions & 1 deletion Emby.Server.Implementations/EntryPoints/StartupWizard.cs
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
using Emby.Server.Implementations.Browser;
using System;
using Emby.Server.Implementations.Browser;
using MediaBrowser.Controller;
using MediaBrowser.Controller.Plugins;
using MediaBrowser.Model.Logging;
Expand Down Expand Up @@ -54,6 +55,7 @@ private void LaunchStartupWizard()
/// </summary>
public void Dispose()
{
GC.SuppressFinalize(this);
}
}
}
1 change: 1 addition & 0 deletions Emby.Server.Implementations/EntryPoints/SystemEvents.cs
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,7 @@ private void _systemEvents_SystemShutdown(object sender, EventArgs e)
public void Dispose()
{
_systemEvents.SystemShutdown -= _systemEvents_SystemShutdown;
GC.SuppressFinalize(this);
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -65,6 +65,7 @@ public void Run()
public void Dispose()
{
Dispose(true);
GC.SuppressFinalize(this);
}

/// <summary>
Expand Down
1 change: 1 addition & 0 deletions Emby.Server.Implementations/EntryPoints/UsageEntryPoint.cs
Original file line number Diff line number Diff line change
Expand Up @@ -130,6 +130,7 @@ private async void OnTimerFired()
public void Dispose()
{
_sessionManager.SessionStarted -= _sessionManager_SessionStarted;
GC.SuppressFinalize(this);
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -160,6 +160,7 @@ public void Dispose()
}

_userDataManager.UserDataSaved -= _userDataManager_UserDataSaved;
GC.SuppressFinalize(this);
}
}
}
Loading

0 comments on commit 7a3434f

Please sign in to comment.