clean related files when deleting items

This commit is contained in:
Luke Pulverenti
2017-02-18 03:32:17 -05:00
parent 36f8eb1149
commit 6091e00e18
31 changed files with 161 additions and 295 deletions

View File

@@ -606,9 +606,20 @@ namespace MediaBrowser.Model.Dlna
return playlistItem;
}
private int GetDefaultAudioBitrateIfUnknown(MediaStream audioStream)
{
if ((audioStream.Channels ?? 0) >= 6)
{
return 384000;
}
return 192000;
}
private int GetAudioBitrate(string subProtocol, long? maxTotalBitrate, int? targetAudioChannels, string targetAudioCodec, MediaStream audioStream)
{
int defaultBitrate = audioStream == null ? 192000 : audioStream.BitRate ?? 192000;
int defaultBitrate = audioStream == null ? 192000 : audioStream.BitRate ?? GetDefaultAudioBitrateIfUnknown(audioStream);
// Reduce the bitrate if we're downmixing
if (targetAudioChannels.HasValue && audioStream != null && audioStream.Channels.HasValue && targetAudioChannels.Value < audioStream.Channels.Value)
{

View File

@@ -85,8 +85,6 @@ namespace MediaBrowser.Model.Dto
public float? Metascore { get; set; }
public bool? HasDynamicCategories { get; set; }
public int? AnimeSeriesIndex { get; set; }
/// <summary>
/// Gets or sets a value indicating whether [supports synchronize].
/// </summary>
@@ -263,7 +261,7 @@ namespace MediaBrowser.Model.Dto
/// Gets or sets the play access.
/// </summary>
/// <value>The play access.</value>
public PlayAccess PlayAccess { get; set; }
public PlayAccess? PlayAccess { get; set; }
/// <summary>
/// Gets or sets the aspect ratio.
@@ -759,7 +757,7 @@ namespace MediaBrowser.Model.Dto
/// Gets or sets the type of the location.
/// </summary>
/// <value>The type of the location.</value>
public LocationType LocationType { get; set; }
public LocationType? LocationType { get; set; }
/// <summary>
/// Gets or sets the type of the iso.