commit
b2e1d70191
|
@ -7,6 +7,7 @@ namespace DvdLib.Ifo
|
||||||
public class Cell
|
public class Cell
|
||||||
{
|
{
|
||||||
public CellPlaybackInfo PlaybackInfo { get; private set; }
|
public CellPlaybackInfo PlaybackInfo { get; private set; }
|
||||||
|
|
||||||
public CellPositionInfo PositionInfo { get; private set; }
|
public CellPositionInfo PositionInfo { get; private set; }
|
||||||
|
|
||||||
internal void ParsePlayback(BinaryReader br)
|
internal void ParsePlayback(BinaryReader br)
|
||||||
|
|
|
@ -5,7 +5,9 @@ namespace DvdLib.Ifo
|
||||||
public class Chapter
|
public class Chapter
|
||||||
{
|
{
|
||||||
public ushort ProgramChainNumber { get; private set; }
|
public ushort ProgramChainNumber { get; private set; }
|
||||||
|
|
||||||
public ushort ProgramNumber { get; private set; }
|
public ushort ProgramNumber { get; private set; }
|
||||||
|
|
||||||
public uint ChapterNumber { get; private set; }
|
public uint ChapterNumber { get; private set; }
|
||||||
|
|
||||||
public Chapter(ushort pgcNum, ushort programNum, uint chapterNum)
|
public Chapter(ushort pgcNum, ushort programNum, uint chapterNum)
|
||||||
|
|
|
@ -22,7 +22,9 @@ namespace DvdLib.Ifo
|
||||||
public readonly List<Cell> Cells;
|
public readonly List<Cell> Cells;
|
||||||
|
|
||||||
public DvdTime PlaybackTime { get; private set; }
|
public DvdTime PlaybackTime { get; private set; }
|
||||||
|
|
||||||
public UserOperation ProhibitedUserOperations { get; private set; }
|
public UserOperation ProhibitedUserOperations { get; private set; }
|
||||||
|
|
||||||
public byte[] AudioStreamControl { get; private set; } // 8*2 entries
|
public byte[] AudioStreamControl { get; private set; } // 8*2 entries
|
||||||
public byte[] SubpictureStreamControl { get; private set; } // 32*4 entries
|
public byte[] SubpictureStreamControl { get; private set; } // 32*4 entries
|
||||||
|
|
||||||
|
@ -33,9 +35,11 @@ namespace DvdLib.Ifo
|
||||||
private ushort _goupProgramNumber;
|
private ushort _goupProgramNumber;
|
||||||
|
|
||||||
public ProgramPlaybackMode PlaybackMode { get; private set; }
|
public ProgramPlaybackMode PlaybackMode { get; private set; }
|
||||||
|
|
||||||
public uint ProgramCount { get; private set; }
|
public uint ProgramCount { get; private set; }
|
||||||
|
|
||||||
public byte StillTime { get; private set; }
|
public byte StillTime { get; private set; }
|
||||||
|
|
||||||
public byte[] Palette { get; private set; } // 16*4 entries
|
public byte[] Palette { get; private set; } // 16*4 entries
|
||||||
|
|
||||||
private ushort _commandTableOffset;
|
private ushort _commandTableOffset;
|
||||||
|
|
|
@ -8,8 +8,11 @@ namespace DvdLib.Ifo
|
||||||
public class Title
|
public class Title
|
||||||
{
|
{
|
||||||
public uint TitleNumber { get; private set; }
|
public uint TitleNumber { get; private set; }
|
||||||
|
|
||||||
public uint AngleCount { get; private set; }
|
public uint AngleCount { get; private set; }
|
||||||
|
|
||||||
public ushort ChapterCount { get; private set; }
|
public ushort ChapterCount { get; private set; }
|
||||||
|
|
||||||
public byte VideoTitleSetNumber { get; private set; }
|
public byte VideoTitleSetNumber { get; private set; }
|
||||||
|
|
||||||
private ushort _parentalManagementMask;
|
private ushort _parentalManagementMask;
|
||||||
|
@ -17,6 +20,7 @@ namespace DvdLib.Ifo
|
||||||
private uint _vtsStartSector; // relative to start of entire disk
|
private uint _vtsStartSector; // relative to start of entire disk
|
||||||
|
|
||||||
public ProgramChain EntryProgramChain { get; private set; }
|
public ProgramChain EntryProgramChain { get; private set; }
|
||||||
|
|
||||||
public readonly List<ProgramChain> ProgramChains;
|
public readonly List<ProgramChain> ProgramChains;
|
||||||
|
|
||||||
public readonly List<Chapter> Chapters;
|
public readonly List<Chapter> Chapters;
|
||||||
|
|
|
@ -1357,6 +1357,7 @@ namespace Emby.Dlna.ContentDirectory
|
||||||
internal class ServerItem
|
internal class ServerItem
|
||||||
{
|
{
|
||||||
public BaseItem Item { get; set; }
|
public BaseItem Item { get; set; }
|
||||||
|
|
||||||
public StubType? StubType { get; set; }
|
public StubType? StubType { get; set; }
|
||||||
|
|
||||||
public ServerItem(BaseItem item)
|
public ServerItem(BaseItem item)
|
||||||
|
|
|
@ -705,7 +705,7 @@ namespace Emby.Dlna.Didl
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Adds fields used by both items and folders
|
/// Adds fields used by both items and folders.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
private void AddCommonFields(BaseItem item, StubType? itemStubType, BaseItem context, XmlWriter writer, Filter filter)
|
private void AddCommonFields(BaseItem item, StubType? itemStubType, BaseItem context, XmlWriter writer, Filter filter)
|
||||||
{
|
{
|
||||||
|
@ -765,6 +765,7 @@ namespace Emby.Dlna.Didl
|
||||||
{
|
{
|
||||||
AddValue(writer, "dc", "rating", item.OfficialRating, NS_DC);
|
AddValue(writer, "dc", "rating", item.OfficialRating, NS_DC);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (filter.Contains("upnp:rating"))
|
if (filter.Contains("upnp:rating"))
|
||||||
{
|
{
|
||||||
AddValue(writer, "upnp", "rating", item.OfficialRating, NS_UPNP);
|
AddValue(writer, "upnp", "rating", item.OfficialRating, NS_UPNP);
|
||||||
|
@ -1052,10 +1053,12 @@ namespace Emby.Dlna.Didl
|
||||||
{
|
{
|
||||||
return GetImageInfo(item, ImageType.Primary);
|
return GetImageInfo(item, ImageType.Primary);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (item.HasImage(ImageType.Thumb))
|
if (item.HasImage(ImageType.Thumb))
|
||||||
{
|
{
|
||||||
return GetImageInfo(item, ImageType.Thumb);
|
return GetImageInfo(item, ImageType.Thumb);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (item.HasImage(ImageType.Backdrop))
|
if (item.HasImage(ImageType.Backdrop))
|
||||||
{
|
{
|
||||||
if (item is Channel)
|
if (item is Channel)
|
||||||
|
|
|
@ -438,6 +438,7 @@ namespace Emby.Dlna
|
||||||
{
|
{
|
||||||
throw new ArgumentException("Profile is missing Id");
|
throw new ArgumentException("Profile is missing Id");
|
||||||
}
|
}
|
||||||
|
|
||||||
if (string.IsNullOrEmpty(profile.Name))
|
if (string.IsNullOrEmpty(profile.Name))
|
||||||
{
|
{
|
||||||
throw new ArgumentException("Profile is missing Name");
|
throw new ArgumentException("Profile is missing Name");
|
||||||
|
@ -463,6 +464,7 @@ namespace Emby.Dlna
|
||||||
{
|
{
|
||||||
_profiles[path] = new Tuple<InternalProfileInfo, DeviceProfile>(GetInternalProfileInfo(_fileSystem.GetFileInfo(path), type), profile);
|
_profiles[path] = new Tuple<InternalProfileInfo, DeviceProfile>(GetInternalProfileInfo(_fileSystem.GetFileInfo(path), type), profile);
|
||||||
}
|
}
|
||||||
|
|
||||||
SerializeToXml(profile, path);
|
SerializeToXml(profile, path);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -473,7 +475,7 @@ namespace Emby.Dlna
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Recreates the object using serialization, to ensure it's not a subclass.
|
/// Recreates the object using serialization, to ensure it's not a subclass.
|
||||||
/// If it's a subclass it may not serlialize properly to xml (different root element tag name)
|
/// If it's a subclass it may not serlialize properly to xml (different root element tag name).
|
||||||
/// </summary>
|
/// </summary>
|
||||||
/// <param name="profile"></param>
|
/// <param name="profile"></param>
|
||||||
/// <returns></returns>
|
/// <returns></returns>
|
||||||
|
@ -492,6 +494,7 @@ namespace Emby.Dlna
|
||||||
class InternalProfileInfo
|
class InternalProfileInfo
|
||||||
{
|
{
|
||||||
internal DeviceProfileInfo Info { get; set; }
|
internal DeviceProfileInfo Info { get; set; }
|
||||||
|
|
||||||
internal string Path { get; set; }
|
internal string Path { get; set; }
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -31,18 +31,26 @@ namespace Emby.Dlna.Eventing
|
||||||
public EventSubscriptionResponse RenewEventSubscription(string subscriptionId, string notificationType, string requestedTimeoutString, string callbackUrl)
|
public EventSubscriptionResponse RenewEventSubscription(string subscriptionId, string notificationType, string requestedTimeoutString, string callbackUrl)
|
||||||
{
|
{
|
||||||
var subscription = GetSubscription(subscriptionId, false);
|
var subscription = GetSubscription(subscriptionId, false);
|
||||||
|
if (subscription != null)
|
||||||
|
{
|
||||||
|
subscription.TimeoutSeconds = ParseTimeout(requestedTimeoutString) ?? 300;
|
||||||
|
int timeoutSeconds = subscription.TimeoutSeconds;
|
||||||
|
subscription.SubscriptionTime = DateTime.UtcNow;
|
||||||
|
|
||||||
subscription.TimeoutSeconds = ParseTimeout(requestedTimeoutString) ?? 300;
|
_logger.LogDebug(
|
||||||
int timeoutSeconds = subscription.TimeoutSeconds;
|
"Renewing event subscription for {0} with timeout of {1} to {2}",
|
||||||
subscription.SubscriptionTime = DateTime.UtcNow;
|
subscription.NotificationType,
|
||||||
|
timeoutSeconds,
|
||||||
|
subscription.CallbackUrl);
|
||||||
|
|
||||||
_logger.LogDebug(
|
return GetEventSubscriptionResponse(subscriptionId, requestedTimeoutString, timeoutSeconds);
|
||||||
"Renewing event subscription for {0} with timeout of {1} to {2}",
|
}
|
||||||
subscription.NotificationType,
|
|
||||||
timeoutSeconds,
|
|
||||||
subscription.CallbackUrl);
|
|
||||||
|
|
||||||
return GetEventSubscriptionResponse(subscriptionId, requestedTimeoutString, timeoutSeconds);
|
return new EventSubscriptionResponse
|
||||||
|
{
|
||||||
|
Content = string.Empty,
|
||||||
|
ContentType = "text/plain"
|
||||||
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
public EventSubscriptionResponse CreateEventSubscription(string notificationType, string requestedTimeoutString, string callbackUrl)
|
public EventSubscriptionResponse CreateEventSubscription(string notificationType, string requestedTimeoutString, string callbackUrl)
|
||||||
|
@ -150,6 +158,7 @@ namespace Emby.Dlna.Eventing
|
||||||
builder.Append("</" + key + ">");
|
builder.Append("</" + key + ">");
|
||||||
builder.Append("</e:property>");
|
builder.Append("</e:property>");
|
||||||
}
|
}
|
||||||
|
|
||||||
builder.Append("</e:propertyset>");
|
builder.Append("</e:propertyset>");
|
||||||
|
|
||||||
var options = new HttpRequestOptions
|
var options = new HttpRequestOptions
|
||||||
|
|
|
@ -7,10 +7,13 @@ namespace Emby.Dlna.Eventing
|
||||||
public class EventSubscription
|
public class EventSubscription
|
||||||
{
|
{
|
||||||
public string Id { get; set; }
|
public string Id { get; set; }
|
||||||
|
|
||||||
public string CallbackUrl { get; set; }
|
public string CallbackUrl { get; set; }
|
||||||
|
|
||||||
public string NotificationType { get; set; }
|
public string NotificationType { get; set; }
|
||||||
|
|
||||||
public DateTime SubscriptionTime { get; set; }
|
public DateTime SubscriptionTime { get; set; }
|
||||||
|
|
||||||
public int TimeoutSeconds { get; set; }
|
public int TimeoutSeconds { get; set; }
|
||||||
|
|
||||||
public long TriggerCount { get; set; }
|
public long TriggerCount { get; set; }
|
||||||
|
|
|
@ -320,6 +320,7 @@ namespace Emby.Dlna.Main
|
||||||
{
|
{
|
||||||
guid = text.GetMD5();
|
guid = text.GetMD5();
|
||||||
}
|
}
|
||||||
|
|
||||||
return guid.ToString("N", CultureInfo.InvariantCulture);
|
return guid.ToString("N", CultureInfo.InvariantCulture);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -388,6 +389,7 @@ namespace Emby.Dlna.Main
|
||||||
{
|
{
|
||||||
_logger.LogError(ex, "Error disposing PlayTo manager");
|
_logger.LogError(ex, "Error disposing PlayTo manager");
|
||||||
}
|
}
|
||||||
|
|
||||||
_manager = null;
|
_manager = null;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -37,6 +37,7 @@ namespace Emby.Dlna.PlayTo
|
||||||
RefreshVolumeIfNeeded().GetAwaiter().GetResult();
|
RefreshVolumeIfNeeded().GetAwaiter().GetResult();
|
||||||
return _volume;
|
return _volume;
|
||||||
}
|
}
|
||||||
|
|
||||||
set => _volume = value;
|
set => _volume = value;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -232,7 +233,7 @@ namespace Emby.Dlna.PlayTo
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Sets volume on a scale of 0-100
|
/// Sets volume on a scale of 0-100.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public async Task SetVolume(int value, CancellationToken cancellationToken)
|
public async Task SetVolume(int value, CancellationToken cancellationToken)
|
||||||
{
|
{
|
||||||
|
@ -494,6 +495,7 @@ namespace Emby.Dlna.PlayTo
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
RestartTimerInactive();
|
RestartTimerInactive();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -425,6 +425,7 @@ namespace Emby.Dlna.PlayTo
|
||||||
await _device.SetAvTransport(newItem.StreamUrl, GetDlnaHeaders(newItem), newItem.Didl, CancellationToken.None).ConfigureAwait(false);
|
await _device.SetAvTransport(newItem.StreamUrl, GetDlnaHeaders(newItem), newItem.Didl, CancellationToken.None).ConfigureAwait(false);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
await SeekAfterTransportChange(newPosition, CancellationToken.None).ConfigureAwait(false);
|
await SeekAfterTransportChange(newPosition, CancellationToken.None).ConfigureAwait(false);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -713,6 +714,7 @@ namespace Emby.Dlna.PlayTo
|
||||||
|
|
||||||
throw new ArgumentException("Volume argument cannot be null");
|
throw new ArgumentException("Volume argument cannot be null");
|
||||||
}
|
}
|
||||||
|
|
||||||
default:
|
default:
|
||||||
return Task.CompletedTask;
|
return Task.CompletedTask;
|
||||||
}
|
}
|
||||||
|
@ -798,12 +800,15 @@ namespace Emby.Dlna.PlayTo
|
||||||
public int? SubtitleStreamIndex { get; set; }
|
public int? SubtitleStreamIndex { get; set; }
|
||||||
|
|
||||||
public string DeviceProfileId { get; set; }
|
public string DeviceProfileId { get; set; }
|
||||||
|
|
||||||
public string DeviceId { get; set; }
|
public string DeviceId { get; set; }
|
||||||
|
|
||||||
public string MediaSourceId { get; set; }
|
public string MediaSourceId { get; set; }
|
||||||
|
|
||||||
public string LiveStreamId { get; set; }
|
public string LiveStreamId { get; set; }
|
||||||
|
|
||||||
public BaseItem Item { get; set; }
|
public BaseItem Item { get; set; }
|
||||||
|
|
||||||
private MediaSourceInfo MediaSource;
|
private MediaSourceInfo MediaSource;
|
||||||
|
|
||||||
private IMediaSourceManager _mediaSourceManager;
|
private IMediaSourceManager _mediaSourceManager;
|
||||||
|
|
|
@ -132,6 +132,7 @@ namespace Emby.Dlna.PlayTo
|
||||||
usn = usn.Substring(index);
|
usn = usn.Substring(index);
|
||||||
found = true;
|
found = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
index = usn.IndexOf("::", StringComparison.OrdinalIgnoreCase);
|
index = usn.IndexOf("::", StringComparison.OrdinalIgnoreCase);
|
||||||
if (index != -1)
|
if (index != -1)
|
||||||
{
|
{
|
||||||
|
|
|
@ -12,6 +12,7 @@ namespace Emby.Dlna.PlayTo
|
||||||
public class MediaChangedEventArgs : EventArgs
|
public class MediaChangedEventArgs : EventArgs
|
||||||
{
|
{
|
||||||
public uBaseObject OldMediaInfo { get; set; }
|
public uBaseObject OldMediaInfo { get; set; }
|
||||||
|
|
||||||
public uBaseObject NewMediaInfo { get; set; }
|
public uBaseObject NewMediaInfo { get; set; }
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -44,10 +44,12 @@ namespace Emby.Dlna.PlayTo
|
||||||
{
|
{
|
||||||
return MediaBrowser.Model.Entities.MediaType.Audio;
|
return MediaBrowser.Model.Entities.MediaType.Audio;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (classType.IndexOf(MediaBrowser.Model.Entities.MediaType.Video, StringComparison.Ordinal) != -1)
|
if (classType.IndexOf(MediaBrowser.Model.Entities.MediaType.Video, StringComparison.Ordinal) != -1)
|
||||||
{
|
{
|
||||||
return MediaBrowser.Model.Entities.MediaType.Video;
|
return MediaBrowser.Model.Entities.MediaType.Video;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (classType.IndexOf("image", StringComparison.Ordinal) != -1)
|
if (classType.IndexOf("image", StringComparison.Ordinal) != -1)
|
||||||
{
|
{
|
||||||
return MediaBrowser.Model.Entities.MediaType.Photo;
|
return MediaBrowser.Model.Entities.MediaType.Photo;
|
||||||
|
|
|
@ -134,6 +134,7 @@ namespace Emby.Dlna.Server
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
return c.ToString(CultureInfo.InvariantCulture);
|
return c.ToString(CultureInfo.InvariantCulture);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -157,18 +158,22 @@ namespace Emby.Dlna.Server
|
||||||
{
|
{
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (stringBuilder == null)
|
if (stringBuilder == null)
|
||||||
{
|
{
|
||||||
stringBuilder = new StringBuilder();
|
stringBuilder = new StringBuilder();
|
||||||
}
|
}
|
||||||
|
|
||||||
stringBuilder.Append(str, num, num2 - num);
|
stringBuilder.Append(str, num, num2 - num);
|
||||||
stringBuilder.Append(GetEscapeSequence(str[num2]));
|
stringBuilder.Append(GetEscapeSequence(str[num2]));
|
||||||
num = num2 + 1;
|
num = num2 + 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (stringBuilder == null)
|
if (stringBuilder == null)
|
||||||
{
|
{
|
||||||
return str;
|
return str;
|
||||||
}
|
}
|
||||||
|
|
||||||
stringBuilder.Append(str, num, length - num);
|
stringBuilder.Append(str, num, length - num);
|
||||||
return stringBuilder.ToString();
|
return stringBuilder.ToString();
|
||||||
}
|
}
|
||||||
|
|
|
@ -18,6 +18,7 @@ namespace Emby.Dlna.Service
|
||||||
private const string NS_SOAPENV = "http://schemas.xmlsoap.org/soap/envelope/";
|
private const string NS_SOAPENV = "http://schemas.xmlsoap.org/soap/envelope/";
|
||||||
|
|
||||||
protected IServerConfigurationManager Config { get; }
|
protected IServerConfigurationManager Config { get; }
|
||||||
|
|
||||||
protected ILogger Logger { get; }
|
protected ILogger Logger { get; }
|
||||||
|
|
||||||
protected BaseControlHandler(IServerConfigurationManager config, ILogger logger)
|
protected BaseControlHandler(IServerConfigurationManager config, ILogger logger)
|
||||||
|
@ -135,6 +136,7 @@ namespace Emby.Dlna.Service
|
||||||
|
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
default:
|
default:
|
||||||
{
|
{
|
||||||
await reader.SkipAsync().ConfigureAwait(false);
|
await reader.SkipAsync().ConfigureAwait(false);
|
||||||
|
@ -211,7 +213,9 @@ namespace Emby.Dlna.Service
|
||||||
private class ControlRequestInfo
|
private class ControlRequestInfo
|
||||||
{
|
{
|
||||||
public string LocalName { get; set; }
|
public string LocalName { get; set; }
|
||||||
|
|
||||||
public string NamespaceURI { get; set; }
|
public string NamespaceURI { get; set; }
|
||||||
|
|
||||||
public Dictionary<string, string> Headers { get; } = new Dictionary<string, string>(StringComparer.OrdinalIgnoreCase);
|
public Dictionary<string, string> Headers { get; } = new Dictionary<string, string>(StringComparer.OrdinalIgnoreCase);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -80,6 +80,7 @@ namespace Emby.Dlna.Service
|
||||||
{
|
{
|
||||||
builder.Append("<allowedValue>" + DescriptionXmlBuilder.Escape(allowedValue) + "</allowedValue>");
|
builder.Append("<allowedValue>" + DescriptionXmlBuilder.Escape(allowedValue) + "</allowedValue>");
|
||||||
}
|
}
|
||||||
|
|
||||||
builder.Append("</allowedValueList>");
|
builder.Append("</allowedValueList>");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -64,6 +64,7 @@ namespace Emby.Naming.AudioBook
|
||||||
{
|
{
|
||||||
result.ChapterNumber = int.Parse(matches[0].Groups[0].Value);
|
result.ChapterNumber = int.Parse(matches[0].Groups[0].Value);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (matches.Count > 1)
|
if (matches.Count > 1)
|
||||||
{
|
{
|
||||||
result.PartNumber = int.Parse(matches[matches.Count - 1].Groups[0].Value);
|
result.PartNumber = int.Parse(matches[matches.Count - 1].Groups[0].Value);
|
||||||
|
|
|
@ -5,17 +5,17 @@ namespace Emby.Naming.Common
|
||||||
public enum MediaType
|
public enum MediaType
|
||||||
{
|
{
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// The audio
|
/// The audio.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
Audio = 0,
|
Audio = 0,
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// The photo
|
/// The photo.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
Photo = 1,
|
Photo = 1,
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// The video
|
/// The video.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
Video = 2
|
Video = 2
|
||||||
}
|
}
|
||||||
|
|
|
@ -956,7 +956,7 @@ namespace Emby.Server.Implementations
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Notifies that the kernel that a change has been made that requires a restart
|
/// Notifies that the kernel that a change has been made that requires a restart.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public void NotifyPendingRestart()
|
public void NotifyPendingRestart()
|
||||||
{
|
{
|
||||||
|
|
|
@ -247,12 +247,12 @@ namespace Emby.Server.Implementations.Data
|
||||||
public enum SynchronousMode
|
public enum SynchronousMode
|
||||||
{
|
{
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// SQLite continues without syncing as soon as it has handed data off to the operating system
|
/// SQLite continues without syncing as soon as it has handed data off to the operating system.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
Off = 0,
|
Off = 0,
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// SQLite database engine will still sync at the most critical moments
|
/// SQLite database engine will still sync at the most critical moments.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
Normal = 1,
|
Normal = 1,
|
||||||
|
|
||||||
|
|
|
@ -59,7 +59,7 @@ namespace Emby.Server.Implementations.Data
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Opens the connection to the database
|
/// Opens the connection to the database.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
/// <returns>Task.</returns>
|
/// <returns>Task.</returns>
|
||||||
private void InitializeInternal()
|
private void InitializeInternal()
|
||||||
|
@ -77,7 +77,7 @@ namespace Emby.Server.Implementations.Data
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Save the display preferences associated with an item in the repo
|
/// Save the display preferences associated with an item in the repo.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
/// <param name="displayPreferences">The display preferences.</param>
|
/// <param name="displayPreferences">The display preferences.</param>
|
||||||
/// <param name="userId">The user id.</param>
|
/// <param name="userId">The user id.</param>
|
||||||
|
@ -122,7 +122,7 @@ namespace Emby.Server.Implementations.Data
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Save all display preferences associated with a user in the repo
|
/// Save all display preferences associated with a user in the repo.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
/// <param name="displayPreferences">The display preferences.</param>
|
/// <param name="displayPreferences">The display preferences.</param>
|
||||||
/// <param name="userId">The user id.</param>
|
/// <param name="userId">The user id.</param>
|
||||||
|
|
|
@ -102,7 +102,7 @@ namespace Emby.Server.Implementations.Data
|
||||||
protected override TempStoreMode TempStore => TempStoreMode.Memory;
|
protected override TempStoreMode TempStore => TempStoreMode.Memory;
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Opens the connection to the database
|
/// Opens the connection to the database.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public void Initialize(SqliteUserDataRepository userDataRepo, IUserManager userManager)
|
public void Initialize(SqliteUserDataRepository userDataRepo, IUserManager userManager)
|
||||||
{
|
{
|
||||||
|
@ -548,7 +548,7 @@ namespace Emby.Server.Implementations.Data
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Save a standard item in the repo
|
/// Save a standard item in the repo.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
/// <param name="item">The item.</param>
|
/// <param name="item">The item.</param>
|
||||||
/// <param name="cancellationToken">The cancellation token.</param>
|
/// <param name="cancellationToken">The cancellation token.</param>
|
||||||
|
@ -793,6 +793,7 @@ namespace Emby.Server.Implementations.Data
|
||||||
{
|
{
|
||||||
saveItemStatement.TryBindNull("@Width");
|
saveItemStatement.TryBindNull("@Width");
|
||||||
}
|
}
|
||||||
|
|
||||||
if (item.Height > 0)
|
if (item.Height > 0)
|
||||||
{
|
{
|
||||||
saveItemStatement.TryBind("@Height", item.Height);
|
saveItemStatement.TryBind("@Height", item.Height);
|
||||||
|
@ -932,6 +933,7 @@ namespace Emby.Server.Implementations.Data
|
||||||
{
|
{
|
||||||
saveItemStatement.TryBindNull("@SeriesName");
|
saveItemStatement.TryBindNull("@SeriesName");
|
||||||
}
|
}
|
||||||
|
|
||||||
if (string.IsNullOrWhiteSpace(userDataKey))
|
if (string.IsNullOrWhiteSpace(userDataKey))
|
||||||
{
|
{
|
||||||
saveItemStatement.TryBindNull("@UserDataKey");
|
saveItemStatement.TryBindNull("@UserDataKey");
|
||||||
|
@ -1007,6 +1009,7 @@ namespace Emby.Server.Implementations.Data
|
||||||
{
|
{
|
||||||
artists = string.Join("|", hasArtists.Artists);
|
artists = string.Join("|", hasArtists.Artists);
|
||||||
}
|
}
|
||||||
|
|
||||||
saveItemStatement.TryBind("@Artists", artists);
|
saveItemStatement.TryBind("@Artists", artists);
|
||||||
|
|
||||||
string albumArtists = null;
|
string albumArtists = null;
|
||||||
|
@ -1106,6 +1109,7 @@ namespace Emby.Server.Implementations.Data
|
||||||
{
|
{
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
|
||||||
str.Append(ToValueString(i) + "|");
|
str.Append(ToValueString(i) + "|");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1204,7 +1208,7 @@ namespace Emby.Server.Implementations.Data
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Internal retrieve from items or users table
|
/// Internal retrieve from items or users table.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
/// <param name="id">The id.</param>
|
/// <param name="id">The id.</param>
|
||||||
/// <returns>BaseItem.</returns>
|
/// <returns>BaseItem.</returns>
|
||||||
|
@ -1366,6 +1370,7 @@ namespace Emby.Server.Implementations.Data
|
||||||
hasStartDate.StartDate = reader[index].ReadDateTime();
|
hasStartDate.StartDate = reader[index].ReadDateTime();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
index++;
|
index++;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1373,12 +1378,14 @@ namespace Emby.Server.Implementations.Data
|
||||||
{
|
{
|
||||||
item.EndDate = reader[index].TryReadDateTime();
|
item.EndDate = reader[index].TryReadDateTime();
|
||||||
}
|
}
|
||||||
|
|
||||||
index++;
|
index++;
|
||||||
|
|
||||||
if (!reader.IsDBNull(index))
|
if (!reader.IsDBNull(index))
|
||||||
{
|
{
|
||||||
item.ChannelId = new Guid(reader.GetString(index));
|
item.ChannelId = new Guid(reader.GetString(index));
|
||||||
}
|
}
|
||||||
|
|
||||||
index++;
|
index++;
|
||||||
|
|
||||||
if (enableProgramAttributes)
|
if (enableProgramAttributes)
|
||||||
|
@ -1389,24 +1396,28 @@ namespace Emby.Server.Implementations.Data
|
||||||
{
|
{
|
||||||
hasProgramAttributes.IsMovie = reader.GetBoolean(index);
|
hasProgramAttributes.IsMovie = reader.GetBoolean(index);
|
||||||
}
|
}
|
||||||
|
|
||||||
index++;
|
index++;
|
||||||
|
|
||||||
if (!reader.IsDBNull(index))
|
if (!reader.IsDBNull(index))
|
||||||
{
|
{
|
||||||
hasProgramAttributes.IsSeries = reader.GetBoolean(index);
|
hasProgramAttributes.IsSeries = reader.GetBoolean(index);
|
||||||
}
|
}
|
||||||
|
|
||||||
index++;
|
index++;
|
||||||
|
|
||||||
if (!reader.IsDBNull(index))
|
if (!reader.IsDBNull(index))
|
||||||
{
|
{
|
||||||
hasProgramAttributes.EpisodeTitle = reader.GetString(index);
|
hasProgramAttributes.EpisodeTitle = reader.GetString(index);
|
||||||
}
|
}
|
||||||
|
|
||||||
index++;
|
index++;
|
||||||
|
|
||||||
if (!reader.IsDBNull(index))
|
if (!reader.IsDBNull(index))
|
||||||
{
|
{
|
||||||
hasProgramAttributes.IsRepeat = reader.GetBoolean(index);
|
hasProgramAttributes.IsRepeat = reader.GetBoolean(index);
|
||||||
}
|
}
|
||||||
|
|
||||||
index++;
|
index++;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
|
@ -1419,6 +1430,7 @@ namespace Emby.Server.Implementations.Data
|
||||||
{
|
{
|
||||||
item.CommunityRating = reader.GetFloat(index);
|
item.CommunityRating = reader.GetFloat(index);
|
||||||
}
|
}
|
||||||
|
|
||||||
index++;
|
index++;
|
||||||
|
|
||||||
if (HasField(query, ItemFields.CustomRating))
|
if (HasField(query, ItemFields.CustomRating))
|
||||||
|
@ -1427,6 +1439,7 @@ namespace Emby.Server.Implementations.Data
|
||||||
{
|
{
|
||||||
item.CustomRating = reader.GetString(index);
|
item.CustomRating = reader.GetString(index);
|
||||||
}
|
}
|
||||||
|
|
||||||
index++;
|
index++;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1434,6 +1447,7 @@ namespace Emby.Server.Implementations.Data
|
||||||
{
|
{
|
||||||
item.IndexNumber = reader.GetInt32(index);
|
item.IndexNumber = reader.GetInt32(index);
|
||||||
}
|
}
|
||||||
|
|
||||||
index++;
|
index++;
|
||||||
|
|
||||||
if (HasField(query, ItemFields.Settings))
|
if (HasField(query, ItemFields.Settings))
|
||||||
|
@ -1442,18 +1456,21 @@ namespace Emby.Server.Implementations.Data
|
||||||
{
|
{
|
||||||
item.IsLocked = reader.GetBoolean(index);
|
item.IsLocked = reader.GetBoolean(index);
|
||||||
}
|
}
|
||||||
|
|
||||||
index++;
|
index++;
|
||||||
|
|
||||||
if (!reader.IsDBNull(index))
|
if (!reader.IsDBNull(index))
|
||||||
{
|
{
|
||||||
item.PreferredMetadataLanguage = reader.GetString(index);
|
item.PreferredMetadataLanguage = reader.GetString(index);
|
||||||
}
|
}
|
||||||
|
|
||||||
index++;
|
index++;
|
||||||
|
|
||||||
if (!reader.IsDBNull(index))
|
if (!reader.IsDBNull(index))
|
||||||
{
|
{
|
||||||
item.PreferredMetadataCountryCode = reader.GetString(index);
|
item.PreferredMetadataCountryCode = reader.GetString(index);
|
||||||
}
|
}
|
||||||
|
|
||||||
index++;
|
index++;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1463,6 +1480,7 @@ namespace Emby.Server.Implementations.Data
|
||||||
{
|
{
|
||||||
item.Width = reader.GetInt32(index);
|
item.Width = reader.GetInt32(index);
|
||||||
}
|
}
|
||||||
|
|
||||||
index++;
|
index++;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1472,6 +1490,7 @@ namespace Emby.Server.Implementations.Data
|
||||||
{
|
{
|
||||||
item.Height = reader.GetInt32(index);
|
item.Height = reader.GetInt32(index);
|
||||||
}
|
}
|
||||||
|
|
||||||
index++;
|
index++;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1481,6 +1500,7 @@ namespace Emby.Server.Implementations.Data
|
||||||
{
|
{
|
||||||
item.DateLastRefreshed = reader[index].ReadDateTime();
|
item.DateLastRefreshed = reader[index].ReadDateTime();
|
||||||
}
|
}
|
||||||
|
|
||||||
index++;
|
index++;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1488,18 +1508,21 @@ namespace Emby.Server.Implementations.Data
|
||||||
{
|
{
|
||||||
item.Name = reader.GetString(index);
|
item.Name = reader.GetString(index);
|
||||||
}
|
}
|
||||||
|
|
||||||
index++;
|
index++;
|
||||||
|
|
||||||
if (!reader.IsDBNull(index))
|
if (!reader.IsDBNull(index))
|
||||||
{
|
{
|
||||||
item.Path = RestorePath(reader.GetString(index));
|
item.Path = RestorePath(reader.GetString(index));
|
||||||
}
|
}
|
||||||
|
|
||||||
index++;
|
index++;
|
||||||
|
|
||||||
if (!reader.IsDBNull(index))
|
if (!reader.IsDBNull(index))
|
||||||
{
|
{
|
||||||
item.PremiereDate = reader[index].TryReadDateTime();
|
item.PremiereDate = reader[index].TryReadDateTime();
|
||||||
}
|
}
|
||||||
|
|
||||||
index++;
|
index++;
|
||||||
|
|
||||||
if (HasField(query, ItemFields.Overview))
|
if (HasField(query, ItemFields.Overview))
|
||||||
|
@ -1508,6 +1531,7 @@ namespace Emby.Server.Implementations.Data
|
||||||
{
|
{
|
||||||
item.Overview = reader.GetString(index);
|
item.Overview = reader.GetString(index);
|
||||||
}
|
}
|
||||||
|
|
||||||
index++;
|
index++;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1515,18 +1539,21 @@ namespace Emby.Server.Implementations.Data
|
||||||
{
|
{
|
||||||
item.ParentIndexNumber = reader.GetInt32(index);
|
item.ParentIndexNumber = reader.GetInt32(index);
|
||||||
}
|
}
|
||||||
|
|
||||||
index++;
|
index++;
|
||||||
|
|
||||||
if (!reader.IsDBNull(index))
|
if (!reader.IsDBNull(index))
|
||||||
{
|
{
|
||||||
item.ProductionYear = reader.GetInt32(index);
|
item.ProductionYear = reader.GetInt32(index);
|
||||||
}
|
}
|
||||||
|
|
||||||
index++;
|
index++;
|
||||||
|
|
||||||
if (!reader.IsDBNull(index))
|
if (!reader.IsDBNull(index))
|
||||||
{
|
{
|
||||||
item.OfficialRating = reader.GetString(index);
|
item.OfficialRating = reader.GetString(index);
|
||||||
}
|
}
|
||||||
|
|
||||||
index++;
|
index++;
|
||||||
|
|
||||||
if (HasField(query, ItemFields.SortName))
|
if (HasField(query, ItemFields.SortName))
|
||||||
|
@ -1535,6 +1562,7 @@ namespace Emby.Server.Implementations.Data
|
||||||
{
|
{
|
||||||
item.ForcedSortName = reader.GetString(index);
|
item.ForcedSortName = reader.GetString(index);
|
||||||
}
|
}
|
||||||
|
|
||||||
index++;
|
index++;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1542,12 +1570,14 @@ namespace Emby.Server.Implementations.Data
|
||||||
{
|
{
|
||||||
item.RunTimeTicks = reader.GetInt64(index);
|
item.RunTimeTicks = reader.GetInt64(index);
|
||||||
}
|
}
|
||||||
|
|
||||||
index++;
|
index++;
|
||||||
|
|
||||||
if (!reader.IsDBNull(index))
|
if (!reader.IsDBNull(index))
|
||||||
{
|
{
|
||||||
item.Size = reader.GetInt64(index);
|
item.Size = reader.GetInt64(index);
|
||||||
}
|
}
|
||||||
|
|
||||||
index++;
|
index++;
|
||||||
|
|
||||||
if (HasField(query, ItemFields.DateCreated))
|
if (HasField(query, ItemFields.DateCreated))
|
||||||
|
@ -1556,6 +1586,7 @@ namespace Emby.Server.Implementations.Data
|
||||||
{
|
{
|
||||||
item.DateCreated = reader[index].ReadDateTime();
|
item.DateCreated = reader[index].ReadDateTime();
|
||||||
}
|
}
|
||||||
|
|
||||||
index++;
|
index++;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1563,6 +1594,7 @@ namespace Emby.Server.Implementations.Data
|
||||||
{
|
{
|
||||||
item.DateModified = reader[index].ReadDateTime();
|
item.DateModified = reader[index].ReadDateTime();
|
||||||
}
|
}
|
||||||
|
|
||||||
index++;
|
index++;
|
||||||
|
|
||||||
item.Id = reader.GetGuid(index);
|
item.Id = reader.GetGuid(index);
|
||||||
|
@ -1574,6 +1606,7 @@ namespace Emby.Server.Implementations.Data
|
||||||
{
|
{
|
||||||
item.Genres = reader.GetString(index).Split(new[] { '|' }, StringSplitOptions.RemoveEmptyEntries);
|
item.Genres = reader.GetString(index).Split(new[] { '|' }, StringSplitOptions.RemoveEmptyEntries);
|
||||||
}
|
}
|
||||||
|
|
||||||
index++;
|
index++;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1581,6 +1614,7 @@ namespace Emby.Server.Implementations.Data
|
||||||
{
|
{
|
||||||
item.ParentId = reader.GetGuid(index);
|
item.ParentId = reader.GetGuid(index);
|
||||||
}
|
}
|
||||||
|
|
||||||
index++;
|
index++;
|
||||||
|
|
||||||
if (!reader.IsDBNull(index))
|
if (!reader.IsDBNull(index))
|
||||||
|
@ -1590,6 +1624,7 @@ namespace Emby.Server.Implementations.Data
|
||||||
item.Audio = audio;
|
item.Audio = audio;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
index++;
|
index++;
|
||||||
|
|
||||||
// TODO: Even if not needed by apps, the server needs it internally
|
// TODO: Even if not needed by apps, the server needs it internally
|
||||||
|
@ -1603,6 +1638,7 @@ namespace Emby.Server.Implementations.Data
|
||||||
liveTvChannel.ServiceName = reader.GetString(index);
|
liveTvChannel.ServiceName = reader.GetString(index);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
index++;
|
index++;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1610,6 +1646,7 @@ namespace Emby.Server.Implementations.Data
|
||||||
{
|
{
|
||||||
item.IsInMixedFolder = reader.GetBoolean(index);
|
item.IsInMixedFolder = reader.GetBoolean(index);
|
||||||
}
|
}
|
||||||
|
|
||||||
index++;
|
index++;
|
||||||
|
|
||||||
if (HasField(query, ItemFields.DateLastSaved))
|
if (HasField(query, ItemFields.DateLastSaved))
|
||||||
|
@ -1618,6 +1655,7 @@ namespace Emby.Server.Implementations.Data
|
||||||
{
|
{
|
||||||
item.DateLastSaved = reader[index].ReadDateTime();
|
item.DateLastSaved = reader[index].ReadDateTime();
|
||||||
}
|
}
|
||||||
|
|
||||||
index++;
|
index++;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1635,8 +1673,10 @@ namespace Emby.Server.Implementations.Data
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
item.LockedFields = GetLockedFields(reader.GetString(index)).ToArray();
|
item.LockedFields = GetLockedFields(reader.GetString(index)).ToArray();
|
||||||
}
|
}
|
||||||
|
|
||||||
index++;
|
index++;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1646,6 +1686,7 @@ namespace Emby.Server.Implementations.Data
|
||||||
{
|
{
|
||||||
item.Studios = reader.GetString(index).Split(new[] { '|' }, StringSplitOptions.RemoveEmptyEntries);
|
item.Studios = reader.GetString(index).Split(new[] { '|' }, StringSplitOptions.RemoveEmptyEntries);
|
||||||
}
|
}
|
||||||
|
|
||||||
index++;
|
index++;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1655,6 +1696,7 @@ namespace Emby.Server.Implementations.Data
|
||||||
{
|
{
|
||||||
item.Tags = reader.GetString(index).Split(new[] { '|' }, StringSplitOptions.RemoveEmptyEntries);
|
item.Tags = reader.GetString(index).Split(new[] { '|' }, StringSplitOptions.RemoveEmptyEntries);
|
||||||
}
|
}
|
||||||
|
|
||||||
index++;
|
index++;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1674,9 +1716,11 @@ namespace Emby.Server.Implementations.Data
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
trailer.TrailerTypes = GetTrailerTypes(reader.GetString(index)).ToArray();
|
trailer.TrailerTypes = GetTrailerTypes(reader.GetString(index)).ToArray();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
index++;
|
index++;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1686,6 +1730,7 @@ namespace Emby.Server.Implementations.Data
|
||||||
{
|
{
|
||||||
item.OriginalTitle = reader.GetString(index);
|
item.OriginalTitle = reader.GetString(index);
|
||||||
}
|
}
|
||||||
|
|
||||||
index++;
|
index++;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1696,6 +1741,7 @@ namespace Emby.Server.Implementations.Data
|
||||||
video.PrimaryVersionId = reader.GetString(index);
|
video.PrimaryVersionId = reader.GetString(index);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
index++;
|
index++;
|
||||||
|
|
||||||
if (HasField(query, ItemFields.DateLastMediaAdded))
|
if (HasField(query, ItemFields.DateLastMediaAdded))
|
||||||
|
@ -1704,6 +1750,7 @@ namespace Emby.Server.Implementations.Data
|
||||||
{
|
{
|
||||||
folder.DateLastMediaAdded = reader[index].TryReadDateTime();
|
folder.DateLastMediaAdded = reader[index].TryReadDateTime();
|
||||||
}
|
}
|
||||||
|
|
||||||
index++;
|
index++;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1711,18 +1758,21 @@ namespace Emby.Server.Implementations.Data
|
||||||
{
|
{
|
||||||
item.Album = reader.GetString(index);
|
item.Album = reader.GetString(index);
|
||||||
}
|
}
|
||||||
|
|
||||||
index++;
|
index++;
|
||||||
|
|
||||||
if (!reader.IsDBNull(index))
|
if (!reader.IsDBNull(index))
|
||||||
{
|
{
|
||||||
item.CriticRating = reader.GetFloat(index);
|
item.CriticRating = reader.GetFloat(index);
|
||||||
}
|
}
|
||||||
|
|
||||||
index++;
|
index++;
|
||||||
|
|
||||||
if (!reader.IsDBNull(index))
|
if (!reader.IsDBNull(index))
|
||||||
{
|
{
|
||||||
item.IsVirtualItem = reader.GetBoolean(index);
|
item.IsVirtualItem = reader.GetBoolean(index);
|
||||||
}
|
}
|
||||||
|
|
||||||
index++;
|
index++;
|
||||||
|
|
||||||
if (item is IHasSeries hasSeriesName)
|
if (item is IHasSeries hasSeriesName)
|
||||||
|
@ -1732,6 +1782,7 @@ namespace Emby.Server.Implementations.Data
|
||||||
hasSeriesName.SeriesName = reader.GetString(index);
|
hasSeriesName.SeriesName = reader.GetString(index);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
index++;
|
index++;
|
||||||
|
|
||||||
if (hasEpisodeAttributes)
|
if (hasEpisodeAttributes)
|
||||||
|
@ -1742,6 +1793,7 @@ namespace Emby.Server.Implementations.Data
|
||||||
{
|
{
|
||||||
episode.SeasonName = reader.GetString(index);
|
episode.SeasonName = reader.GetString(index);
|
||||||
}
|
}
|
||||||
|
|
||||||
index++;
|
index++;
|
||||||
if (!reader.IsDBNull(index))
|
if (!reader.IsDBNull(index))
|
||||||
{
|
{
|
||||||
|
@ -1752,6 +1804,7 @@ namespace Emby.Server.Implementations.Data
|
||||||
{
|
{
|
||||||
index++;
|
index++;
|
||||||
}
|
}
|
||||||
|
|
||||||
index++;
|
index++;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1765,6 +1818,7 @@ namespace Emby.Server.Implementations.Data
|
||||||
hasSeries.SeriesId = reader.GetGuid(index);
|
hasSeries.SeriesId = reader.GetGuid(index);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
index++;
|
index++;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1774,6 +1828,7 @@ namespace Emby.Server.Implementations.Data
|
||||||
{
|
{
|
||||||
item.PresentationUniqueKey = reader.GetString(index);
|
item.PresentationUniqueKey = reader.GetString(index);
|
||||||
}
|
}
|
||||||
|
|
||||||
index++;
|
index++;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1783,6 +1838,7 @@ namespace Emby.Server.Implementations.Data
|
||||||
{
|
{
|
||||||
item.InheritedParentalRatingValue = reader.GetInt32(index);
|
item.InheritedParentalRatingValue = reader.GetInt32(index);
|
||||||
}
|
}
|
||||||
|
|
||||||
index++;
|
index++;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1792,6 +1848,7 @@ namespace Emby.Server.Implementations.Data
|
||||||
{
|
{
|
||||||
item.ExternalSeriesId = reader.GetString(index);
|
item.ExternalSeriesId = reader.GetString(index);
|
||||||
}
|
}
|
||||||
|
|
||||||
index++;
|
index++;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1801,6 +1858,7 @@ namespace Emby.Server.Implementations.Data
|
||||||
{
|
{
|
||||||
item.Tagline = reader.GetString(index);
|
item.Tagline = reader.GetString(index);
|
||||||
}
|
}
|
||||||
|
|
||||||
index++;
|
index++;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1808,6 +1866,7 @@ namespace Emby.Server.Implementations.Data
|
||||||
{
|
{
|
||||||
DeserializeProviderIds(reader.GetString(index), item);
|
DeserializeProviderIds(reader.GetString(index), item);
|
||||||
}
|
}
|
||||||
|
|
||||||
index++;
|
index++;
|
||||||
|
|
||||||
if (query.DtoOptions.EnableImages)
|
if (query.DtoOptions.EnableImages)
|
||||||
|
@ -1816,6 +1875,7 @@ namespace Emby.Server.Implementations.Data
|
||||||
{
|
{
|
||||||
DeserializeImages(reader.GetString(index), item);
|
DeserializeImages(reader.GetString(index), item);
|
||||||
}
|
}
|
||||||
|
|
||||||
index++;
|
index++;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1825,6 +1885,7 @@ namespace Emby.Server.Implementations.Data
|
||||||
{
|
{
|
||||||
item.ProductionLocations = reader.GetString(index).Split(new[] { '|' }, StringSplitOptions.RemoveEmptyEntries).ToArray();
|
item.ProductionLocations = reader.GetString(index).Split(new[] { '|' }, StringSplitOptions.RemoveEmptyEntries).ToArray();
|
||||||
}
|
}
|
||||||
|
|
||||||
index++;
|
index++;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1834,6 +1895,7 @@ namespace Emby.Server.Implementations.Data
|
||||||
{
|
{
|
||||||
item.ExtraIds = SplitToGuids(reader.GetString(index));
|
item.ExtraIds = SplitToGuids(reader.GetString(index));
|
||||||
}
|
}
|
||||||
|
|
||||||
index++;
|
index++;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1841,6 +1903,7 @@ namespace Emby.Server.Implementations.Data
|
||||||
{
|
{
|
||||||
item.TotalBitrate = reader.GetInt32(index);
|
item.TotalBitrate = reader.GetInt32(index);
|
||||||
}
|
}
|
||||||
|
|
||||||
index++;
|
index++;
|
||||||
|
|
||||||
if (!reader.IsDBNull(index))
|
if (!reader.IsDBNull(index))
|
||||||
|
@ -1850,6 +1913,7 @@ namespace Emby.Server.Implementations.Data
|
||||||
item.ExtraType = extraType;
|
item.ExtraType = extraType;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
index++;
|
index++;
|
||||||
|
|
||||||
if (hasArtistFields)
|
if (hasArtistFields)
|
||||||
|
@ -1858,12 +1922,14 @@ namespace Emby.Server.Implementations.Data
|
||||||
{
|
{
|
||||||
hasArtists.Artists = reader.GetString(index).Split(new[] { '|' }, StringSplitOptions.RemoveEmptyEntries);
|
hasArtists.Artists = reader.GetString(index).Split(new[] { '|' }, StringSplitOptions.RemoveEmptyEntries);
|
||||||
}
|
}
|
||||||
|
|
||||||
index++;
|
index++;
|
||||||
|
|
||||||
if (item is IHasAlbumArtist hasAlbumArtists && !reader.IsDBNull(index))
|
if (item is IHasAlbumArtist hasAlbumArtists && !reader.IsDBNull(index))
|
||||||
{
|
{
|
||||||
hasAlbumArtists.AlbumArtists = reader.GetString(index).Split(new[] { '|' }, StringSplitOptions.RemoveEmptyEntries);
|
hasAlbumArtists.AlbumArtists = reader.GetString(index).Split(new[] { '|' }, StringSplitOptions.RemoveEmptyEntries);
|
||||||
}
|
}
|
||||||
|
|
||||||
index++;
|
index++;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1871,6 +1937,7 @@ namespace Emby.Server.Implementations.Data
|
||||||
{
|
{
|
||||||
item.ExternalId = reader.GetString(index);
|
item.ExternalId = reader.GetString(index);
|
||||||
}
|
}
|
||||||
|
|
||||||
index++;
|
index++;
|
||||||
|
|
||||||
if (HasField(query, ItemFields.SeriesPresentationUniqueKey))
|
if (HasField(query, ItemFields.SeriesPresentationUniqueKey))
|
||||||
|
@ -1882,6 +1949,7 @@ namespace Emby.Server.Implementations.Data
|
||||||
hasSeries.SeriesPresentationUniqueKey = reader.GetString(index);
|
hasSeries.SeriesPresentationUniqueKey = reader.GetString(index);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
index++;
|
index++;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1891,6 +1959,7 @@ namespace Emby.Server.Implementations.Data
|
||||||
{
|
{
|
||||||
program.ShowId = reader.GetString(index);
|
program.ShowId = reader.GetString(index);
|
||||||
}
|
}
|
||||||
|
|
||||||
index++;
|
index++;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1898,6 +1967,7 @@ namespace Emby.Server.Implementations.Data
|
||||||
{
|
{
|
||||||
item.OwnerId = reader.GetGuid(index);
|
item.OwnerId = reader.GetGuid(index);
|
||||||
}
|
}
|
||||||
|
|
||||||
index++;
|
index++;
|
||||||
|
|
||||||
return item;
|
return item;
|
||||||
|
@ -1918,7 +1988,7 @@ namespace Emby.Server.Implementations.Data
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Gets chapters for an item
|
/// Gets chapters for an item.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
/// <param name="item">The item.</param>
|
/// <param name="item">The item.</param>
|
||||||
/// <returns>IEnumerable{ChapterInfo}.</returns>
|
/// <returns>IEnumerable{ChapterInfo}.</returns>
|
||||||
|
@ -1946,7 +2016,7 @@ namespace Emby.Server.Implementations.Data
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Gets a single chapter for an item
|
/// Gets a single chapter for an item.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
/// <param name="item">The item.</param>
|
/// <param name="item">The item.</param>
|
||||||
/// <param name="index">The index.</param>
|
/// <param name="index">The index.</param>
|
||||||
|
@ -2473,6 +2543,7 @@ namespace Emby.Server.Implementations.Data
|
||||||
{
|
{
|
||||||
statement.TryBind("@SearchTermStartsWith", searchTerm + "%");
|
statement.TryBind("@SearchTermStartsWith", searchTerm + "%");
|
||||||
}
|
}
|
||||||
|
|
||||||
if (commandText.IndexOf("@SearchTermContains", StringComparison.OrdinalIgnoreCase) != -1)
|
if (commandText.IndexOf("@SearchTermContains", StringComparison.OrdinalIgnoreCase) != -1)
|
||||||
{
|
{
|
||||||
statement.TryBind("@SearchTermContains", "%" + searchTerm + "%");
|
statement.TryBind("@SearchTermContains", "%" + searchTerm + "%");
|
||||||
|
@ -2743,6 +2814,7 @@ namespace Emby.Server.Implementations.Data
|
||||||
{
|
{
|
||||||
items[i] = newItem;
|
items[i] = newItem;
|
||||||
}
|
}
|
||||||
|
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -2835,6 +2907,7 @@ namespace Emby.Server.Implementations.Data
|
||||||
{
|
{
|
||||||
statementTexts.Add(commandText);
|
statementTexts.Add(commandText);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (query.EnableTotalRecordCount)
|
if (query.EnableTotalRecordCount)
|
||||||
{
|
{
|
||||||
commandText = string.Empty;
|
commandText = string.Empty;
|
||||||
|
@ -3239,6 +3312,7 @@ namespace Emby.Server.Implementations.Data
|
||||||
{
|
{
|
||||||
statementTexts.Add(commandText);
|
statementTexts.Add(commandText);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (query.EnableTotalRecordCount)
|
if (query.EnableTotalRecordCount)
|
||||||
{
|
{
|
||||||
commandText = string.Empty;
|
commandText = string.Empty;
|
||||||
|
@ -3592,11 +3666,13 @@ namespace Emby.Server.Implementations.Data
|
||||||
whereClauses.Add("IndexNumber=@IndexNumber");
|
whereClauses.Add("IndexNumber=@IndexNumber");
|
||||||
statement?.TryBind("@IndexNumber", query.IndexNumber.Value);
|
statement?.TryBind("@IndexNumber", query.IndexNumber.Value);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (query.ParentIndexNumber.HasValue)
|
if (query.ParentIndexNumber.HasValue)
|
||||||
{
|
{
|
||||||
whereClauses.Add("ParentIndexNumber=@ParentIndexNumber");
|
whereClauses.Add("ParentIndexNumber=@ParentIndexNumber");
|
||||||
statement?.TryBind("@ParentIndexNumber", query.ParentIndexNumber.Value);
|
statement?.TryBind("@ParentIndexNumber", query.ParentIndexNumber.Value);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (query.ParentIndexNumberNotEquals.HasValue)
|
if (query.ParentIndexNumberNotEquals.HasValue)
|
||||||
{
|
{
|
||||||
whereClauses.Add("(ParentIndexNumber<>@ParentIndexNumberNotEquals or ParentIndexNumber is null)");
|
whereClauses.Add("(ParentIndexNumber<>@ParentIndexNumberNotEquals or ParentIndexNumber is null)");
|
||||||
|
@ -3882,6 +3958,7 @@ namespace Emby.Server.Implementations.Data
|
||||||
{
|
{
|
||||||
statement.TryBind(paramName, artistId.ToByteArray());
|
statement.TryBind(paramName, artistId.ToByteArray());
|
||||||
}
|
}
|
||||||
|
|
||||||
index++;
|
index++;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -3902,6 +3979,7 @@ namespace Emby.Server.Implementations.Data
|
||||||
{
|
{
|
||||||
statement.TryBind(paramName, artistId.ToByteArray());
|
statement.TryBind(paramName, artistId.ToByteArray());
|
||||||
}
|
}
|
||||||
|
|
||||||
index++;
|
index++;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -3922,8 +4000,10 @@ namespace Emby.Server.Implementations.Data
|
||||||
{
|
{
|
||||||
statement.TryBind(paramName, artistId.ToByteArray());
|
statement.TryBind(paramName, artistId.ToByteArray());
|
||||||
}
|
}
|
||||||
|
|
||||||
index++;
|
index++;
|
||||||
}
|
}
|
||||||
|
|
||||||
var clause = "(" + string.Join(" OR ", clauses) + ")";
|
var clause = "(" + string.Join(" OR ", clauses) + ")";
|
||||||
whereClauses.Add(clause);
|
whereClauses.Add(clause);
|
||||||
}
|
}
|
||||||
|
@ -3941,8 +4021,10 @@ namespace Emby.Server.Implementations.Data
|
||||||
{
|
{
|
||||||
statement.TryBind(paramName, albumId.ToByteArray());
|
statement.TryBind(paramName, albumId.ToByteArray());
|
||||||
}
|
}
|
||||||
|
|
||||||
index++;
|
index++;
|
||||||
}
|
}
|
||||||
|
|
||||||
var clause = "(" + string.Join(" OR ", clauses) + ")";
|
var clause = "(" + string.Join(" OR ", clauses) + ")";
|
||||||
whereClauses.Add(clause);
|
whereClauses.Add(clause);
|
||||||
}
|
}
|
||||||
|
@ -3960,8 +4042,10 @@ namespace Emby.Server.Implementations.Data
|
||||||
{
|
{
|
||||||
statement.TryBind(paramName, artistId.ToByteArray());
|
statement.TryBind(paramName, artistId.ToByteArray());
|
||||||
}
|
}
|
||||||
|
|
||||||
index++;
|
index++;
|
||||||
}
|
}
|
||||||
|
|
||||||
var clause = "(" + string.Join(" OR ", clauses) + ")";
|
var clause = "(" + string.Join(" OR ", clauses) + ")";
|
||||||
whereClauses.Add(clause);
|
whereClauses.Add(clause);
|
||||||
}
|
}
|
||||||
|
@ -3979,8 +4063,10 @@ namespace Emby.Server.Implementations.Data
|
||||||
{
|
{
|
||||||
statement.TryBind(paramName, genreId.ToByteArray());
|
statement.TryBind(paramName, genreId.ToByteArray());
|
||||||
}
|
}
|
||||||
|
|
||||||
index++;
|
index++;
|
||||||
}
|
}
|
||||||
|
|
||||||
var clause = "(" + string.Join(" OR ", clauses) + ")";
|
var clause = "(" + string.Join(" OR ", clauses) + ")";
|
||||||
whereClauses.Add(clause);
|
whereClauses.Add(clause);
|
||||||
}
|
}
|
||||||
|
@ -3996,8 +4082,10 @@ namespace Emby.Server.Implementations.Data
|
||||||
{
|
{
|
||||||
statement.TryBind("@Genre" + index, GetCleanValue(item));
|
statement.TryBind("@Genre" + index, GetCleanValue(item));
|
||||||
}
|
}
|
||||||
|
|
||||||
index++;
|
index++;
|
||||||
}
|
}
|
||||||
|
|
||||||
var clause = "(" + string.Join(" OR ", clauses) + ")";
|
var clause = "(" + string.Join(" OR ", clauses) + ")";
|
||||||
whereClauses.Add(clause);
|
whereClauses.Add(clause);
|
||||||
}
|
}
|
||||||
|
@ -4013,8 +4101,10 @@ namespace Emby.Server.Implementations.Data
|
||||||
{
|
{
|
||||||
statement.TryBind("@Tag" + index, GetCleanValue(item));
|
statement.TryBind("@Tag" + index, GetCleanValue(item));
|
||||||
}
|
}
|
||||||
|
|
||||||
index++;
|
index++;
|
||||||
}
|
}
|
||||||
|
|
||||||
var clause = "(" + string.Join(" OR ", clauses) + ")";
|
var clause = "(" + string.Join(" OR ", clauses) + ")";
|
||||||
whereClauses.Add(clause);
|
whereClauses.Add(clause);
|
||||||
}
|
}
|
||||||
|
@ -4030,8 +4120,10 @@ namespace Emby.Server.Implementations.Data
|
||||||
{
|
{
|
||||||
statement.TryBind("@ExcludeTag" + index, GetCleanValue(item));
|
statement.TryBind("@ExcludeTag" + index, GetCleanValue(item));
|
||||||
}
|
}
|
||||||
|
|
||||||
index++;
|
index++;
|
||||||
}
|
}
|
||||||
|
|
||||||
var clause = "(" + string.Join(" OR ", clauses) + ")";
|
var clause = "(" + string.Join(" OR ", clauses) + ")";
|
||||||
whereClauses.Add(clause);
|
whereClauses.Add(clause);
|
||||||
}
|
}
|
||||||
|
@ -4050,8 +4142,10 @@ namespace Emby.Server.Implementations.Data
|
||||||
{
|
{
|
||||||
statement.TryBind(paramName, studioId.ToByteArray());
|
statement.TryBind(paramName, studioId.ToByteArray());
|
||||||
}
|
}
|
||||||
|
|
||||||
index++;
|
index++;
|
||||||
}
|
}
|
||||||
|
|
||||||
var clause = "(" + string.Join(" OR ", clauses) + ")";
|
var clause = "(" + string.Join(" OR ", clauses) + ")";
|
||||||
whereClauses.Add(clause);
|
whereClauses.Add(clause);
|
||||||
}
|
}
|
||||||
|
@ -4067,8 +4161,10 @@ namespace Emby.Server.Implementations.Data
|
||||||
{
|
{
|
||||||
statement.TryBind("@OfficialRating" + index, item);
|
statement.TryBind("@OfficialRating" + index, item);
|
||||||
}
|
}
|
||||||
|
|
||||||
index++;
|
index++;
|
||||||
}
|
}
|
||||||
|
|
||||||
var clause = "(" + string.Join(" OR ", clauses) + ")";
|
var clause = "(" + string.Join(" OR ", clauses) + ")";
|
||||||
whereClauses.Add(clause);
|
whereClauses.Add(clause);
|
||||||
}
|
}
|
||||||
|
@ -4243,6 +4339,7 @@ namespace Emby.Server.Implementations.Data
|
||||||
statement.TryBind("@IsVirtualItem", isVirtualItem.Value);
|
statement.TryBind("@IsVirtualItem", isVirtualItem.Value);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (query.IsSpecialSeason.HasValue)
|
if (query.IsSpecialSeason.HasValue)
|
||||||
{
|
{
|
||||||
if (query.IsSpecialSeason.Value)
|
if (query.IsSpecialSeason.Value)
|
||||||
|
@ -4254,6 +4351,7 @@ namespace Emby.Server.Implementations.Data
|
||||||
whereClauses.Add("IndexNumber <> 0");
|
whereClauses.Add("IndexNumber <> 0");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (query.IsUnaired.HasValue)
|
if (query.IsUnaired.HasValue)
|
||||||
{
|
{
|
||||||
if (query.IsUnaired.Value)
|
if (query.IsUnaired.Value)
|
||||||
|
@ -4265,6 +4363,7 @@ namespace Emby.Server.Implementations.Data
|
||||||
whereClauses.Add("PremiereDate < DATETIME('now')");
|
whereClauses.Add("PremiereDate < DATETIME('now')");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
var queryMediaTypes = query.MediaTypes.Where(IsValidMediaType).ToArray();
|
var queryMediaTypes = query.MediaTypes.Where(IsValidMediaType).ToArray();
|
||||||
if (queryMediaTypes.Length == 1)
|
if (queryMediaTypes.Length == 1)
|
||||||
{
|
{
|
||||||
|
@ -4280,6 +4379,7 @@ namespace Emby.Server.Implementations.Data
|
||||||
|
|
||||||
whereClauses.Add("MediaType in (" + val + ")");
|
whereClauses.Add("MediaType in (" + val + ")");
|
||||||
}
|
}
|
||||||
|
|
||||||
if (query.ItemIds.Length > 0)
|
if (query.ItemIds.Length > 0)
|
||||||
{
|
{
|
||||||
var includeIds = new List<string>();
|
var includeIds = new List<string>();
|
||||||
|
@ -4292,11 +4392,13 @@ namespace Emby.Server.Implementations.Data
|
||||||
{
|
{
|
||||||
statement.TryBind("@IncludeId" + index, id);
|
statement.TryBind("@IncludeId" + index, id);
|
||||||
}
|
}
|
||||||
|
|
||||||
index++;
|
index++;
|
||||||
}
|
}
|
||||||
|
|
||||||
whereClauses.Add("(" + string.Join(" OR ", includeIds) + ")");
|
whereClauses.Add("(" + string.Join(" OR ", includeIds) + ")");
|
||||||
}
|
}
|
||||||
|
|
||||||
if (query.ExcludeItemIds.Length > 0)
|
if (query.ExcludeItemIds.Length > 0)
|
||||||
{
|
{
|
||||||
var excludeIds = new List<string>();
|
var excludeIds = new List<string>();
|
||||||
|
@ -4309,6 +4411,7 @@ namespace Emby.Server.Implementations.Data
|
||||||
{
|
{
|
||||||
statement.TryBind("@ExcludeId" + index, id);
|
statement.TryBind("@ExcludeId" + index, id);
|
||||||
}
|
}
|
||||||
|
|
||||||
index++;
|
index++;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -4333,6 +4436,7 @@ namespace Emby.Server.Implementations.Data
|
||||||
{
|
{
|
||||||
statement.TryBind(paramName, "%" + pair.Key + "=" + pair.Value + "%");
|
statement.TryBind(paramName, "%" + pair.Key + "=" + pair.Value + "%");
|
||||||
}
|
}
|
||||||
|
|
||||||
index++;
|
index++;
|
||||||
|
|
||||||
break;
|
break;
|
||||||
|
@ -4375,6 +4479,7 @@ namespace Emby.Server.Implementations.Data
|
||||||
{
|
{
|
||||||
statement.TryBind(paramName, "%" + pair.Key + "=" + pair.Value + "%");
|
statement.TryBind(paramName, "%" + pair.Key + "=" + pair.Value + "%");
|
||||||
}
|
}
|
||||||
|
|
||||||
index++;
|
index++;
|
||||||
|
|
||||||
break;
|
break;
|
||||||
|
@ -4425,6 +4530,7 @@ namespace Emby.Server.Implementations.Data
|
||||||
{
|
{
|
||||||
whereClauses.Add("(TopParentId=@TopParentId)");
|
whereClauses.Add("(TopParentId=@TopParentId)");
|
||||||
}
|
}
|
||||||
|
|
||||||
if (statement != null)
|
if (statement != null)
|
||||||
{
|
{
|
||||||
statement.TryBind("@TopParentId", queryTopParentIds[0].ToString("N", CultureInfo.InvariantCulture));
|
statement.TryBind("@TopParentId", queryTopParentIds[0].ToString("N", CultureInfo.InvariantCulture));
|
||||||
|
@ -4462,11 +4568,13 @@ namespace Emby.Server.Implementations.Data
|
||||||
statement.TryBind("@AncestorId", query.AncestorIds[0]);
|
statement.TryBind("@AncestorId", query.AncestorIds[0]);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (query.AncestorIds.Length > 1)
|
if (query.AncestorIds.Length > 1)
|
||||||
{
|
{
|
||||||
var inClause = string.Join(",", query.AncestorIds.Select(i => "'" + i.ToString("N", CultureInfo.InvariantCulture) + "'"));
|
var inClause = string.Join(",", query.AncestorIds.Select(i => "'" + i.ToString("N", CultureInfo.InvariantCulture) + "'"));
|
||||||
whereClauses.Add(string.Format("Guid in (select itemId from AncestorIds where AncestorIdText in ({0}))", inClause));
|
whereClauses.Add(string.Format("Guid in (select itemId from AncestorIds where AncestorIdText in ({0}))", inClause));
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!string.IsNullOrWhiteSpace(query.AncestorWithPresentationUniqueKey))
|
if (!string.IsNullOrWhiteSpace(query.AncestorWithPresentationUniqueKey))
|
||||||
{
|
{
|
||||||
var inClause = "select guid from TypedBaseItems where PresentationUniqueKey=@AncestorWithPresentationUniqueKey";
|
var inClause = "select guid from TypedBaseItems where PresentationUniqueKey=@AncestorWithPresentationUniqueKey";
|
||||||
|
@ -4495,6 +4603,7 @@ namespace Emby.Server.Implementations.Data
|
||||||
statement.TryBind("@UnratedType", query.BlockUnratedItems[0].ToString());
|
statement.TryBind("@UnratedType", query.BlockUnratedItems[0].ToString());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (query.BlockUnratedItems.Length > 1)
|
if (query.BlockUnratedItems.Length > 1)
|
||||||
{
|
{
|
||||||
var inClause = string.Join(",", query.BlockUnratedItems.Select(i => "'" + i.ToString() + "'"));
|
var inClause = string.Join(",", query.BlockUnratedItems.Select(i => "'" + i.ToString() + "'"));
|
||||||
|
@ -4969,6 +5078,7 @@ where AncestorIdText not null and ItemValues.Value not null and ItemValues.Type
|
||||||
statement.TryBind("@ItemId", query.ItemId.ToByteArray());
|
statement.TryBind("@ItemId", query.ItemId.ToByteArray());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!query.AppearsInItemId.Equals(Guid.Empty))
|
if (!query.AppearsInItemId.Equals(Guid.Empty))
|
||||||
{
|
{
|
||||||
whereClauses.Add("Name in (Select Name from People where ItemId=@AppearsInItemId)");
|
whereClauses.Add("Name in (Select Name from People where ItemId=@AppearsInItemId)");
|
||||||
|
@ -4977,6 +5087,7 @@ where AncestorIdText not null and ItemValues.Value not null and ItemValues.Type
|
||||||
statement.TryBind("@AppearsInItemId", query.AppearsInItemId.ToByteArray());
|
statement.TryBind("@AppearsInItemId", query.AppearsInItemId.ToByteArray());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
var queryPersonTypes = query.PersonTypes.Where(IsValidPersonType).ToList();
|
var queryPersonTypes = query.PersonTypes.Where(IsValidPersonType).ToList();
|
||||||
|
|
||||||
if (queryPersonTypes.Count == 1)
|
if (queryPersonTypes.Count == 1)
|
||||||
|
@ -4993,6 +5104,7 @@ where AncestorIdText not null and ItemValues.Value not null and ItemValues.Type
|
||||||
|
|
||||||
whereClauses.Add("PersonType in (" + val + ")");
|
whereClauses.Add("PersonType in (" + val + ")");
|
||||||
}
|
}
|
||||||
|
|
||||||
var queryExcludePersonTypes = query.ExcludePersonTypes.Where(IsValidPersonType).ToList();
|
var queryExcludePersonTypes = query.ExcludePersonTypes.Where(IsValidPersonType).ToList();
|
||||||
|
|
||||||
if (queryExcludePersonTypes.Count == 1)
|
if (queryExcludePersonTypes.Count == 1)
|
||||||
|
@ -5009,6 +5121,7 @@ where AncestorIdText not null and ItemValues.Value not null and ItemValues.Type
|
||||||
|
|
||||||
whereClauses.Add("PersonType not in (" + val + ")");
|
whereClauses.Add("PersonType not in (" + val + ")");
|
||||||
}
|
}
|
||||||
|
|
||||||
if (query.MaxListOrder.HasValue)
|
if (query.MaxListOrder.HasValue)
|
||||||
{
|
{
|
||||||
whereClauses.Add("ListOrder<=@MaxListOrder");
|
whereClauses.Add("ListOrder<=@MaxListOrder");
|
||||||
|
@ -5017,6 +5130,7 @@ where AncestorIdText not null and ItemValues.Value not null and ItemValues.Type
|
||||||
statement.TryBind("@MaxListOrder", query.MaxListOrder.Value);
|
statement.TryBind("@MaxListOrder", query.MaxListOrder.Value);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!string.IsNullOrWhiteSpace(query.NameContains))
|
if (!string.IsNullOrWhiteSpace(query.NameContains))
|
||||||
{
|
{
|
||||||
whereClauses.Add("Name like @NameContains");
|
whereClauses.Add("Name like @NameContains");
|
||||||
|
@ -5156,6 +5270,7 @@ where AncestorIdText not null and ItemValues.Value not null and ItemValues.Type
|
||||||
var typeString = string.Join(",", withItemTypes.Select(i => "'" + i + "'"));
|
var typeString = string.Join(",", withItemTypes.Select(i => "'" + i + "'"));
|
||||||
commandText += " AND ItemId In (select guid from typedbaseitems where type in (" + typeString + "))";
|
commandText += " AND ItemId In (select guid from typedbaseitems where type in (" + typeString + "))";
|
||||||
}
|
}
|
||||||
|
|
||||||
if (excludeItemTypes.Count > 0)
|
if (excludeItemTypes.Count > 0)
|
||||||
{
|
{
|
||||||
var typeString = string.Join(",", excludeItemTypes.Select(i => "'" + i + "'"));
|
var typeString = string.Join(",", excludeItemTypes.Select(i => "'" + i + "'"));
|
||||||
|
|
|
@ -135,10 +135,12 @@ namespace Emby.Server.Implementations.Data
|
||||||
{
|
{
|
||||||
throw new ArgumentNullException(nameof(userData));
|
throw new ArgumentNullException(nameof(userData));
|
||||||
}
|
}
|
||||||
|
|
||||||
if (internalUserId <= 0)
|
if (internalUserId <= 0)
|
||||||
{
|
{
|
||||||
throw new ArgumentNullException(nameof(internalUserId));
|
throw new ArgumentNullException(nameof(internalUserId));
|
||||||
}
|
}
|
||||||
|
|
||||||
if (string.IsNullOrEmpty(key))
|
if (string.IsNullOrEmpty(key))
|
||||||
{
|
{
|
||||||
throw new ArgumentNullException(nameof(key));
|
throw new ArgumentNullException(nameof(key));
|
||||||
|
@ -153,6 +155,7 @@ namespace Emby.Server.Implementations.Data
|
||||||
{
|
{
|
||||||
throw new ArgumentNullException(nameof(userData));
|
throw new ArgumentNullException(nameof(userData));
|
||||||
}
|
}
|
||||||
|
|
||||||
if (internalUserId <= 0)
|
if (internalUserId <= 0)
|
||||||
{
|
{
|
||||||
throw new ArgumentNullException(nameof(internalUserId));
|
throw new ArgumentNullException(nameof(internalUserId));
|
||||||
|
@ -235,7 +238,7 @@ namespace Emby.Server.Implementations.Data
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Persist all user data for the specified user
|
/// Persist all user data for the specified user.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
private void PersistAllUserData(long internalUserId, UserItemData[] userDataList, CancellationToken cancellationToken)
|
private void PersistAllUserData(long internalUserId, UserItemData[] userDataList, CancellationToken cancellationToken)
|
||||||
{
|
{
|
||||||
|
@ -309,7 +312,7 @@ namespace Emby.Server.Implementations.Data
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Return all user-data associated with the given user
|
/// Return all user-data associated with the given user.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
/// <param name="internalUserId"></param>
|
/// <param name="internalUserId"></param>
|
||||||
/// <returns></returns>
|
/// <returns></returns>
|
||||||
|
@ -339,7 +342,7 @@ namespace Emby.Server.Implementations.Data
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Read a row from the specified reader into the provided userData object
|
/// Read a row from the specified reader into the provided userData object.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
/// <param name="reader"></param>
|
/// <param name="reader"></param>
|
||||||
private UserItemData ReadRow(IReadOnlyList<IResultSetValue> reader)
|
private UserItemData ReadRow(IReadOnlyList<IResultSetValue> reader)
|
||||||
|
|
|
@ -169,6 +169,7 @@ namespace Emby.Server.Implementations.Devices
|
||||||
{
|
{
|
||||||
throw new ArgumentException("user not found");
|
throw new ArgumentException("user not found");
|
||||||
}
|
}
|
||||||
|
|
||||||
if (string.IsNullOrEmpty(deviceId))
|
if (string.IsNullOrEmpty(deviceId))
|
||||||
{
|
{
|
||||||
throw new ArgumentNullException(nameof(deviceId));
|
throw new ArgumentNullException(nameof(deviceId));
|
||||||
|
|
|
@ -74,7 +74,7 @@ namespace Emby.Server.Implementations.Dto
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Converts a BaseItem to a DTOBaseItem
|
/// Converts a BaseItem to a DTOBaseItem.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
/// <param name="item">The item.</param>
|
/// <param name="item">The item.</param>
|
||||||
/// <param name="fields">The fields.</param>
|
/// <param name="fields">The fields.</param>
|
||||||
|
@ -277,6 +277,7 @@ namespace Emby.Server.Implementations.Dto
|
||||||
dto.EpisodeTitle = dto.Name;
|
dto.EpisodeTitle = dto.Name;
|
||||||
dto.Name = dto.SeriesName;
|
dto.Name = dto.SeriesName;
|
||||||
}
|
}
|
||||||
|
|
||||||
liveTvManager.AddInfoToRecordingDto(item, dto, activeRecording, user);
|
liveTvManager.AddInfoToRecordingDto(item, dto, activeRecording, user);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -292,6 +293,7 @@ namespace Emby.Server.Implementations.Dto
|
||||||
{
|
{
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
|
||||||
var containers = container.Split(new[] { ',' });
|
var containers = container.Split(new[] { ',' });
|
||||||
if (containers.Length < 2)
|
if (containers.Length < 2)
|
||||||
{
|
{
|
||||||
|
@ -442,7 +444,7 @@ namespace Emby.Server.Implementations.Dto
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Gets client-side Id of a server-side BaseItem
|
/// Gets client-side Id of a server-side BaseItem.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
/// <param name="item">The item.</param>
|
/// <param name="item">The item.</param>
|
||||||
/// <returns>System.String.</returns>
|
/// <returns>System.String.</returns>
|
||||||
|
@ -456,6 +458,7 @@ namespace Emby.Server.Implementations.Dto
|
||||||
{
|
{
|
||||||
dto.SeriesName = item.SeriesName;
|
dto.SeriesName = item.SeriesName;
|
||||||
}
|
}
|
||||||
|
|
||||||
private static void SetPhotoProperties(BaseItemDto dto, Photo item)
|
private static void SetPhotoProperties(BaseItemDto dto, Photo item)
|
||||||
{
|
{
|
||||||
dto.CameraMake = item.CameraMake;
|
dto.CameraMake = item.CameraMake;
|
||||||
|
@ -537,7 +540,7 @@ namespace Emby.Server.Implementations.Dto
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Attaches People DTO's to a DTOBaseItem
|
/// Attaches People DTO's to a DTOBaseItem.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
/// <param name="dto">The dto.</param>
|
/// <param name="dto">The dto.</param>
|
||||||
/// <param name="item">The item.</param>
|
/// <param name="item">The item.</param>
|
||||||
|
@ -554,22 +557,27 @@ namespace Emby.Server.Implementations.Dto
|
||||||
{
|
{
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (i.IsType(PersonType.GuestStar))
|
if (i.IsType(PersonType.GuestStar))
|
||||||
{
|
{
|
||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (i.IsType(PersonType.Director))
|
if (i.IsType(PersonType.Director))
|
||||||
{
|
{
|
||||||
return 2;
|
return 2;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (i.IsType(PersonType.Writer))
|
if (i.IsType(PersonType.Writer))
|
||||||
{
|
{
|
||||||
return 3;
|
return 3;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (i.IsType(PersonType.Producer))
|
if (i.IsType(PersonType.Producer))
|
||||||
{
|
{
|
||||||
return 4;
|
return 4;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (i.IsType(PersonType.Composer))
|
if (i.IsType(PersonType.Composer))
|
||||||
{
|
{
|
||||||
return 4;
|
return 4;
|
||||||
|
@ -613,6 +621,7 @@ namespace Emby.Server.Implementations.Dto
|
||||||
{
|
{
|
||||||
baseItemPerson.PrimaryImageTag = GetTagAndFillBlurhash(dto, entity, ImageType.Primary);
|
baseItemPerson.PrimaryImageTag = GetTagAndFillBlurhash(dto, entity, ImageType.Primary);
|
||||||
baseItemPerson.Id = entity.Id.ToString("N", CultureInfo.InvariantCulture);
|
baseItemPerson.Id = entity.Id.ToString("N", CultureInfo.InvariantCulture);
|
||||||
|
baseItemPerson.ImageBlurHashes = dto.ImageBlurHashes;
|
||||||
list.Add(baseItemPerson);
|
list.Add(baseItemPerson);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -725,7 +734,7 @@ namespace Emby.Server.Implementations.Dto
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Sets simple property values on a DTOBaseItem
|
/// Sets simple property values on a DTOBaseItem.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
/// <param name="dto">The dto.</param>
|
/// <param name="dto">The dto.</param>
|
||||||
/// <param name="item">The item.</param>
|
/// <param name="item">The item.</param>
|
||||||
|
@ -1346,6 +1355,7 @@ namespace Emby.Server.Implementations.Dto
|
||||||
dto.ParentLogoImageTag = GetTagAndFillBlurhash(dto, parent, image);
|
dto.ParentLogoImageTag = GetTagAndFillBlurhash(dto, parent, image);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (artLimit > 0 && !(imageTags != null && imageTags.ContainsKey(ImageType.Art)) && dto.ParentArtItemId == null)
|
if (artLimit > 0 && !(imageTags != null && imageTags.ContainsKey(ImageType.Art)) && dto.ParentArtItemId == null)
|
||||||
{
|
{
|
||||||
var image = allImages.FirstOrDefault(i => i.Type == ImageType.Art);
|
var image = allImages.FirstOrDefault(i => i.Type == ImageType.Art);
|
||||||
|
@ -1356,6 +1366,7 @@ namespace Emby.Server.Implementations.Dto
|
||||||
dto.ParentArtImageTag = GetTagAndFillBlurhash(dto, parent, image);
|
dto.ParentArtImageTag = GetTagAndFillBlurhash(dto, parent, image);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (thumbLimit > 0 && !(imageTags != null && imageTags.ContainsKey(ImageType.Thumb)) && (dto.ParentThumbItemId == null || parent is Series) && !(parent is ICollectionFolder) && !(parent is UserView))
|
if (thumbLimit > 0 && !(imageTags != null && imageTags.ContainsKey(ImageType.Thumb)) && (dto.ParentThumbItemId == null || parent is Series) && !(parent is ICollectionFolder) && !(parent is UserView))
|
||||||
{
|
{
|
||||||
var image = allImages.FirstOrDefault(i => i.Type == ImageType.Thumb);
|
var image = allImages.FirstOrDefault(i => i.Type == ImageType.Thumb);
|
||||||
|
@ -1366,6 +1377,7 @@ namespace Emby.Server.Implementations.Dto
|
||||||
dto.ParentThumbImageTag = GetTagAndFillBlurhash(dto, parent, image);
|
dto.ParentThumbImageTag = GetTagAndFillBlurhash(dto, parent, image);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (backdropLimit > 0 && !((dto.BackdropImageTags != null && dto.BackdropImageTags.Length > 0) || (dto.ParentBackdropImageTags != null && dto.ParentBackdropImageTags.Length > 0)))
|
if (backdropLimit > 0 && !((dto.BackdropImageTags != null && dto.BackdropImageTags.Length > 0) || (dto.ParentBackdropImageTags != null && dto.ParentBackdropImageTags.Length > 0)))
|
||||||
{
|
{
|
||||||
var images = allImages.Where(i => i.Type == ImageType.Backdrop).Take(backdropLimit).ToList();
|
var images = allImages.Where(i => i.Type == ImageType.Backdrop).Take(backdropLimit).ToList();
|
||||||
|
|
|
@ -24,7 +24,7 @@
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
|
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
<PackageReference Include="IPNetwork2" Version="2.4.0.126" />
|
<PackageReference Include="IPNetwork2" Version="2.5.211" />
|
||||||
<PackageReference Include="Jellyfin.XmlTv" Version="10.4.3" />
|
<PackageReference Include="Jellyfin.XmlTv" Version="10.4.3" />
|
||||||
<PackageReference Include="Microsoft.AspNetCore.Hosting" Version="2.2.7" />
|
<PackageReference Include="Microsoft.AspNetCore.Hosting" Version="2.2.7" />
|
||||||
<PackageReference Include="Microsoft.AspNetCore.Hosting.Abstractions" Version="2.2.0" />
|
<PackageReference Include="Microsoft.AspNetCore.Hosting.Abstractions" Version="2.2.0" />
|
||||||
|
@ -41,7 +41,7 @@
|
||||||
<PackageReference Include="Mono.Nat" Version="2.0.1" />
|
<PackageReference Include="Mono.Nat" Version="2.0.1" />
|
||||||
<PackageReference Include="prometheus-net.DotNetRuntime" Version="3.3.1" />
|
<PackageReference Include="prometheus-net.DotNetRuntime" Version="3.3.1" />
|
||||||
<PackageReference Include="ServiceStack.Text.Core" Version="5.9.0" />
|
<PackageReference Include="ServiceStack.Text.Core" Version="5.9.0" />
|
||||||
<PackageReference Include="sharpcompress" Version="0.25.0" />
|
<PackageReference Include="sharpcompress" Version="0.25.1" />
|
||||||
<PackageReference Include="SQLitePCL.pretty.netstandard" Version="2.1.0" />
|
<PackageReference Include="SQLitePCL.pretty.netstandard" Version="2.1.0" />
|
||||||
<PackageReference Include="DotNet.Glob" Version="3.0.9" />
|
<PackageReference Include="DotNet.Glob" Version="3.0.9" />
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
|
|
|
@ -140,7 +140,7 @@ namespace Emby.Server.Implementations.HttpClientManager
|
||||||
=> SendAsync(options, HttpMethod.Get);
|
=> SendAsync(options, HttpMethod.Get);
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Performs a GET request and returns the resulting stream
|
/// Performs a GET request and returns the resulting stream.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
/// <param name="options">The options.</param>
|
/// <param name="options">The options.</param>
|
||||||
/// <returns>Task{Stream}.</returns>
|
/// <returns>Task{Stream}.</returns>
|
||||||
|
|
|
@ -32,12 +32,12 @@ namespace Emby.Server.Implementations.HttpServer
|
||||||
private readonly IFileSystem _fileSystem;
|
private readonly IFileSystem _fileSystem;
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// The _options
|
/// The _options.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
private readonly IDictionary<string, string> _options = new Dictionary<string, string>();
|
private readonly IDictionary<string, string> _options = new Dictionary<string, string>();
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// The _requested ranges
|
/// The _requested ranges.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
private List<KeyValuePair<long, long?>> _requestedRanges;
|
private List<KeyValuePair<long, long?>> _requestedRanges;
|
||||||
|
|
||||||
|
|
|
@ -453,6 +453,7 @@ namespace Emby.Server.Implementations.HttpServer
|
||||||
{
|
{
|
||||||
httpRes.Headers.Add(key, value);
|
httpRes.Headers.Add(key, value);
|
||||||
}
|
}
|
||||||
|
|
||||||
httpRes.ContentType = "text/plain";
|
httpRes.ContentType = "text/plain";
|
||||||
await httpRes.WriteAsync(string.Empty, cancellationToken).ConfigureAwait(false);
|
await httpRes.WriteAsync(string.Empty, cancellationToken).ConfigureAwait(false);
|
||||||
return;
|
return;
|
||||||
|
@ -591,7 +592,7 @@ namespace Emby.Server.Implementations.HttpServer
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Get the default CORS headers
|
/// Get the default CORS headers.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
/// <param name="req"></param>
|
/// <param name="req"></param>
|
||||||
/// <returns></returns>
|
/// <returns></returns>
|
||||||
|
|
|
@ -692,7 +692,7 @@ namespace Emby.Server.Implementations.HttpServer
|
||||||
|
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// When the browser sends the IfModifiedDate, it's precision is limited to seconds, so this will account for that
|
/// When the browser sends the IfModifiedDate, it's precision is limited to seconds, so this will account for that.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
/// <param name="date">The date.</param>
|
/// <param name="date">The date.</param>
|
||||||
/// <returns>DateTime.</returns>
|
/// <returns>DateTime.</returns>
|
||||||
|
|
|
@ -20,31 +20,37 @@ namespace Emby.Server.Implementations.HttpServer
|
||||||
/// </summary>
|
/// </summary>
|
||||||
/// <value>The source stream.</value>
|
/// <value>The source stream.</value>
|
||||||
private Stream SourceStream { get; set; }
|
private Stream SourceStream { get; set; }
|
||||||
|
|
||||||
private string RangeHeader { get; set; }
|
private string RangeHeader { get; set; }
|
||||||
|
|
||||||
private bool IsHeadRequest { get; set; }
|
private bool IsHeadRequest { get; set; }
|
||||||
|
|
||||||
private long RangeStart { get; set; }
|
private long RangeStart { get; set; }
|
||||||
|
|
||||||
private long RangeEnd { get; set; }
|
private long RangeEnd { get; set; }
|
||||||
|
|
||||||
private long RangeLength { get; set; }
|
private long RangeLength { get; set; }
|
||||||
|
|
||||||
private long TotalContentLength { get; set; }
|
private long TotalContentLength { get; set; }
|
||||||
|
|
||||||
public Action OnComplete { get; set; }
|
public Action OnComplete { get; set; }
|
||||||
|
|
||||||
private readonly ILogger _logger;
|
private readonly ILogger _logger;
|
||||||
|
|
||||||
private const int BufferSize = 81920;
|
private const int BufferSize = 81920;
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// The _options
|
/// The _options.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
private readonly Dictionary<string, string> _options = new Dictionary<string, string>();
|
private readonly Dictionary<string, string> _options = new Dictionary<string, string>();
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// The us culture
|
/// The us culture.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
private static readonly CultureInfo UsCulture = new CultureInfo("en-US");
|
private static readonly CultureInfo UsCulture = new CultureInfo("en-US");
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Additional HTTP Headers
|
/// Additional HTTP Headers.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
/// <value>The headers.</value>
|
/// <value>The headers.</value>
|
||||||
public IDictionary<string, string> Headers => _options;
|
public IDictionary<string, string> Headers => _options;
|
||||||
|
@ -110,7 +116,7 @@ namespace Emby.Server.Implementations.HttpServer
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// The _requested ranges
|
/// The _requested ranges.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
private List<KeyValuePair<long, long?>> _requestedRanges;
|
private List<KeyValuePair<long, long?>> _requestedRanges;
|
||||||
/// <summary>
|
/// <summary>
|
||||||
|
@ -139,6 +145,7 @@ namespace Emby.Server.Implementations.HttpServer
|
||||||
{
|
{
|
||||||
start = long.Parse(vals[0], UsCulture);
|
start = long.Parse(vals[0], UsCulture);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!string.IsNullOrEmpty(vals[1]))
|
if (!string.IsNullOrEmpty(vals[1]))
|
||||||
{
|
{
|
||||||
end = long.Parse(vals[1], UsCulture);
|
end = long.Parse(vals[1], UsCulture);
|
||||||
|
|
|
@ -140,6 +140,7 @@ namespace Emby.Server.Implementations.HttpServer.Security
|
||||||
{
|
{
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (authAttribtues.AllowLocalOnly && request.IsLocal)
|
if (authAttribtues.AllowLocalOnly && request.IsLocal)
|
||||||
{
|
{
|
||||||
return true;
|
return true;
|
||||||
|
|
|
@ -71,6 +71,7 @@ namespace Emby.Server.Implementations.HttpServer.Security
|
||||||
{
|
{
|
||||||
token = httpReq.Headers["X-MediaBrowser-Token"];
|
token = httpReq.Headers["X-MediaBrowser-Token"];
|
||||||
}
|
}
|
||||||
|
|
||||||
if (string.IsNullOrEmpty(token))
|
if (string.IsNullOrEmpty(token))
|
||||||
{
|
{
|
||||||
token = httpReq.QueryString["api_key"];
|
token = httpReq.QueryString["api_key"];
|
||||||
|
@ -160,6 +161,7 @@ namespace Emby.Server.Implementations.HttpServer.Security
|
||||||
_authRepo.Update(tokenInfo);
|
_authRepo.Update(tokenInfo);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
httpReq.Items["OriginalAuthenticationInfo"] = tokenInfo;
|
httpReq.Items["OriginalAuthenticationInfo"] = tokenInfo;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -628,6 +628,7 @@ namespace Emby.Server.Implementations.IO
|
||||||
{
|
{
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
return extensions.Contains(ext, StringComparer.OrdinalIgnoreCase);
|
return extensions.Contains(ext, StringComparer.OrdinalIgnoreCase);
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
@ -682,6 +683,7 @@ namespace Emby.Server.Implementations.IO
|
||||||
{
|
{
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
return extensions.Contains(ext, StringComparer.OrdinalIgnoreCase);
|
return extensions.Contains(ext, StringComparer.OrdinalIgnoreCase);
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
|
@ -8,7 +8,7 @@ using MediaBrowser.Model.IO;
|
||||||
namespace Emby.Server.Implementations.Library
|
namespace Emby.Server.Implementations.Library
|
||||||
{
|
{
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Provides the core resolver ignore rules
|
/// Provides the core resolver ignore rules.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public class CoreResolutionIgnoreRule : IResolverIgnoreRule
|
public class CoreResolutionIgnoreRule : IResolverIgnoreRule
|
||||||
{
|
{
|
||||||
|
|
|
@ -12,11 +12,13 @@ namespace Emby.Server.Implementations.Library
|
||||||
public class ExclusiveLiveStream : ILiveStream
|
public class ExclusiveLiveStream : ILiveStream
|
||||||
{
|
{
|
||||||
public int ConsumerCount { get; set; }
|
public int ConsumerCount { get; set; }
|
||||||
|
|
||||||
public string OriginalStreamId { get; set; }
|
public string OriginalStreamId { get; set; }
|
||||||
|
|
||||||
public string TunerHostId => null;
|
public string TunerHostId => null;
|
||||||
|
|
||||||
public bool EnableStreamSharing { get; set; }
|
public bool EnableStreamSharing { get; set; }
|
||||||
|
|
||||||
public MediaSourceInfo MediaSource { get; set; }
|
public MediaSourceInfo MediaSource { get; set; }
|
||||||
|
|
||||||
public string UniqueId { get; private set; }
|
public string UniqueId { get; private set; }
|
||||||
|
|
|
@ -4,12 +4,12 @@ using DotNet.Globbing;
|
||||||
namespace Emby.Server.Implementations.Library
|
namespace Emby.Server.Implementations.Library
|
||||||
{
|
{
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Glob patterns for files to ignore
|
/// Glob patterns for files to ignore.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public static class IgnorePatterns
|
public static class IgnorePatterns
|
||||||
{
|
{
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Files matching these glob patterns will be ignored
|
/// Files matching these glob patterns will be ignored.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public static readonly string[] Patterns = new string[]
|
public static readonly string[] Patterns = new string[]
|
||||||
{
|
{
|
||||||
|
@ -64,7 +64,7 @@ namespace Emby.Server.Implementations.Library
|
||||||
private static readonly Glob[] _globs = Patterns.Select(p => Glob.Parse(p, _globOptions)).ToArray();
|
private static readonly Glob[] _globs = Patterns.Select(p => Glob.Parse(p, _globOptions)).ToArray();
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Returns true if the supplied path should be ignored
|
/// Returns true if the supplied path should be ignored.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public static bool ShouldIgnore(string path)
|
public static bool ShouldIgnore(string path)
|
||||||
{
|
{
|
||||||
|
|
|
@ -97,13 +97,13 @@ namespace Emby.Server.Implementations.Library
|
||||||
private IIntroProvider[] IntroProviders { get; set; }
|
private IIntroProvider[] IntroProviders { get; set; }
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Gets or sets the list of entity resolution ignore rules
|
/// Gets or sets the list of entity resolution ignore rules.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
/// <value>The entity resolution ignore rules.</value>
|
/// <value>The entity resolution ignore rules.</value>
|
||||||
private IResolverIgnoreRule[] EntityResolutionIgnoreRules { get; set; }
|
private IResolverIgnoreRule[] EntityResolutionIgnoreRules { get; set; }
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Gets or sets the list of currently registered entity resolvers
|
/// Gets or sets the list of currently registered entity resolvers.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
/// <value>The entity resolvers enumerable.</value>
|
/// <value>The entity resolvers enumerable.</value>
|
||||||
private IItemResolver[] EntityResolvers { get; set; }
|
private IItemResolver[] EntityResolvers { get; set; }
|
||||||
|
@ -209,12 +209,12 @@ namespace Emby.Server.Implementations.Library
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// The _root folder
|
/// The _root folder.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
private volatile AggregateFolder _rootFolder;
|
private volatile AggregateFolder _rootFolder;
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// The _root folder sync lock
|
/// The _root folder sync lock.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
private readonly object _rootFolderSyncLock = new object();
|
private readonly object _rootFolderSyncLock = new object();
|
||||||
|
|
||||||
|
@ -627,7 +627,7 @@ namespace Emby.Server.Implementations.Library
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Determines whether a path should be ignored based on its contents - called after the contents have been read
|
/// Determines whether a path should be ignored based on its contents - called after the contents have been read.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
/// <param name="args">The args.</param>
|
/// <param name="args">The args.</param>
|
||||||
/// <returns><c>true</c> if XXXX, <c>false</c> otherwise</returns>
|
/// <returns><c>true</c> if XXXX, <c>false</c> otherwise</returns>
|
||||||
|
@ -909,7 +909,7 @@ namespace Emby.Server.Implementations.Library
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Gets a Genre
|
/// Gets a Genre.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
/// <param name="name">The name.</param>
|
/// <param name="name">The name.</param>
|
||||||
/// <returns>Task{Genre}.</returns>
|
/// <returns>Task{Genre}.</returns>
|
||||||
|
@ -990,7 +990,7 @@ namespace Emby.Server.Implementations.Library
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Reloads the root media folder
|
/// Reloads the root media folder.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
/// <param name="progress">The progress.</param>
|
/// <param name="progress">The progress.</param>
|
||||||
/// <param name="cancellationToken">The cancellation token.</param>
|
/// <param name="cancellationToken">The cancellation token.</param>
|
||||||
|
@ -2784,10 +2784,12 @@ namespace Emby.Server.Implementations.Library
|
||||||
{
|
{
|
||||||
throw new ArgumentNullException(nameof(path));
|
throw new ArgumentNullException(nameof(path));
|
||||||
}
|
}
|
||||||
|
|
||||||
if (string.IsNullOrWhiteSpace(from))
|
if (string.IsNullOrWhiteSpace(from))
|
||||||
{
|
{
|
||||||
throw new ArgumentNullException(nameof(from));
|
throw new ArgumentNullException(nameof(from));
|
||||||
}
|
}
|
||||||
|
|
||||||
if (string.IsNullOrWhiteSpace(to))
|
if (string.IsNullOrWhiteSpace(to))
|
||||||
{
|
{
|
||||||
throw new ArgumentNullException(nameof(to));
|
throw new ArgumentNullException(nameof(to));
|
||||||
|
|
|
@ -205,22 +205,27 @@ namespace Emby.Server.Implementations.Library
|
||||||
{
|
{
|
||||||
return MediaProtocol.Rtsp;
|
return MediaProtocol.Rtsp;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (path.StartsWith("Rtmp", StringComparison.OrdinalIgnoreCase))
|
if (path.StartsWith("Rtmp", StringComparison.OrdinalIgnoreCase))
|
||||||
{
|
{
|
||||||
return MediaProtocol.Rtmp;
|
return MediaProtocol.Rtmp;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (path.StartsWith("Http", StringComparison.OrdinalIgnoreCase))
|
if (path.StartsWith("Http", StringComparison.OrdinalIgnoreCase))
|
||||||
{
|
{
|
||||||
return MediaProtocol.Http;
|
return MediaProtocol.Http;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (path.StartsWith("rtp", StringComparison.OrdinalIgnoreCase))
|
if (path.StartsWith("rtp", StringComparison.OrdinalIgnoreCase))
|
||||||
{
|
{
|
||||||
return MediaProtocol.Rtp;
|
return MediaProtocol.Rtp;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (path.StartsWith("ftp", StringComparison.OrdinalIgnoreCase))
|
if (path.StartsWith("ftp", StringComparison.OrdinalIgnoreCase))
|
||||||
{
|
{
|
||||||
return MediaProtocol.Ftp;
|
return MediaProtocol.Ftp;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (path.StartsWith("udp", StringComparison.OrdinalIgnoreCase))
|
if (path.StartsWith("udp", StringComparison.OrdinalIgnoreCase))
|
||||||
{
|
{
|
||||||
return MediaProtocol.Udp;
|
return MediaProtocol.Udp;
|
||||||
|
|
|
@ -107,7 +107,7 @@ namespace Emby.Server.Implementations.Library
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Ensures DateCreated and DateModified have values
|
/// Ensures DateCreated and DateModified have values.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
/// <param name="fileSystem">The file system.</param>
|
/// <param name="fileSystem">The file system.</param>
|
||||||
/// <param name="item">The item.</param>
|
/// <param name="item">The item.</param>
|
||||||
|
|
|
@ -28,7 +28,7 @@ namespace Emby.Server.Implementations.Library.Resolvers
|
||||||
public virtual ResolverPriority Priority => ResolverPriority.First;
|
public virtual ResolverPriority Priority => ResolverPriority.First;
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Sets initial values on the newly resolved item
|
/// Sets initial values on the newly resolved item.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
/// <param name="item">The item.</param>
|
/// <param name="item">The item.</param>
|
||||||
/// <param name="args">The args.</param>
|
/// <param name="args">The args.</param>
|
||||||
|
|
|
@ -41,10 +41,12 @@ namespace Emby.Server.Implementations.Library.Resolvers
|
||||||
{
|
{
|
||||||
return new AggregateFolder();
|
return new AggregateFolder();
|
||||||
}
|
}
|
||||||
|
|
||||||
if (string.Equals(args.Path, _appPaths.DefaultUserViewsPath, StringComparison.OrdinalIgnoreCase))
|
if (string.Equals(args.Path, _appPaths.DefaultUserViewsPath, StringComparison.OrdinalIgnoreCase))
|
||||||
{
|
{
|
||||||
return new UserRootFolder(); // if we got here and still a root - must be user root
|
return new UserRootFolder(); // if we got here and still a root - must be user root
|
||||||
}
|
}
|
||||||
|
|
||||||
if (args.IsVf)
|
if (args.IsVf)
|
||||||
{
|
{
|
||||||
return new CollectionFolder
|
return new CollectionFolder
|
||||||
|
|
|
@ -55,6 +55,7 @@ namespace Emby.Server.Implementations.Library.Resolvers.TV
|
||||||
episode.SeriesId = series.Id;
|
episode.SeriesId = series.Id;
|
||||||
episode.SeriesName = series.Name;
|
episode.SeriesName = series.Name;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (season != null)
|
if (season != null)
|
||||||
{
|
{
|
||||||
episode.SeasonId = season.Id;
|
episode.SeasonId = season.Id;
|
||||||
|
|
|
@ -194,6 +194,7 @@ namespace Emby.Server.Implementations.Library
|
||||||
{
|
{
|
||||||
searchQuery.AncestorIds = new[] { searchQuery.ParentId };
|
searchQuery.AncestorIds = new[] { searchQuery.ParentId };
|
||||||
}
|
}
|
||||||
|
|
||||||
searchQuery.ParentId = Guid.Empty;
|
searchQuery.ParentId = Guid.Empty;
|
||||||
searchQuery.IncludeItemsByName = true;
|
searchQuery.IncludeItemsByName = true;
|
||||||
searchQuery.IncludeItemTypes = Array.Empty<string>();
|
searchQuery.IncludeItemTypes = Array.Empty<string>();
|
||||||
|
|
|
@ -103,7 +103,7 @@ namespace Emby.Server.Implementations.Library
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Retrieve all user data for the given user
|
/// Retrieve all user data for the given user.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
/// <param name="userId"></param>
|
/// <param name="userId"></param>
|
||||||
/// <returns></returns>
|
/// <returns></returns>
|
||||||
|
@ -188,7 +188,7 @@ namespace Emby.Server.Implementations.Library
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Converts a UserItemData to a DTOUserItemData
|
/// Converts a UserItemData to a DTOUserItemData.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
/// <param name="data">The data.</param>
|
/// <param name="data">The data.</param>
|
||||||
/// <returns>DtoUserItemData.</returns>
|
/// <returns>DtoUserItemData.</returns>
|
||||||
|
|
|
@ -212,6 +212,7 @@ namespace Emby.Server.Implementations.LiveTv.Listings
|
||||||
{
|
{
|
||||||
channelNumber = map.channel;
|
channelNumber = map.channel;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (string.IsNullOrWhiteSpace(channelNumber))
|
if (string.IsNullOrWhiteSpace(channelNumber))
|
||||||
{
|
{
|
||||||
channelNumber = map.atscMajor + "." + map.atscMinor;
|
channelNumber = map.atscMajor + "." + map.atscMinor;
|
||||||
|
@ -400,6 +401,7 @@ namespace Emby.Server.Implementations.LiveTv.Listings
|
||||||
{
|
{
|
||||||
date = DateTime.SpecifyKind(date, DateTimeKind.Utc);
|
date = DateTime.SpecifyKind(date, DateTimeKind.Utc);
|
||||||
}
|
}
|
||||||
|
|
||||||
return date;
|
return date;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -622,6 +624,7 @@ namespace Emby.Server.Implementations.LiveTv.Listings
|
||||||
_lastErrorResponse = DateTime.UtcNow;
|
_lastErrorResponse = DateTime.UtcNow;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
throw;
|
throw;
|
||||||
}
|
}
|
||||||
finally
|
finally
|
||||||
|
@ -805,11 +808,13 @@ namespace Emby.Server.Implementations.LiveTv.Listings
|
||||||
{
|
{
|
||||||
throw new ArgumentException("Username is required");
|
throw new ArgumentException("Username is required");
|
||||||
}
|
}
|
||||||
|
|
||||||
if (string.IsNullOrEmpty(info.Password))
|
if (string.IsNullOrEmpty(info.Password))
|
||||||
{
|
{
|
||||||
throw new ArgumentException("Password is required");
|
throw new ArgumentException("Password is required");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (validateListings)
|
if (validateListings)
|
||||||
{
|
{
|
||||||
if (string.IsNullOrEmpty(info.ListingsId))
|
if (string.IsNullOrEmpty(info.ListingsId))
|
||||||
|
@ -932,24 +937,35 @@ namespace Emby.Server.Implementations.LiveTv.Listings
|
||||||
public class Token
|
public class Token
|
||||||
{
|
{
|
||||||
public int code { get; set; }
|
public int code { get; set; }
|
||||||
|
|
||||||
public string message { get; set; }
|
public string message { get; set; }
|
||||||
|
|
||||||
public string serverID { get; set; }
|
public string serverID { get; set; }
|
||||||
|
|
||||||
public string token { get; set; }
|
public string token { get; set; }
|
||||||
}
|
}
|
||||||
|
|
||||||
public class Lineup
|
public class Lineup
|
||||||
{
|
{
|
||||||
public string lineup { get; set; }
|
public string lineup { get; set; }
|
||||||
|
|
||||||
public string name { get; set; }
|
public string name { get; set; }
|
||||||
|
|
||||||
public string transport { get; set; }
|
public string transport { get; set; }
|
||||||
|
|
||||||
public string location { get; set; }
|
public string location { get; set; }
|
||||||
|
|
||||||
public string uri { get; set; }
|
public string uri { get; set; }
|
||||||
}
|
}
|
||||||
|
|
||||||
public class Lineups
|
public class Lineups
|
||||||
{
|
{
|
||||||
public int code { get; set; }
|
public int code { get; set; }
|
||||||
|
|
||||||
public string serverID { get; set; }
|
public string serverID { get; set; }
|
||||||
|
|
||||||
public string datetime { get; set; }
|
public string datetime { get; set; }
|
||||||
|
|
||||||
public List<Lineup> lineups { get; set; }
|
public List<Lineup> lineups { get; set; }
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -957,8 +973,11 @@ namespace Emby.Server.Implementations.LiveTv.Listings
|
||||||
public class Headends
|
public class Headends
|
||||||
{
|
{
|
||||||
public string headend { get; set; }
|
public string headend { get; set; }
|
||||||
|
|
||||||
public string transport { get; set; }
|
public string transport { get; set; }
|
||||||
|
|
||||||
public string location { get; set; }
|
public string location { get; set; }
|
||||||
|
|
||||||
public List<Lineup> lineups { get; set; }
|
public List<Lineup> lineups { get; set; }
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -967,59 +986,83 @@ namespace Emby.Server.Implementations.LiveTv.Listings
|
||||||
public class Map
|
public class Map
|
||||||
{
|
{
|
||||||
public string stationID { get; set; }
|
public string stationID { get; set; }
|
||||||
|
|
||||||
public string channel { get; set; }
|
public string channel { get; set; }
|
||||||
|
|
||||||
public string logicalChannelNumber { get; set; }
|
public string logicalChannelNumber { get; set; }
|
||||||
|
|
||||||
public int uhfVhf { get; set; }
|
public int uhfVhf { get; set; }
|
||||||
|
|
||||||
public int atscMajor { get; set; }
|
public int atscMajor { get; set; }
|
||||||
|
|
||||||
public int atscMinor { get; set; }
|
public int atscMinor { get; set; }
|
||||||
}
|
}
|
||||||
|
|
||||||
public class Broadcaster
|
public class Broadcaster
|
||||||
{
|
{
|
||||||
public string city { get; set; }
|
public string city { get; set; }
|
||||||
|
|
||||||
public string state { get; set; }
|
public string state { get; set; }
|
||||||
|
|
||||||
public string postalcode { get; set; }
|
public string postalcode { get; set; }
|
||||||
|
|
||||||
public string country { get; set; }
|
public string country { get; set; }
|
||||||
}
|
}
|
||||||
|
|
||||||
public class Logo
|
public class Logo
|
||||||
{
|
{
|
||||||
public string URL { get; set; }
|
public string URL { get; set; }
|
||||||
|
|
||||||
public int height { get; set; }
|
public int height { get; set; }
|
||||||
|
|
||||||
public int width { get; set; }
|
public int width { get; set; }
|
||||||
|
|
||||||
public string md5 { get; set; }
|
public string md5 { get; set; }
|
||||||
}
|
}
|
||||||
|
|
||||||
public class Station
|
public class Station
|
||||||
{
|
{
|
||||||
public string stationID { get; set; }
|
public string stationID { get; set; }
|
||||||
|
|
||||||
public string name { get; set; }
|
public string name { get; set; }
|
||||||
|
|
||||||
public string callsign { get; set; }
|
public string callsign { get; set; }
|
||||||
|
|
||||||
public List<string> broadcastLanguage { get; set; }
|
public List<string> broadcastLanguage { get; set; }
|
||||||
|
|
||||||
public List<string> descriptionLanguage { get; set; }
|
public List<string> descriptionLanguage { get; set; }
|
||||||
|
|
||||||
public Broadcaster broadcaster { get; set; }
|
public Broadcaster broadcaster { get; set; }
|
||||||
|
|
||||||
public string affiliate { get; set; }
|
public string affiliate { get; set; }
|
||||||
|
|
||||||
public Logo logo { get; set; }
|
public Logo logo { get; set; }
|
||||||
|
|
||||||
public bool? isCommercialFree { get; set; }
|
public bool? isCommercialFree { get; set; }
|
||||||
}
|
}
|
||||||
|
|
||||||
public class Metadata
|
public class Metadata
|
||||||
{
|
{
|
||||||
public string lineup { get; set; }
|
public string lineup { get; set; }
|
||||||
|
|
||||||
public string modified { get; set; }
|
public string modified { get; set; }
|
||||||
|
|
||||||
public string transport { get; set; }
|
public string transport { get; set; }
|
||||||
}
|
}
|
||||||
|
|
||||||
public class Channel
|
public class Channel
|
||||||
{
|
{
|
||||||
public List<Map> map { get; set; }
|
public List<Map> map { get; set; }
|
||||||
|
|
||||||
public List<Station> stations { get; set; }
|
public List<Station> stations { get; set; }
|
||||||
|
|
||||||
public Metadata metadata { get; set; }
|
public Metadata metadata { get; set; }
|
||||||
}
|
}
|
||||||
|
|
||||||
public class RequestScheduleForChannel
|
public class RequestScheduleForChannel
|
||||||
{
|
{
|
||||||
public string stationID { get; set; }
|
public string stationID { get; set; }
|
||||||
|
|
||||||
public List<string> date { get; set; }
|
public List<string> date { get; set; }
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1029,29 +1072,43 @@ namespace Emby.Server.Implementations.LiveTv.Listings
|
||||||
public class Rating
|
public class Rating
|
||||||
{
|
{
|
||||||
public string body { get; set; }
|
public string body { get; set; }
|
||||||
|
|
||||||
public string code { get; set; }
|
public string code { get; set; }
|
||||||
}
|
}
|
||||||
|
|
||||||
public class Multipart
|
public class Multipart
|
||||||
{
|
{
|
||||||
public int partNumber { get; set; }
|
public int partNumber { get; set; }
|
||||||
|
|
||||||
public int totalParts { get; set; }
|
public int totalParts { get; set; }
|
||||||
}
|
}
|
||||||
|
|
||||||
public class Program
|
public class Program
|
||||||
{
|
{
|
||||||
public string programID { get; set; }
|
public string programID { get; set; }
|
||||||
|
|
||||||
public string airDateTime { get; set; }
|
public string airDateTime { get; set; }
|
||||||
|
|
||||||
public int duration { get; set; }
|
public int duration { get; set; }
|
||||||
|
|
||||||
public string md5 { get; set; }
|
public string md5 { get; set; }
|
||||||
|
|
||||||
public List<string> audioProperties { get; set; }
|
public List<string> audioProperties { get; set; }
|
||||||
|
|
||||||
public List<string> videoProperties { get; set; }
|
public List<string> videoProperties { get; set; }
|
||||||
|
|
||||||
public List<Rating> ratings { get; set; }
|
public List<Rating> ratings { get; set; }
|
||||||
|
|
||||||
public bool? @new { get; set; }
|
public bool? @new { get; set; }
|
||||||
|
|
||||||
public Multipart multipart { get; set; }
|
public Multipart multipart { get; set; }
|
||||||
|
|
||||||
public string liveTapeDelay { get; set; }
|
public string liveTapeDelay { get; set; }
|
||||||
|
|
||||||
public bool premiere { get; set; }
|
public bool premiere { get; set; }
|
||||||
|
|
||||||
public bool repeat { get; set; }
|
public bool repeat { get; set; }
|
||||||
|
|
||||||
public string isPremiereOrFinale { get; set; }
|
public string isPremiereOrFinale { get; set; }
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1060,16 +1117,22 @@ namespace Emby.Server.Implementations.LiveTv.Listings
|
||||||
public class MetadataSchedule
|
public class MetadataSchedule
|
||||||
{
|
{
|
||||||
public string modified { get; set; }
|
public string modified { get; set; }
|
||||||
|
|
||||||
public string md5 { get; set; }
|
public string md5 { get; set; }
|
||||||
|
|
||||||
public string startDate { get; set; }
|
public string startDate { get; set; }
|
||||||
|
|
||||||
public string endDate { get; set; }
|
public string endDate { get; set; }
|
||||||
|
|
||||||
public int days { get; set; }
|
public int days { get; set; }
|
||||||
}
|
}
|
||||||
|
|
||||||
public class Day
|
public class Day
|
||||||
{
|
{
|
||||||
public string stationID { get; set; }
|
public string stationID { get; set; }
|
||||||
|
|
||||||
public List<Program> programs { get; set; }
|
public List<Program> programs { get; set; }
|
||||||
|
|
||||||
public MetadataSchedule metadata { get; set; }
|
public MetadataSchedule metadata { get; set; }
|
||||||
|
|
||||||
public Day()
|
public Day()
|
||||||
|
@ -1092,24 +1155,28 @@ namespace Emby.Server.Implementations.LiveTv.Listings
|
||||||
public class Description100
|
public class Description100
|
||||||
{
|
{
|
||||||
public string descriptionLanguage { get; set; }
|
public string descriptionLanguage { get; set; }
|
||||||
|
|
||||||
public string description { get; set; }
|
public string description { get; set; }
|
||||||
}
|
}
|
||||||
|
|
||||||
public class Description1000
|
public class Description1000
|
||||||
{
|
{
|
||||||
public string descriptionLanguage { get; set; }
|
public string descriptionLanguage { get; set; }
|
||||||
|
|
||||||
public string description { get; set; }
|
public string description { get; set; }
|
||||||
}
|
}
|
||||||
|
|
||||||
public class DescriptionsProgram
|
public class DescriptionsProgram
|
||||||
{
|
{
|
||||||
public List<Description100> description100 { get; set; }
|
public List<Description100> description100 { get; set; }
|
||||||
|
|
||||||
public List<Description1000> description1000 { get; set; }
|
public List<Description1000> description1000 { get; set; }
|
||||||
}
|
}
|
||||||
|
|
||||||
public class Gracenote
|
public class Gracenote
|
||||||
{
|
{
|
||||||
public int season { get; set; }
|
public int season { get; set; }
|
||||||
|
|
||||||
public int episode { get; set; }
|
public int episode { get; set; }
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1121,101 +1188,152 @@ namespace Emby.Server.Implementations.LiveTv.Listings
|
||||||
public class ContentRating
|
public class ContentRating
|
||||||
{
|
{
|
||||||
public string body { get; set; }
|
public string body { get; set; }
|
||||||
|
|
||||||
public string code { get; set; }
|
public string code { get; set; }
|
||||||
}
|
}
|
||||||
|
|
||||||
public class Cast
|
public class Cast
|
||||||
{
|
{
|
||||||
public string billingOrder { get; set; }
|
public string billingOrder { get; set; }
|
||||||
|
|
||||||
public string role { get; set; }
|
public string role { get; set; }
|
||||||
|
|
||||||
public string nameId { get; set; }
|
public string nameId { get; set; }
|
||||||
|
|
||||||
public string personId { get; set; }
|
public string personId { get; set; }
|
||||||
|
|
||||||
public string name { get; set; }
|
public string name { get; set; }
|
||||||
|
|
||||||
public string characterName { get; set; }
|
public string characterName { get; set; }
|
||||||
}
|
}
|
||||||
|
|
||||||
public class Crew
|
public class Crew
|
||||||
{
|
{
|
||||||
public string billingOrder { get; set; }
|
public string billingOrder { get; set; }
|
||||||
|
|
||||||
public string role { get; set; }
|
public string role { get; set; }
|
||||||
|
|
||||||
public string nameId { get; set; }
|
public string nameId { get; set; }
|
||||||
|
|
||||||
public string personId { get; set; }
|
public string personId { get; set; }
|
||||||
|
|
||||||
public string name { get; set; }
|
public string name { get; set; }
|
||||||
}
|
}
|
||||||
|
|
||||||
public class QualityRating
|
public class QualityRating
|
||||||
{
|
{
|
||||||
public string ratingsBody { get; set; }
|
public string ratingsBody { get; set; }
|
||||||
|
|
||||||
public string rating { get; set; }
|
public string rating { get; set; }
|
||||||
|
|
||||||
public string minRating { get; set; }
|
public string minRating { get; set; }
|
||||||
|
|
||||||
public string maxRating { get; set; }
|
public string maxRating { get; set; }
|
||||||
|
|
||||||
public string increment { get; set; }
|
public string increment { get; set; }
|
||||||
}
|
}
|
||||||
|
|
||||||
public class Movie
|
public class Movie
|
||||||
{
|
{
|
||||||
public string year { get; set; }
|
public string year { get; set; }
|
||||||
|
|
||||||
public int duration { get; set; }
|
public int duration { get; set; }
|
||||||
|
|
||||||
public List<QualityRating> qualityRating { get; set; }
|
public List<QualityRating> qualityRating { get; set; }
|
||||||
}
|
}
|
||||||
|
|
||||||
public class Recommendation
|
public class Recommendation
|
||||||
{
|
{
|
||||||
public string programID { get; set; }
|
public string programID { get; set; }
|
||||||
|
|
||||||
public string title120 { get; set; }
|
public string title120 { get; set; }
|
||||||
}
|
}
|
||||||
|
|
||||||
public class ProgramDetails
|
public class ProgramDetails
|
||||||
{
|
{
|
||||||
public string audience { get; set; }
|
public string audience { get; set; }
|
||||||
|
|
||||||
public string programID { get; set; }
|
public string programID { get; set; }
|
||||||
|
|
||||||
public List<Title> titles { get; set; }
|
public List<Title> titles { get; set; }
|
||||||
|
|
||||||
public EventDetails eventDetails { get; set; }
|
public EventDetails eventDetails { get; set; }
|
||||||
|
|
||||||
public DescriptionsProgram descriptions { get; set; }
|
public DescriptionsProgram descriptions { get; set; }
|
||||||
|
|
||||||
public string originalAirDate { get; set; }
|
public string originalAirDate { get; set; }
|
||||||
|
|
||||||
public List<string> genres { get; set; }
|
public List<string> genres { get; set; }
|
||||||
|
|
||||||
public string episodeTitle150 { get; set; }
|
public string episodeTitle150 { get; set; }
|
||||||
|
|
||||||
public List<MetadataPrograms> metadata { get; set; }
|
public List<MetadataPrograms> metadata { get; set; }
|
||||||
|
|
||||||
public List<ContentRating> contentRating { get; set; }
|
public List<ContentRating> contentRating { get; set; }
|
||||||
|
|
||||||
public List<Cast> cast { get; set; }
|
public List<Cast> cast { get; set; }
|
||||||
|
|
||||||
public List<Crew> crew { get; set; }
|
public List<Crew> crew { get; set; }
|
||||||
|
|
||||||
public string entityType { get; set; }
|
public string entityType { get; set; }
|
||||||
|
|
||||||
public string showType { get; set; }
|
public string showType { get; set; }
|
||||||
|
|
||||||
public bool hasImageArtwork { get; set; }
|
public bool hasImageArtwork { get; set; }
|
||||||
|
|
||||||
public string primaryImage { get; set; }
|
public string primaryImage { get; set; }
|
||||||
|
|
||||||
public string thumbImage { get; set; }
|
public string thumbImage { get; set; }
|
||||||
|
|
||||||
public string backdropImage { get; set; }
|
public string backdropImage { get; set; }
|
||||||
|
|
||||||
public string bannerImage { get; set; }
|
public string bannerImage { get; set; }
|
||||||
|
|
||||||
public string imageID { get; set; }
|
public string imageID { get; set; }
|
||||||
|
|
||||||
public string md5 { get; set; }
|
public string md5 { get; set; }
|
||||||
|
|
||||||
public List<string> contentAdvisory { get; set; }
|
public List<string> contentAdvisory { get; set; }
|
||||||
|
|
||||||
public Movie movie { get; set; }
|
public Movie movie { get; set; }
|
||||||
|
|
||||||
public List<Recommendation> recommendations { get; set; }
|
public List<Recommendation> recommendations { get; set; }
|
||||||
}
|
}
|
||||||
|
|
||||||
public class Caption
|
public class Caption
|
||||||
{
|
{
|
||||||
public string content { get; set; }
|
public string content { get; set; }
|
||||||
|
|
||||||
public string lang { get; set; }
|
public string lang { get; set; }
|
||||||
}
|
}
|
||||||
|
|
||||||
public class ImageData
|
public class ImageData
|
||||||
{
|
{
|
||||||
public string width { get; set; }
|
public string width { get; set; }
|
||||||
|
|
||||||
public string height { get; set; }
|
public string height { get; set; }
|
||||||
|
|
||||||
public string uri { get; set; }
|
public string uri { get; set; }
|
||||||
|
|
||||||
public string size { get; set; }
|
public string size { get; set; }
|
||||||
|
|
||||||
public string aspect { get; set; }
|
public string aspect { get; set; }
|
||||||
|
|
||||||
public string category { get; set; }
|
public string category { get; set; }
|
||||||
|
|
||||||
public string text { get; set; }
|
public string text { get; set; }
|
||||||
|
|
||||||
public string primary { get; set; }
|
public string primary { get; set; }
|
||||||
|
|
||||||
public string tier { get; set; }
|
public string tier { get; set; }
|
||||||
|
|
||||||
public Caption caption { get; set; }
|
public Caption caption { get; set; }
|
||||||
}
|
}
|
||||||
|
|
||||||
public class ShowImages
|
public class ShowImages
|
||||||
{
|
{
|
||||||
public string programID { get; set; }
|
public string programID { get; set; }
|
||||||
|
|
||||||
public List<ImageData> data { get; set; }
|
public List<ImageData> data { get; set; }
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -224,6 +224,7 @@ namespace Emby.Server.Implementations.LiveTv.Listings
|
||||||
{
|
{
|
||||||
uniqueString = "-" + programInfo.SeasonNumber.Value.ToString(CultureInfo.InvariantCulture);
|
uniqueString = "-" + programInfo.SeasonNumber.Value.ToString(CultureInfo.InvariantCulture);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (programInfo.EpisodeNumber.HasValue)
|
if (programInfo.EpisodeNumber.HasValue)
|
||||||
{
|
{
|
||||||
uniqueString = "-" + programInfo.EpisodeNumber.Value.ToString(CultureInfo.InvariantCulture);
|
uniqueString = "-" + programInfo.EpisodeNumber.Value.ToString(CultureInfo.InvariantCulture);
|
||||||
|
|
|
@ -556,6 +556,7 @@ namespace Emby.Server.Implementations.LiveTv
|
||||||
{
|
{
|
||||||
forceUpdate = true;
|
forceUpdate = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
item.ParentId = channel.Id;
|
item.ParentId = channel.Id;
|
||||||
|
|
||||||
// item.ChannelType = channelType;
|
// item.ChannelType = channelType;
|
||||||
|
@ -575,6 +576,7 @@ namespace Emby.Server.Implementations.LiveTv
|
||||||
{
|
{
|
||||||
forceUpdate = true;
|
forceUpdate = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
item.ExternalSeriesId = seriesId;
|
item.ExternalSeriesId = seriesId;
|
||||||
|
|
||||||
var isSeries = info.IsSeries || !string.IsNullOrEmpty(info.EpisodeTitle);
|
var isSeries = info.IsSeries || !string.IsNullOrEmpty(info.EpisodeTitle);
|
||||||
|
@ -589,30 +591,37 @@ namespace Emby.Server.Implementations.LiveTv
|
||||||
{
|
{
|
||||||
tags.Add("Live");
|
tags.Add("Live");
|
||||||
}
|
}
|
||||||
|
|
||||||
if (info.IsPremiere)
|
if (info.IsPremiere)
|
||||||
{
|
{
|
||||||
tags.Add("Premiere");
|
tags.Add("Premiere");
|
||||||
}
|
}
|
||||||
|
|
||||||
if (info.IsNews)
|
if (info.IsNews)
|
||||||
{
|
{
|
||||||
tags.Add("News");
|
tags.Add("News");
|
||||||
}
|
}
|
||||||
|
|
||||||
if (info.IsSports)
|
if (info.IsSports)
|
||||||
{
|
{
|
||||||
tags.Add("Sports");
|
tags.Add("Sports");
|
||||||
}
|
}
|
||||||
|
|
||||||
if (info.IsKids)
|
if (info.IsKids)
|
||||||
{
|
{
|
||||||
tags.Add("Kids");
|
tags.Add("Kids");
|
||||||
}
|
}
|
||||||
|
|
||||||
if (info.IsRepeat)
|
if (info.IsRepeat)
|
||||||
{
|
{
|
||||||
tags.Add("Repeat");
|
tags.Add("Repeat");
|
||||||
}
|
}
|
||||||
|
|
||||||
if (info.IsMovie)
|
if (info.IsMovie)
|
||||||
{
|
{
|
||||||
tags.Add("Movie");
|
tags.Add("Movie");
|
||||||
}
|
}
|
||||||
|
|
||||||
if (isSeries)
|
if (isSeries)
|
||||||
{
|
{
|
||||||
tags.Add("Series");
|
tags.Add("Series");
|
||||||
|
@ -635,6 +644,7 @@ namespace Emby.Server.Implementations.LiveTv
|
||||||
{
|
{
|
||||||
forceUpdate = true;
|
forceUpdate = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
item.IsSeries = isSeries;
|
item.IsSeries = isSeries;
|
||||||
|
|
||||||
item.Name = info.Name;
|
item.Name = info.Name;
|
||||||
|
@ -652,12 +662,14 @@ namespace Emby.Server.Implementations.LiveTv
|
||||||
{
|
{
|
||||||
forceUpdate = true;
|
forceUpdate = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
item.StartDate = info.StartDate;
|
item.StartDate = info.StartDate;
|
||||||
|
|
||||||
if (item.EndDate != info.EndDate)
|
if (item.EndDate != info.EndDate)
|
||||||
{
|
{
|
||||||
forceUpdate = true;
|
forceUpdate = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
item.EndDate = info.EndDate;
|
item.EndDate = info.EndDate;
|
||||||
|
|
||||||
item.ProductionYear = info.ProductionYear;
|
item.ProductionYear = info.ProductionYear;
|
||||||
|
|
|
@ -35,7 +35,7 @@ namespace Emby.Server.Implementations.LiveTv
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Creates the triggers that define when the task will run
|
/// Creates the triggers that define when the task will run.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
/// <returns>IEnumerable{BaseTaskTrigger}.</returns>
|
/// <returns>IEnumerable{BaseTaskTrigger}.</returns>
|
||||||
public IEnumerable<TaskTriggerInfo> GetDefaultTriggers()
|
public IEnumerable<TaskTriggerInfo> GetDefaultTriggers()
|
||||||
|
|
|
@ -170,6 +170,7 @@ namespace Emby.Server.Implementations.LiveTv.TunerHosts.HdHomerun
|
||||||
_modelCache[cacheKey] = response;
|
_modelCache[cacheKey] = response;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
return response;
|
return response;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -201,6 +202,7 @@ namespace Emby.Server.Implementations.LiveTv.TunerHosts.HdHomerun
|
||||||
var name = line.Substring(0, index - 1);
|
var name = line.Substring(0, index - 1);
|
||||||
var currentChannel = line.Substring(index + 7);
|
var currentChannel = line.Substring(index + 7);
|
||||||
if (currentChannel != "none") { status = LiveTvTunerStatus.LiveTv; } else { status = LiveTvTunerStatus.Available; }
|
if (currentChannel != "none") { status = LiveTvTunerStatus.LiveTv; } else { status = LiveTvTunerStatus.Available; }
|
||||||
|
|
||||||
tuners.Add(new LiveTvTunerInfo
|
tuners.Add(new LiveTvTunerInfo
|
||||||
{
|
{
|
||||||
Name = name,
|
Name = name,
|
||||||
|
@ -229,11 +231,13 @@ namespace Emby.Server.Implementations.LiveTv.TunerHosts.HdHomerun
|
||||||
inside = true;
|
inside = true;
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (let == '>')
|
if (let == '>')
|
||||||
{
|
{
|
||||||
inside = false;
|
inside = false;
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!inside)
|
if (!inside)
|
||||||
{
|
{
|
||||||
buffer[bufferIndex] = let;
|
buffer[bufferIndex] = let;
|
||||||
|
@ -331,12 +335,19 @@ namespace Emby.Server.Implementations.LiveTv.TunerHosts.HdHomerun
|
||||||
private class Channels
|
private class Channels
|
||||||
{
|
{
|
||||||
public string GuideNumber { get; set; }
|
public string GuideNumber { get; set; }
|
||||||
|
|
||||||
public string GuideName { get; set; }
|
public string GuideName { get; set; }
|
||||||
|
|
||||||
public string VideoCodec { get; set; }
|
public string VideoCodec { get; set; }
|
||||||
|
|
||||||
public string AudioCodec { get; set; }
|
public string AudioCodec { get; set; }
|
||||||
|
|
||||||
public string URL { get; set; }
|
public string URL { get; set; }
|
||||||
|
|
||||||
public bool Favorite { get; set; }
|
public bool Favorite { get; set; }
|
||||||
|
|
||||||
public bool DRM { get; set; }
|
public bool DRM { get; set; }
|
||||||
|
|
||||||
public int HD { get; set; }
|
public int HD { get; set; }
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -657,13 +668,21 @@ namespace Emby.Server.Implementations.LiveTv.TunerHosts.HdHomerun
|
||||||
public class DiscoverResponse
|
public class DiscoverResponse
|
||||||
{
|
{
|
||||||
public string FriendlyName { get; set; }
|
public string FriendlyName { get; set; }
|
||||||
|
|
||||||
public string ModelNumber { get; set; }
|
public string ModelNumber { get; set; }
|
||||||
|
|
||||||
public string FirmwareName { get; set; }
|
public string FirmwareName { get; set; }
|
||||||
|
|
||||||
public string FirmwareVersion { get; set; }
|
public string FirmwareVersion { get; set; }
|
||||||
|
|
||||||
public string DeviceID { get; set; }
|
public string DeviceID { get; set; }
|
||||||
|
|
||||||
public string DeviceAuth { get; set; }
|
public string DeviceAuth { get; set; }
|
||||||
|
|
||||||
public string BaseURL { get; set; }
|
public string BaseURL { get; set; }
|
||||||
|
|
||||||
public string LineupURL { get; set; }
|
public string LineupURL { get; set; }
|
||||||
|
|
||||||
public int TunerCount { get; set; }
|
public int TunerCount { get; set; }
|
||||||
|
|
||||||
public bool SupportsTranscoding
|
public bool SupportsTranscoding
|
||||||
|
|
|
@ -58,12 +58,15 @@ namespace Emby.Server.Implementations.LiveTv.TunerHosts
|
||||||
protected virtual int EmptyReadLimit => 1000;
|
protected virtual int EmptyReadLimit => 1000;
|
||||||
|
|
||||||
public MediaSourceInfo OriginalMediaSource { get; set; }
|
public MediaSourceInfo OriginalMediaSource { get; set; }
|
||||||
|
|
||||||
public MediaSourceInfo MediaSource { get; set; }
|
public MediaSourceInfo MediaSource { get; set; }
|
||||||
|
|
||||||
public int ConsumerCount { get; set; }
|
public int ConsumerCount { get; set; }
|
||||||
|
|
||||||
public string OriginalStreamId { get; set; }
|
public string OriginalStreamId { get; set; }
|
||||||
|
|
||||||
public bool EnableStreamSharing { get; set; }
|
public bool EnableStreamSharing { get; set; }
|
||||||
|
|
||||||
public string UniqueId { get; }
|
public string UniqueId { get; }
|
||||||
|
|
||||||
public string TunerHostId { get; }
|
public string TunerHostId { get; }
|
||||||
|
|
|
@ -62,13 +62,13 @@
|
||||||
"NotificationOptionPluginInstalled": "প্লাগিন ইন্সটল করা হয়েছে",
|
"NotificationOptionPluginInstalled": "প্লাগিন ইন্সটল করা হয়েছে",
|
||||||
"NotificationOptionPluginError": "প্লাগিন ব্যর্থ",
|
"NotificationOptionPluginError": "প্লাগিন ব্যর্থ",
|
||||||
"NotificationOptionNewLibraryContent": "নতুন কন্টেন্ট যোগ করা হয়েছে",
|
"NotificationOptionNewLibraryContent": "নতুন কন্টেন্ট যোগ করা হয়েছে",
|
||||||
"NotificationOptionInstallationFailed": "ইন্সটল ব্যর্থ",
|
"NotificationOptionInstallationFailed": "ইন্সটল ব্যর্থ হয়েছে",
|
||||||
"NotificationOptionCameraImageUploaded": "ক্যামেরার ছবি আপলোড হয়েছে",
|
"NotificationOptionCameraImageUploaded": "ক্যামেরার ছবি আপলোড হয়েছে",
|
||||||
"NotificationOptionAudioPlaybackStopped": "গান বাজা বন্ধ হয়েছে",
|
"NotificationOptionAudioPlaybackStopped": "গান বাজা বন্ধ হয়েছে",
|
||||||
"NotificationOptionAudioPlayback": "গান বাজা শুরু হয়েছে",
|
"NotificationOptionAudioPlayback": "গান বাজা শুরু হয়েছে",
|
||||||
"NotificationOptionApplicationUpdateInstalled": "এপ্লিকেশনের আপডেট ইনস্টল করা হয়েছে",
|
"NotificationOptionApplicationUpdateInstalled": "এপ্লিকেশনের আপডেট ইনস্টল করা হয়েছে",
|
||||||
"NotificationOptionApplicationUpdateAvailable": "এপ্লিকেশনের আপডেট রয়েছে",
|
"NotificationOptionApplicationUpdateAvailable": "এপ্লিকেশনের আপডেট রয়েছে",
|
||||||
"NewVersionIsAvailable": "জেলিফিন সার্ভারের একটি নতুন ভার্শন ডাউনলোডের জন্য তৈরী",
|
"NewVersionIsAvailable": "জেলিফিন সার্ভারের একটি নতুন ভার্শন ডাউনলোডের জন্য তৈরী।",
|
||||||
"NameSeasonUnknown": "সিজন অজানা",
|
"NameSeasonUnknown": "সিজন অজানা",
|
||||||
"NameSeasonNumber": "সিজন {0}",
|
"NameSeasonNumber": "সিজন {0}",
|
||||||
"NameInstallFailed": "{0} ইন্সটল ব্যর্থ",
|
"NameInstallFailed": "{0} ইন্সটল ব্যর্থ",
|
||||||
|
@ -100,5 +100,18 @@
|
||||||
"TaskCleanCacheDescription": "সিস্টেমে আর প্রয়োজন নেই ক্যাশ, ফাইলগুলি মুছে ফেলুন।",
|
"TaskCleanCacheDescription": "সিস্টেমে আর প্রয়োজন নেই ক্যাশ, ফাইলগুলি মুছে ফেলুন।",
|
||||||
"TaskCleanCache": "ক্লিন ক্যাশ ডিরেক্টরি",
|
"TaskCleanCache": "ক্লিন ক্যাশ ডিরেক্টরি",
|
||||||
"TasksChannelsCategory": "ইন্টারনেট চ্যানেল",
|
"TasksChannelsCategory": "ইন্টারনেট চ্যানেল",
|
||||||
"TasksApplicationCategory": "আবেদন"
|
"TasksApplicationCategory": "আবেদন",
|
||||||
|
"TaskDownloadMissingSubtitlesDescription": "মেটাডেটা কনফিগারেশনের উপর ভিত্তি করে অনুপস্থিত সাবটাইটেলগুলির জন্য ইন্টারনেট অনুসন্ধান করে।",
|
||||||
|
"TaskDownloadMissingSubtitles": "অনুপস্থিত সাবটাইটেলগুলি ডাউনলোড করুন",
|
||||||
|
"TaskRefreshChannelsDescription": "ইন্টারনেট চ্যানেল তথ্য রিফ্রেশ করুন।",
|
||||||
|
"TaskRefreshChannels": "চ্যানেল রিফ্রেশ করুন",
|
||||||
|
"TaskCleanTranscodeDescription": "এক দিনেরও বেশি পুরানো ট্রান্সকোড ফাইলগুলি মুছে ফেলুন।",
|
||||||
|
"TaskCleanTranscode": "ট্রান্সকোড ডিরেক্টরি ক্লিন করুন",
|
||||||
|
"TaskUpdatePluginsDescription": "স্বয়ংক্রিয়ভাবে আপডেট কনফিগার করা প্লাগইনগুলির জন্য আপডেট ডাউনলোড এবং ইনস্টল করুন।",
|
||||||
|
"TaskUpdatePlugins": "প্লাগইন আপডেট করুন",
|
||||||
|
"TaskRefreshPeopleDescription": "আপনার মিডিয়া লাইব্রেরিতে অভিনেতা এবং পরিচালকদের জন্য মেটাডাটা আপডেট করুন।",
|
||||||
|
"TaskRefreshPeople": "পিপল রিফ্রেশ করুন",
|
||||||
|
"TaskCleanLogsDescription": "{0} দিনের বেশী পুরানো লগ ফাইলগুলি মুছে ফেলুন।",
|
||||||
|
"TaskCleanLogs": "লগ ডিরেক্টরি ক্লিন করুন",
|
||||||
|
"TaskRefreshLibraryDescription": "নতুন ফাইলের জন্য মিডিয়া লাইব্রেরি স্ক্যান এবং মেটাডাটা রিফ্রেশ করুন।"
|
||||||
}
|
}
|
||||||
|
|
|
@ -109,9 +109,10 @@
|
||||||
"TaskCleanLogs": "Nettoyer le répertoire des journaux",
|
"TaskCleanLogs": "Nettoyer le répertoire des journaux",
|
||||||
"TaskRefreshLibraryDescription": "Analyse votre bibliothèque média pour trouver de nouveaux fichiers et rafraîchit les métadonnées.",
|
"TaskRefreshLibraryDescription": "Analyse votre bibliothèque média pour trouver de nouveaux fichiers et rafraîchit les métadonnées.",
|
||||||
"TaskRefreshChapterImages": "Extraire les images de chapitre",
|
"TaskRefreshChapterImages": "Extraire les images de chapitre",
|
||||||
"TaskRefreshChapterImagesDescription": "Créer des vignettes pour les vidéos qui ont des chapitres",
|
"TaskRefreshChapterImagesDescription": "Créer des vignettes pour les vidéos qui ont des chapitres.",
|
||||||
"TaskRefreshLibrary": "Analyser la bibliothèque de médias",
|
"TaskRefreshLibrary": "Analyser la bibliothèque de médias",
|
||||||
"TaskCleanCache": "Nettoyer le répertoire des fichiers temporaires",
|
"TaskCleanCache": "Nettoyer le répertoire des fichiers temporaires",
|
||||||
"TasksApplicationCategory": "Application",
|
"TasksApplicationCategory": "Application",
|
||||||
"TaskCleanCacheDescription": "Supprime les fichiers temporaires qui ne sont plus nécessaire pour le système."
|
"TaskCleanCacheDescription": "Supprime les fichiers temporaires qui ne sont plus nécessaire pour le système.",
|
||||||
|
"TasksChannelsCategory": "Canaux Internet"
|
||||||
}
|
}
|
||||||
|
|
|
@ -411,7 +411,7 @@ namespace Emby.Server.Implementations.Networking
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Gets a random port number that is currently available
|
/// Gets a random port number that is currently available.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
/// <returns>System.Int32.</returns>
|
/// <returns>System.Int32.</returns>
|
||||||
public int GetRandomUnusedTcpPort()
|
public int GetRandomUnusedTcpPort()
|
||||||
|
|
|
@ -401,6 +401,7 @@ namespace Emby.Server.Implementations.Playlists
|
||||||
{
|
{
|
||||||
entry.Duration = TimeSpan.FromTicks(child.RunTimeTicks.Value);
|
entry.Duration = TimeSpan.FromTicks(child.RunTimeTicks.Value);
|
||||||
}
|
}
|
||||||
|
|
||||||
playlist.PlaylistEntries.Add(entry);
|
playlist.PlaylistEntries.Add(entry);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -466,7 +467,7 @@ namespace Emby.Server.Implementations.Playlists
|
||||||
playlist.PlaylistEntries.Add(entry);
|
playlist.PlaylistEntries.Add(entry);
|
||||||
}
|
}
|
||||||
|
|
||||||
string text = new M3u8Content().ToText(playlist);
|
string text = new M3uContent().ToText(playlist);
|
||||||
File.WriteAllText(playlistPath, text);
|
File.WriteAllText(playlistPath, text);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -18,7 +18,7 @@ using Microsoft.Extensions.Logging;
|
||||||
namespace Emby.Server.Implementations.ScheduledTasks
|
namespace Emby.Server.Implementations.ScheduledTasks
|
||||||
{
|
{
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Class ScheduledTaskWorker
|
/// Class ScheduledTaskWorker.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public class ScheduledTaskWorker : IScheduledTaskWorker
|
public class ScheduledTaskWorker : IScheduledTaskWorker
|
||||||
{
|
{
|
||||||
|
@ -111,11 +111,11 @@ namespace Emby.Server.Implementations.ScheduledTasks
|
||||||
|
|
||||||
private bool _readFromFile = false;
|
private bool _readFromFile = false;
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// The _last execution result
|
/// The _last execution result.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
private TaskResult _lastExecutionResult;
|
private TaskResult _lastExecutionResult;
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// The _last execution result sync lock
|
/// The _last execution result sync lock.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
private readonly object _lastExecutionResultSyncLock = new object();
|
private readonly object _lastExecutionResultSyncLock = new object();
|
||||||
/// <summary>
|
/// <summary>
|
||||||
|
@ -143,12 +143,14 @@ namespace Emby.Server.Implementations.ScheduledTasks
|
||||||
Logger.LogError(ex, "Error deserializing {File}", path);
|
Logger.LogError(ex, "Error deserializing {File}", path);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
_readFromFile = true;
|
_readFromFile = true;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
return _lastExecutionResult;
|
return _lastExecutionResult;
|
||||||
}
|
}
|
||||||
|
|
||||||
private set
|
private set
|
||||||
{
|
{
|
||||||
_lastExecutionResult = value;
|
_lastExecutionResult = value;
|
||||||
|
@ -182,7 +184,7 @@ namespace Emby.Server.Implementations.ScheduledTasks
|
||||||
public string Category => ScheduledTask.Category;
|
public string Category => ScheduledTask.Category;
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Gets the current cancellation token
|
/// Gets the current cancellation token.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
/// <value>The current cancellation token source.</value>
|
/// <value>The current cancellation token source.</value>
|
||||||
private CancellationTokenSource CurrentCancellationTokenSource { get; set; }
|
private CancellationTokenSource CurrentCancellationTokenSource { get; set; }
|
||||||
|
@ -261,6 +263,7 @@ namespace Emby.Server.Implementations.ScheduledTasks
|
||||||
var triggers = InternalTriggers;
|
var triggers = InternalTriggers;
|
||||||
return triggers.Select(i => i.Item1).ToArray();
|
return triggers.Select(i => i.Item1).ToArray();
|
||||||
}
|
}
|
||||||
|
|
||||||
set
|
set
|
||||||
{
|
{
|
||||||
if (value == null)
|
if (value == null)
|
||||||
|
@ -278,7 +281,7 @@ namespace Emby.Server.Implementations.ScheduledTasks
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// The _id
|
/// The _id.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
private string _id;
|
private string _id;
|
||||||
|
|
||||||
|
@ -358,7 +361,7 @@ namespace Emby.Server.Implementations.ScheduledTasks
|
||||||
private Task _currentTask;
|
private Task _currentTask;
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Executes the task
|
/// Executes the task.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
/// <param name="options">Task options.</param>
|
/// <param name="options">Task options.</param>
|
||||||
/// <returns>Task.</returns>
|
/// <returns>Task.</returns>
|
||||||
|
@ -453,7 +456,7 @@ namespace Emby.Server.Implementations.ScheduledTasks
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Stops the task if it is currently executing
|
/// Stops the task if it is currently executing.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
/// <exception cref="InvalidOperationException">Cannot cancel a Task unless it is in the Running state.</exception>
|
/// <exception cref="InvalidOperationException">Cannot cancel a Task unless it is in the Running state.</exception>
|
||||||
public void Cancel()
|
public void Cancel()
|
||||||
|
@ -640,6 +643,7 @@ namespace Emby.Server.Implementations.ScheduledTasks
|
||||||
Logger.LogError(ex, "Error calling CancellationToken.Cancel();");
|
Logger.LogError(ex, "Error calling CancellationToken.Cancel();");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
var task = _currentTask;
|
var task = _currentTask;
|
||||||
if (task != null)
|
if (task != null)
|
||||||
{
|
{
|
||||||
|
@ -675,6 +679,7 @@ namespace Emby.Server.Implementations.ScheduledTasks
|
||||||
Logger.LogError(ex, "Error calling CancellationToken.Dispose();");
|
Logger.LogError(ex, "Error calling CancellationToken.Dispose();");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (wassRunning)
|
if (wassRunning)
|
||||||
{
|
{
|
||||||
OnTaskCompleted(startTime, DateTime.UtcNow, TaskCompletionStatus.Aborted, null);
|
OnTaskCompleted(startTime, DateTime.UtcNow, TaskCompletionStatus.Aborted, null);
|
||||||
|
@ -683,7 +688,7 @@ namespace Emby.Server.Implementations.ScheduledTasks
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Converts a TaskTriggerInfo into a concrete BaseTaskTrigger
|
/// Converts a TaskTriggerInfo into a concrete BaseTaskTrigger.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
/// <param name="info">The info.</param>
|
/// <param name="info">The info.</param>
|
||||||
/// <returns>BaseTaskTrigger.</returns>
|
/// <returns>BaseTaskTrigger.</returns>
|
||||||
|
@ -753,7 +758,7 @@ namespace Emby.Server.Implementations.ScheduledTasks
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Disposes each trigger
|
/// Disposes each trigger.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
private void DisposeTriggers()
|
private void DisposeTriggers()
|
||||||
{
|
{
|
||||||
|
|
|
@ -15,7 +15,7 @@ using Microsoft.Extensions.Logging;
|
||||||
namespace Emby.Server.Implementations.ScheduledTasks
|
namespace Emby.Server.Implementations.ScheduledTasks
|
||||||
{
|
{
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Class TaskManager
|
/// Class TaskManager.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public class TaskManager : ITaskManager
|
public class TaskManager : ITaskManager
|
||||||
{
|
{
|
||||||
|
@ -23,13 +23,13 @@ namespace Emby.Server.Implementations.ScheduledTasks
|
||||||
public event EventHandler<TaskCompletionEventArgs> TaskCompleted;
|
public event EventHandler<TaskCompletionEventArgs> TaskCompleted;
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Gets the list of Scheduled Tasks
|
/// Gets the list of Scheduled Tasks.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
/// <value>The scheduled tasks.</value>
|
/// <value>The scheduled tasks.</value>
|
||||||
public IScheduledTaskWorker[] ScheduledTasks { get; private set; }
|
public IScheduledTaskWorker[] ScheduledTasks { get; private set; }
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// The _task queue
|
/// The _task queue.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
private readonly ConcurrentQueue<Tuple<Type, TaskOptions>> _taskQueue =
|
private readonly ConcurrentQueue<Tuple<Type, TaskOptions>> _taskQueue =
|
||||||
new ConcurrentQueue<Tuple<Type, TaskOptions>>();
|
new ConcurrentQueue<Tuple<Type, TaskOptions>>();
|
||||||
|
@ -81,7 +81,7 @@ namespace Emby.Server.Implementations.ScheduledTasks
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Cancels if running
|
/// Cancels if running.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
/// <typeparam name="T"></typeparam>
|
/// <typeparam name="T"></typeparam>
|
||||||
public void CancelIfRunning<T>()
|
public void CancelIfRunning<T>()
|
||||||
|
|
|
@ -13,7 +13,7 @@ using MediaBrowser.Model.Globalization;
|
||||||
namespace Emby.Server.Implementations.ScheduledTasks.Tasks
|
namespace Emby.Server.Implementations.ScheduledTasks.Tasks
|
||||||
{
|
{
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Deletes old cache files
|
/// Deletes old cache files.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public class DeleteCacheFileTask : IScheduledTask, IConfigurableScheduledTask
|
public class DeleteCacheFileTask : IScheduledTask, IConfigurableScheduledTask
|
||||||
{
|
{
|
||||||
|
@ -44,7 +44,7 @@ namespace Emby.Server.Implementations.ScheduledTasks.Tasks
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Creates the triggers that define when the task will run
|
/// Creates the triggers that define when the task will run.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
/// <returns>IEnumerable{BaseTaskTrigger}.</returns>
|
/// <returns>IEnumerable{BaseTaskTrigger}.</returns>
|
||||||
public IEnumerable<TaskTriggerInfo> GetDefaultTriggers()
|
public IEnumerable<TaskTriggerInfo> GetDefaultTriggers()
|
||||||
|
@ -57,7 +57,7 @@ namespace Emby.Server.Implementations.ScheduledTasks.Tasks
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Returns the task to be executed
|
/// Returns the task to be executed.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
/// <param name="cancellationToken">The cancellation token.</param>
|
/// <param name="cancellationToken">The cancellation token.</param>
|
||||||
/// <param name="progress">The progress.</param>
|
/// <param name="progress">The progress.</param>
|
||||||
|
@ -93,7 +93,7 @@ namespace Emby.Server.Implementations.ScheduledTasks.Tasks
|
||||||
|
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Deletes the cache files from directory with a last write time less than a given date
|
/// Deletes the cache files from directory with a last write time less than a given date.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
/// <param name="cancellationToken">The task cancellation token.</param>
|
/// <param name="cancellationToken">The task cancellation token.</param>
|
||||||
/// <param name="directory">The directory.</param>
|
/// <param name="directory">The directory.</param>
|
||||||
|
|
|
@ -13,7 +13,7 @@ using MediaBrowser.Model.Globalization;
|
||||||
namespace Emby.Server.Implementations.ScheduledTasks.Tasks
|
namespace Emby.Server.Implementations.ScheduledTasks.Tasks
|
||||||
{
|
{
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Deletes all transcoding temp files
|
/// Deletes all transcoding temp files.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public class DeleteTranscodeFileTask : IScheduledTask, IConfigurableScheduledTask
|
public class DeleteTranscodeFileTask : IScheduledTask, IConfigurableScheduledTask
|
||||||
{
|
{
|
||||||
|
|
|
@ -28,7 +28,7 @@ namespace Emby.Server.Implementations.ScheduledTasks
|
||||||
private Timer Timer { get; set; }
|
private Timer Timer { get; set; }
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Stars waiting for the trigger action
|
/// Stars waiting for the trigger action.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
/// <param name="lastResult">The last result.</param>
|
/// <param name="lastResult">The last result.</param>
|
||||||
/// <param name="logger">The logger.</param>
|
/// <param name="logger">The logger.</param>
|
||||||
|
@ -51,7 +51,7 @@ namespace Emby.Server.Implementations.ScheduledTasks
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Stops waiting for the trigger action
|
/// Stops waiting for the trigger action.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public void Stop()
|
public void Stop()
|
||||||
{
|
{
|
||||||
|
|
|
@ -7,7 +7,7 @@ using Microsoft.Extensions.Logging;
|
||||||
namespace Emby.Server.Implementations.ScheduledTasks
|
namespace Emby.Server.Implementations.ScheduledTasks
|
||||||
{
|
{
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Represents a task trigger that runs repeatedly on an interval
|
/// Represents a task trigger that runs repeatedly on an interval.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public class IntervalTrigger : ITaskTrigger
|
public class IntervalTrigger : ITaskTrigger
|
||||||
{
|
{
|
||||||
|
@ -31,7 +31,7 @@ namespace Emby.Server.Implementations.ScheduledTasks
|
||||||
private DateTime _lastStartDate;
|
private DateTime _lastStartDate;
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Stars waiting for the trigger action
|
/// Stars waiting for the trigger action.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
/// <param name="lastResult">The last result.</param>
|
/// <param name="lastResult">The last result.</param>
|
||||||
/// <param name="logger">The logger.</param>
|
/// <param name="logger">The logger.</param>
|
||||||
|
@ -70,7 +70,7 @@ namespace Emby.Server.Implementations.ScheduledTasks
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Stops waiting for the trigger action
|
/// Stops waiting for the trigger action.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public void Stop()
|
public void Stop()
|
||||||
{
|
{
|
||||||
|
|
|
@ -25,7 +25,7 @@ namespace Emby.Server.Implementations.ScheduledTasks
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Stars waiting for the trigger action
|
/// Stars waiting for the trigger action.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
/// <param name="lastResult">The last result.</param>
|
/// <param name="lastResult">The last result.</param>
|
||||||
/// <param name="logger">The logger.</param>
|
/// <param name="logger">The logger.</param>
|
||||||
|
@ -42,7 +42,7 @@ namespace Emby.Server.Implementations.ScheduledTasks
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Stops waiting for the trigger action
|
/// Stops waiting for the trigger action.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public void Stop()
|
public void Stop()
|
||||||
{
|
{
|
||||||
|
|
|
@ -6,12 +6,12 @@ using Microsoft.Extensions.Logging;
|
||||||
namespace Emby.Server.Implementations.ScheduledTasks
|
namespace Emby.Server.Implementations.ScheduledTasks
|
||||||
{
|
{
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Represents a task trigger that fires on a weekly basis
|
/// Represents a task trigger that fires on a weekly basis.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public class WeeklyTrigger : ITaskTrigger
|
public class WeeklyTrigger : ITaskTrigger
|
||||||
{
|
{
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Get the time of day to trigger the task to run
|
/// Get the time of day to trigger the task to run.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
/// <value>The time of day.</value>
|
/// <value>The time of day.</value>
|
||||||
public TimeSpan TimeOfDay { get; set; }
|
public TimeSpan TimeOfDay { get; set; }
|
||||||
|
@ -34,7 +34,7 @@ namespace Emby.Server.Implementations.ScheduledTasks
|
||||||
private Timer Timer { get; set; }
|
private Timer Timer { get; set; }
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Stars waiting for the trigger action
|
/// Stars waiting for the trigger action.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
/// <param name="lastResult">The last result.</param>
|
/// <param name="lastResult">The last result.</param>
|
||||||
/// <param name="logger">The logger.</param>
|
/// <param name="logger">The logger.</param>
|
||||||
|
@ -77,7 +77,7 @@ namespace Emby.Server.Implementations.ScheduledTasks
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Stops waiting for the trigger action
|
/// Stops waiting for the trigger action.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public void Stop()
|
public void Stop()
|
||||||
{
|
{
|
||||||
|
|
|
@ -180,7 +180,7 @@ namespace Emby.Server.Implementations.Services
|
||||||
=> string.Equals(method, expected, StringComparison.OrdinalIgnoreCase);
|
=> string.Equals(method, expected, StringComparison.OrdinalIgnoreCase);
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Duplicate params have their values joined together in a comma-delimited string
|
/// Duplicate params have their values joined together in a comma-delimited string.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
private static Dictionary<string, string> GetFlattenedRequestParams(HttpRequest request)
|
private static Dictionary<string, string> GetFlattenedRequestParams(HttpRequest request)
|
||||||
{
|
{
|
||||||
|
|
|
@ -9,6 +9,7 @@ namespace Emby.Server.Implementations.Services
|
||||||
public string Id { get; set; }
|
public string Id { get; set; }
|
||||||
|
|
||||||
public ActionInvokerFn ServiceAction { get; set; }
|
public ActionInvokerFn ServiceAction { get; set; }
|
||||||
|
|
||||||
public MediaBrowser.Model.Services.IHasRequestFilter[] RequestFilters { get; set; }
|
public MediaBrowser.Model.Services.IHasRequestFilter[] RequestFilters { get; set; }
|
||||||
|
|
||||||
public static string Key(Type serviceType, string method, string requestDtoName)
|
public static string Key(Type serviceType, string method, string requestDtoName)
|
||||||
|
|
|
@ -62,7 +62,9 @@ namespace Emby.Server.Implementations.Services
|
||||||
public string Path => this.restPath;
|
public string Path => this.restPath;
|
||||||
|
|
||||||
public string Summary { get; private set; }
|
public string Summary { get; private set; }
|
||||||
|
|
||||||
public string Description { get; private set; }
|
public string Description { get; private set; }
|
||||||
|
|
||||||
public bool IsHidden { get; private set; }
|
public bool IsHidden { get; private set; }
|
||||||
|
|
||||||
public static string[] GetPathPartsForMatching(string pathInfo)
|
public static string[] GetPathPartsForMatching(string pathInfo)
|
||||||
|
@ -159,6 +161,7 @@ namespace Emby.Server.Implementations.Services
|
||||||
this.isWildcard[i] = true;
|
this.isWildcard[i] = true;
|
||||||
variableName = variableName.Substring(0, variableName.Length - 1);
|
variableName = variableName.Substring(0, variableName.Length - 1);
|
||||||
}
|
}
|
||||||
|
|
||||||
this.variablesNames[i] = variableName;
|
this.variablesNames[i] = variableName;
|
||||||
this.VariableArgsCount++;
|
this.VariableArgsCount++;
|
||||||
}
|
}
|
||||||
|
|
|
@ -22,7 +22,9 @@ namespace Emby.Server.Implementations.Services
|
||||||
}
|
}
|
||||||
|
|
||||||
public Action<object, object> PropertySetFn { get; private set; }
|
public Action<object, object> PropertySetFn { get; private set; }
|
||||||
|
|
||||||
public Func<string, object> PropertyParseStringFn { get; private set; }
|
public Func<string, object> PropertyParseStringFn { get; private set; }
|
||||||
|
|
||||||
public Type PropertyType { get; private set; }
|
public Type PropertyType { get; private set; }
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -18,13 +18,21 @@ namespace Emby.Server.Implementations.Services
|
||||||
public class SwaggerSpec
|
public class SwaggerSpec
|
||||||
{
|
{
|
||||||
public string swagger { get; set; }
|
public string swagger { get; set; }
|
||||||
|
|
||||||
public string[] schemes { get; set; }
|
public string[] schemes { get; set; }
|
||||||
|
|
||||||
public SwaggerInfo info { get; set; }
|
public SwaggerInfo info { get; set; }
|
||||||
|
|
||||||
public string host { get; set; }
|
public string host { get; set; }
|
||||||
|
|
||||||
public string basePath { get; set; }
|
public string basePath { get; set; }
|
||||||
|
|
||||||
public SwaggerTag[] tags { get; set; }
|
public SwaggerTag[] tags { get; set; }
|
||||||
|
|
||||||
public IDictionary<string, Dictionary<string, SwaggerMethod>> paths { get; set; }
|
public IDictionary<string, Dictionary<string, SwaggerMethod>> paths { get; set; }
|
||||||
|
|
||||||
public Dictionary<string, SwaggerDefinition> definitions { get; set; }
|
public Dictionary<string, SwaggerDefinition> definitions { get; set; }
|
||||||
|
|
||||||
public SwaggerComponents components { get; set; }
|
public SwaggerComponents components { get; set; }
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -36,15 +44,20 @@ namespace Emby.Server.Implementations.Services
|
||||||
public class SwaggerSecurityScheme
|
public class SwaggerSecurityScheme
|
||||||
{
|
{
|
||||||
public string name { get; set; }
|
public string name { get; set; }
|
||||||
|
|
||||||
public string type { get; set; }
|
public string type { get; set; }
|
||||||
|
|
||||||
public string @in { get; set; }
|
public string @in { get; set; }
|
||||||
}
|
}
|
||||||
|
|
||||||
public class SwaggerInfo
|
public class SwaggerInfo
|
||||||
{
|
{
|
||||||
public string description { get; set; }
|
public string description { get; set; }
|
||||||
|
|
||||||
public string version { get; set; }
|
public string version { get; set; }
|
||||||
|
|
||||||
public string title { get; set; }
|
public string title { get; set; }
|
||||||
|
|
||||||
public string termsOfService { get; set; }
|
public string termsOfService { get; set; }
|
||||||
|
|
||||||
public SwaggerConcactInfo contact { get; set; }
|
public SwaggerConcactInfo contact { get; set; }
|
||||||
|
@ -53,36 +66,52 @@ namespace Emby.Server.Implementations.Services
|
||||||
public class SwaggerConcactInfo
|
public class SwaggerConcactInfo
|
||||||
{
|
{
|
||||||
public string email { get; set; }
|
public string email { get; set; }
|
||||||
|
|
||||||
public string name { get; set; }
|
public string name { get; set; }
|
||||||
|
|
||||||
public string url { get; set; }
|
public string url { get; set; }
|
||||||
}
|
}
|
||||||
|
|
||||||
public class SwaggerTag
|
public class SwaggerTag
|
||||||
{
|
{
|
||||||
public string description { get; set; }
|
public string description { get; set; }
|
||||||
|
|
||||||
public string name { get; set; }
|
public string name { get; set; }
|
||||||
}
|
}
|
||||||
|
|
||||||
public class SwaggerMethod
|
public class SwaggerMethod
|
||||||
{
|
{
|
||||||
public string summary { get; set; }
|
public string summary { get; set; }
|
||||||
|
|
||||||
public string description { get; set; }
|
public string description { get; set; }
|
||||||
|
|
||||||
public string[] tags { get; set; }
|
public string[] tags { get; set; }
|
||||||
|
|
||||||
public string operationId { get; set; }
|
public string operationId { get; set; }
|
||||||
|
|
||||||
public string[] consumes { get; set; }
|
public string[] consumes { get; set; }
|
||||||
|
|
||||||
public string[] produces { get; set; }
|
public string[] produces { get; set; }
|
||||||
|
|
||||||
public SwaggerParam[] parameters { get; set; }
|
public SwaggerParam[] parameters { get; set; }
|
||||||
|
|
||||||
public Dictionary<string, SwaggerResponse> responses { get; set; }
|
public Dictionary<string, SwaggerResponse> responses { get; set; }
|
||||||
|
|
||||||
public Dictionary<string, string[]>[] security { get; set; }
|
public Dictionary<string, string[]>[] security { get; set; }
|
||||||
}
|
}
|
||||||
|
|
||||||
public class SwaggerParam
|
public class SwaggerParam
|
||||||
{
|
{
|
||||||
public string @in { get; set; }
|
public string @in { get; set; }
|
||||||
|
|
||||||
public string name { get; set; }
|
public string name { get; set; }
|
||||||
|
|
||||||
public string description { get; set; }
|
public string description { get; set; }
|
||||||
|
|
||||||
public bool required { get; set; }
|
public bool required { get; set; }
|
||||||
|
|
||||||
public string type { get; set; }
|
public string type { get; set; }
|
||||||
|
|
||||||
public string collectionFormat { get; set; }
|
public string collectionFormat { get; set; }
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -97,15 +126,20 @@ namespace Emby.Server.Implementations.Services
|
||||||
public class SwaggerDefinition
|
public class SwaggerDefinition
|
||||||
{
|
{
|
||||||
public string type { get; set; }
|
public string type { get; set; }
|
||||||
|
|
||||||
public Dictionary<string, SwaggerProperty> properties { get; set; }
|
public Dictionary<string, SwaggerProperty> properties { get; set; }
|
||||||
}
|
}
|
||||||
|
|
||||||
public class SwaggerProperty
|
public class SwaggerProperty
|
||||||
{
|
{
|
||||||
public string type { get; set; }
|
public string type { get; set; }
|
||||||
|
|
||||||
public string format { get; set; }
|
public string format { get; set; }
|
||||||
|
|
||||||
public string description { get; set; }
|
public string description { get; set; }
|
||||||
|
|
||||||
public string[] @enum { get; set; }
|
public string[] @enum { get; set; }
|
||||||
|
|
||||||
public string @default { get; set; }
|
public string @default { get; set; }
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -9,7 +9,7 @@ namespace Emby.Server.Implementations.Services
|
||||||
/// Donated by Ivan Korneliuk from his post:
|
/// Donated by Ivan Korneliuk from his post:
|
||||||
/// http://korneliuk.blogspot.com/2012/08/servicestack-reusing-dtos.html
|
/// http://korneliuk.blogspot.com/2012/08/servicestack-reusing-dtos.html
|
||||||
///
|
///
|
||||||
/// Modified to only allow using routes matching the supplied HTTP Verb
|
/// Modified to only allow using routes matching the supplied HTTP Verb.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public static class UrlExtensions
|
public static class UrlExtensions
|
||||||
{
|
{
|
||||||
|
|
|
@ -843,7 +843,7 @@ namespace Emby.Server.Implementations.Session
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Used to report that playback has ended for an item
|
/// Used to report that playback has ended for an item.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
/// <param name="info">The info.</param>
|
/// <param name="info">The info.</param>
|
||||||
/// <returns>Task.</returns>
|
/// <returns>Task.</returns>
|
||||||
|
|
|
@ -14,7 +14,7 @@ using Microsoft.Extensions.Logging;
|
||||||
namespace Emby.Server.Implementations.Session
|
namespace Emby.Server.Implementations.Session
|
||||||
{
|
{
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Class SessionWebSocketListener
|
/// Class SessionWebSocketListener.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public sealed class SessionWebSocketListener : IWebSocketListener, IDisposable
|
public sealed class SessionWebSocketListener : IWebSocketListener, IDisposable
|
||||||
{
|
{
|
||||||
|
@ -34,12 +34,12 @@ namespace Emby.Server.Implementations.Session
|
||||||
public const float ForceKeepAliveFactor = 0.75f;
|
public const float ForceKeepAliveFactor = 0.75f;
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// The _session manager
|
/// The _session manager.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
private readonly ISessionManager _sessionManager;
|
private readonly ISessionManager _sessionManager;
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// The _logger
|
/// The _logger.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
private readonly ILogger<SessionWebSocketListener> _logger;
|
private readonly ILogger<SessionWebSocketListener> _logger;
|
||||||
private readonly ILoggerFactory _loggerFactory;
|
private readonly ILoggerFactory _loggerFactory;
|
||||||
|
@ -167,6 +167,7 @@ namespace Emby.Server.Implementations.Session
|
||||||
_logger.LogWarning("Multiple attempts to keep alive single WebSocket {0}", webSocket);
|
_logger.LogWarning("Multiple attempts to keep alive single WebSocket {0}", webSocket);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
webSocket.Closed += OnWebSocketClosed;
|
webSocket.Closed += OnWebSocketClosed;
|
||||||
webSocket.LastKeepAliveDate = DateTime.UtcNow;
|
webSocket.LastKeepAliveDate = DateTime.UtcNow;
|
||||||
|
|
||||||
|
|
|
@ -8,7 +8,7 @@ using MediaBrowser.Model.Querying;
|
||||||
namespace Emby.Server.Implementations.Sorting
|
namespace Emby.Server.Implementations.Sorting
|
||||||
{
|
{
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Class AlbumArtistComparer
|
/// Class AlbumArtistComparer.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public class AlbumArtistComparer : IBaseItemComparer
|
public class AlbumArtistComparer : IBaseItemComparer
|
||||||
{
|
{
|
||||||
|
|
|
@ -7,7 +7,7 @@ using MediaBrowser.Model.Querying;
|
||||||
namespace Emby.Server.Implementations.Sorting
|
namespace Emby.Server.Implementations.Sorting
|
||||||
{
|
{
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Class AlbumComparer
|
/// Class AlbumComparer.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public class AlbumComparer : IBaseItemComparer
|
public class AlbumComparer : IBaseItemComparer
|
||||||
{
|
{
|
||||||
|
|
|
@ -5,7 +5,7 @@ using MediaBrowser.Model.Querying;
|
||||||
namespace Emby.Server.Implementations.Sorting
|
namespace Emby.Server.Implementations.Sorting
|
||||||
{
|
{
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Class CriticRatingComparer
|
/// Class CriticRatingComparer.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public class CriticRatingComparer : IBaseItemComparer
|
public class CriticRatingComparer : IBaseItemComparer
|
||||||
{
|
{
|
||||||
|
|
|
@ -6,7 +6,7 @@ using MediaBrowser.Model.Querying;
|
||||||
namespace Emby.Server.Implementations.Sorting
|
namespace Emby.Server.Implementations.Sorting
|
||||||
{
|
{
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Class DateCreatedComparer
|
/// Class DateCreatedComparer.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public class DateCreatedComparer : IBaseItemComparer
|
public class DateCreatedComparer : IBaseItemComparer
|
||||||
{
|
{
|
||||||
|
|
|
@ -8,7 +8,7 @@ using MediaBrowser.Model.Querying;
|
||||||
namespace Emby.Server.Implementations.Sorting
|
namespace Emby.Server.Implementations.Sorting
|
||||||
{
|
{
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Class DatePlayedComparer
|
/// Class DatePlayedComparer.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public class DatePlayedComparer : IUserBaseItemComparer
|
public class DatePlayedComparer : IUserBaseItemComparer
|
||||||
{
|
{
|
||||||
|
|
|
@ -6,7 +6,7 @@ using MediaBrowser.Model.Querying;
|
||||||
namespace Emby.Server.Implementations.Sorting
|
namespace Emby.Server.Implementations.Sorting
|
||||||
{
|
{
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Class NameComparer
|
/// Class NameComparer.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public class NameComparer : IBaseItemComparer
|
public class NameComparer : IBaseItemComparer
|
||||||
{
|
{
|
||||||
|
|
|
@ -7,7 +7,7 @@ using MediaBrowser.Model.Querying;
|
||||||
namespace Emby.Server.Implementations.Sorting
|
namespace Emby.Server.Implementations.Sorting
|
||||||
{
|
{
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Class PlayCountComparer
|
/// Class PlayCountComparer.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public class PlayCountComparer : IUserBaseItemComparer
|
public class PlayCountComparer : IUserBaseItemComparer
|
||||||
{
|
{
|
||||||
|
|
|
@ -6,7 +6,7 @@ using MediaBrowser.Model.Querying;
|
||||||
namespace Emby.Server.Implementations.Sorting
|
namespace Emby.Server.Implementations.Sorting
|
||||||
{
|
{
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Class PremiereDateComparer
|
/// Class PremiereDateComparer.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public class PremiereDateComparer : IBaseItemComparer
|
public class PremiereDateComparer : IBaseItemComparer
|
||||||
{
|
{
|
||||||
|
@ -44,6 +44,7 @@ namespace Emby.Server.Implementations.Sorting
|
||||||
// Don't blow up if the item has a bad ProductionYear, just return MinValue
|
// Don't blow up if the item has a bad ProductionYear, just return MinValue
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
return DateTime.MinValue;
|
return DateTime.MinValue;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -5,7 +5,7 @@ using MediaBrowser.Model.Querying;
|
||||||
namespace Emby.Server.Implementations.Sorting
|
namespace Emby.Server.Implementations.Sorting
|
||||||
{
|
{
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Class ProductionYearComparer
|
/// Class ProductionYearComparer.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public class ProductionYearComparer : IBaseItemComparer
|
public class ProductionYearComparer : IBaseItemComparer
|
||||||
{
|
{
|
||||||
|
|
|
@ -6,7 +6,7 @@ using MediaBrowser.Model.Querying;
|
||||||
namespace Emby.Server.Implementations.Sorting
|
namespace Emby.Server.Implementations.Sorting
|
||||||
{
|
{
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Class RandomComparer
|
/// Class RandomComparer.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public class RandomComparer : IBaseItemComparer
|
public class RandomComparer : IBaseItemComparer
|
||||||
{
|
{
|
||||||
|
|
|
@ -6,7 +6,7 @@ using MediaBrowser.Model.Querying;
|
||||||
namespace Emby.Server.Implementations.Sorting
|
namespace Emby.Server.Implementations.Sorting
|
||||||
{
|
{
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Class RuntimeComparer
|
/// Class RuntimeComparer.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public class RuntimeComparer : IBaseItemComparer
|
public class RuntimeComparer : IBaseItemComparer
|
||||||
{
|
{
|
||||||
|
|
|
@ -6,7 +6,7 @@ using MediaBrowser.Model.Querying;
|
||||||
namespace Emby.Server.Implementations.Sorting
|
namespace Emby.Server.Implementations.Sorting
|
||||||
{
|
{
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Class SortNameComparer
|
/// Class SortNameComparer.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public class SortNameComparer : IBaseItemComparer
|
public class SortNameComparer : IBaseItemComparer
|
||||||
{
|
{
|
||||||
|
|
|
@ -256,6 +256,7 @@ namespace Emby.Server.Implementations.TV
|
||||||
{
|
{
|
||||||
items = items.Skip(query.StartIndex.Value);
|
items = items.Skip(query.StartIndex.Value);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (query.Limit.HasValue)
|
if (query.Limit.HasValue)
|
||||||
{
|
{
|
||||||
items = items.Take(query.Limit.Value);
|
items = items.Take(query.Limit.Value);
|
||||||
|
|
|
@ -18,7 +18,7 @@ namespace Emby.Server.Implementations.Udp
|
||||||
public sealed class UdpServer : IDisposable
|
public sealed class UdpServer : IDisposable
|
||||||
{
|
{
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// The _logger
|
/// The _logger.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
private readonly ILogger _logger;
|
private readonly ILogger _logger;
|
||||||
private readonly IServerApplicationHost _appHost;
|
private readonly IServerApplicationHost _appHost;
|
||||||
|
|
|
@ -16,7 +16,7 @@
|
||||||
<PackageReference Include="Microsoft.AspNetCore.Authentication" Version="2.2.0" />
|
<PackageReference Include="Microsoft.AspNetCore.Authentication" Version="2.2.0" />
|
||||||
<PackageReference Include="Microsoft.AspNetCore.Authorization" Version="3.1.5" />
|
<PackageReference Include="Microsoft.AspNetCore.Authorization" Version="3.1.5" />
|
||||||
<PackageReference Include="Microsoft.AspNetCore.Mvc" Version="2.2.0" />
|
<PackageReference Include="Microsoft.AspNetCore.Mvc" Version="2.2.0" />
|
||||||
<PackageReference Include="Swashbuckle.AspNetCore" Version="5.0.0" />
|
<PackageReference Include="Swashbuckle.AspNetCore" Version="5.4.1" />
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
|
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
|
|
|
@ -24,7 +24,7 @@ namespace Jellyfin.Data.Entities
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Public constructor with required data
|
/// Public constructor with required data.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
/// <param name="path"></param>
|
/// <param name="path"></param>
|
||||||
/// <param name="kind"></param>
|
/// <param name="kind"></param>
|
||||||
|
@ -64,7 +64,7 @@ namespace Jellyfin.Data.Entities
|
||||||
*************************************************************************/
|
*************************************************************************/
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Backing field for Id
|
/// Backing field for Id.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
internal int _Id;
|
internal int _Id;
|
||||||
/// <summary>
|
/// <summary>
|
||||||
|
@ -77,7 +77,7 @@ namespace Jellyfin.Data.Entities
|
||||||
partial void GetId(ref int result);
|
partial void GetId(ref int result);
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Identity, Indexed, Required
|
/// Identity, Indexed, Required.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
[Key]
|
[Key]
|
||||||
[Required]
|
[Required]
|
||||||
|
@ -89,6 +89,7 @@ namespace Jellyfin.Data.Entities
|
||||||
GetId(ref value);
|
GetId(ref value);
|
||||||
return (_Id = value);
|
return (_Id = value);
|
||||||
}
|
}
|
||||||
|
|
||||||
protected set
|
protected set
|
||||||
{
|
{
|
||||||
int oldValue = _Id;
|
int oldValue = _Id;
|
||||||
|
@ -101,7 +102,7 @@ namespace Jellyfin.Data.Entities
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Backing field for Path
|
/// Backing field for Path.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
protected string _Path;
|
protected string _Path;
|
||||||
/// <summary>
|
/// <summary>
|
||||||
|
@ -127,6 +128,7 @@ namespace Jellyfin.Data.Entities
|
||||||
GetPath(ref value);
|
GetPath(ref value);
|
||||||
return (_Path = value);
|
return (_Path = value);
|
||||||
}
|
}
|
||||||
|
|
||||||
set
|
set
|
||||||
{
|
{
|
||||||
string oldValue = _Path;
|
string oldValue = _Path;
|
||||||
|
@ -139,7 +141,7 @@ namespace Jellyfin.Data.Entities
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Backing field for Kind
|
/// Backing field for Kind.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
internal Enums.ArtKind _Kind;
|
internal Enums.ArtKind _Kind;
|
||||||
/// <summary>
|
/// <summary>
|
||||||
|
@ -152,7 +154,7 @@ namespace Jellyfin.Data.Entities
|
||||||
partial void GetKind(ref Enums.ArtKind result);
|
partial void GetKind(ref Enums.ArtKind result);
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Indexed, Required
|
/// Indexed, Required.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
[Required]
|
[Required]
|
||||||
public Enums.ArtKind Kind
|
public Enums.ArtKind Kind
|
||||||
|
@ -163,6 +165,7 @@ namespace Jellyfin.Data.Entities
|
||||||
GetKind(ref value);
|
GetKind(ref value);
|
||||||
return (_Kind = value);
|
return (_Kind = value);
|
||||||
}
|
}
|
||||||
|
|
||||||
set
|
set
|
||||||
{
|
{
|
||||||
Enums.ArtKind oldValue = _Kind;
|
Enums.ArtKind oldValue = _Kind;
|
||||||
|
@ -175,7 +178,7 @@ namespace Jellyfin.Data.Entities
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Required, ConcurrenyToken
|
/// Required, ConcurrenyToken.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
[ConcurrencyCheck]
|
[ConcurrencyCheck]
|
||||||
[Required]
|
[Required]
|
||||||
|
|
|
@ -28,7 +28,7 @@ namespace Jellyfin.Data.Entities
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Public constructor with required data
|
/// Public constructor with required data.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
/// <param name="urlid">This is whats gets displayed in the Urls and API requests. This could also be a string.</param>
|
/// <param name="urlid">This is whats gets displayed in the Urls and API requests. This could also be a string.</param>
|
||||||
public Book(Guid urlid, DateTime dateadded)
|
public Book(Guid urlid, DateTime dateadded)
|
||||||
|
|
|
@ -27,7 +27,7 @@ namespace Jellyfin.Data.Entities
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Public constructor with required data
|
/// Public constructor with required data.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
/// <param name="title">The title or name of the object</param>
|
/// <param name="title">The title or name of the object</param>
|
||||||
/// <param name="language">ISO-639-3 3-character language codes</param>
|
/// <param name="language">ISO-639-3 3-character language codes</param>
|
||||||
|
@ -64,7 +64,7 @@ namespace Jellyfin.Data.Entities
|
||||||
*************************************************************************/
|
*************************************************************************/
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Backing field for ISBN
|
/// Backing field for ISBN.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
protected long? _ISBN;
|
protected long? _ISBN;
|
||||||
/// <summary>
|
/// <summary>
|
||||||
|
@ -84,6 +84,7 @@ namespace Jellyfin.Data.Entities
|
||||||
GetISBN(ref value);
|
GetISBN(ref value);
|
||||||
return (_ISBN = value);
|
return (_ISBN = value);
|
||||||
}
|
}
|
||||||
|
|
||||||
set
|
set
|
||||||
{
|
{
|
||||||
long? oldValue = _ISBN;
|
long? oldValue = _ISBN;
|
||||||
|
|
|
@ -25,7 +25,7 @@ namespace Jellyfin.Data.Entities
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Public constructor with required data
|
/// Public constructor with required data.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
/// <param name="language">ISO-639-3 3-character language codes</param>
|
/// <param name="language">ISO-639-3 3-character language codes</param>
|
||||||
/// <param name="timestart"></param>
|
/// <param name="timestart"></param>
|
||||||
|
@ -60,7 +60,7 @@ namespace Jellyfin.Data.Entities
|
||||||
*************************************************************************/
|
*************************************************************************/
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Backing field for Id
|
/// Backing field for Id.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
internal int _Id;
|
internal int _Id;
|
||||||
/// <summary>
|
/// <summary>
|
||||||
|
@ -73,7 +73,7 @@ namespace Jellyfin.Data.Entities
|
||||||
partial void GetId(ref int result);
|
partial void GetId(ref int result);
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Identity, Indexed, Required
|
/// Identity, Indexed, Required.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
[Key]
|
[Key]
|
||||||
[Required]
|
[Required]
|
||||||
|
@ -86,6 +86,7 @@ namespace Jellyfin.Data.Entities
|
||||||
GetId(ref value);
|
GetId(ref value);
|
||||||
return (_Id = value);
|
return (_Id = value);
|
||||||
}
|
}
|
||||||
|
|
||||||
protected set
|
protected set
|
||||||
{
|
{
|
||||||
int oldValue = _Id;
|
int oldValue = _Id;
|
||||||
|
@ -98,7 +99,7 @@ namespace Jellyfin.Data.Entities
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Backing field for Name
|
/// Backing field for Name.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
protected string _Name;
|
protected string _Name;
|
||||||
/// <summary>
|
/// <summary>
|
||||||
|
@ -123,6 +124,7 @@ namespace Jellyfin.Data.Entities
|
||||||
GetName(ref value);
|
GetName(ref value);
|
||||||
return (_Name = value);
|
return (_Name = value);
|
||||||
}
|
}
|
||||||
|
|
||||||
set
|
set
|
||||||
{
|
{
|
||||||
string oldValue = _Name;
|
string oldValue = _Name;
|
||||||
|
@ -135,7 +137,7 @@ namespace Jellyfin.Data.Entities
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Backing field for Language
|
/// Backing field for Language.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
protected string _Language;
|
protected string _Language;
|
||||||
/// <summary>
|
/// <summary>
|
||||||
|
@ -149,7 +151,7 @@ namespace Jellyfin.Data.Entities
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Required, Min length = 3, Max length = 3
|
/// Required, Min length = 3, Max length = 3
|
||||||
/// ISO-639-3 3-character language codes
|
/// ISO-639-3 3-character language codes.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
[Required]
|
[Required]
|
||||||
[MinLength(3)]
|
[MinLength(3)]
|
||||||
|
@ -163,6 +165,7 @@ namespace Jellyfin.Data.Entities
|
||||||
GetLanguage(ref value);
|
GetLanguage(ref value);
|
||||||
return (_Language = value);
|
return (_Language = value);
|
||||||
}
|
}
|
||||||
|
|
||||||
set
|
set
|
||||||
{
|
{
|
||||||
string oldValue = _Language;
|
string oldValue = _Language;
|
||||||
|
@ -175,7 +178,7 @@ namespace Jellyfin.Data.Entities
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Backing field for TimeStart
|
/// Backing field for TimeStart.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
protected long _TimeStart;
|
protected long _TimeStart;
|
||||||
/// <summary>
|
/// <summary>
|
||||||
|
@ -188,7 +191,7 @@ namespace Jellyfin.Data.Entities
|
||||||
partial void GetTimeStart(ref long result);
|
partial void GetTimeStart(ref long result);
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Required
|
/// Required.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
[Required]
|
[Required]
|
||||||
public long TimeStart
|
public long TimeStart
|
||||||
|
@ -199,6 +202,7 @@ namespace Jellyfin.Data.Entities
|
||||||
GetTimeStart(ref value);
|
GetTimeStart(ref value);
|
||||||
return (_TimeStart = value);
|
return (_TimeStart = value);
|
||||||
}
|
}
|
||||||
|
|
||||||
set
|
set
|
||||||
{
|
{
|
||||||
long oldValue = _TimeStart;
|
long oldValue = _TimeStart;
|
||||||
|
@ -211,7 +215,7 @@ namespace Jellyfin.Data.Entities
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Backing field for TimeEnd
|
/// Backing field for TimeEnd.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
protected long? _TimeEnd;
|
protected long? _TimeEnd;
|
||||||
/// <summary>
|
/// <summary>
|
||||||
|
@ -231,6 +235,7 @@ namespace Jellyfin.Data.Entities
|
||||||
GetTimeEnd(ref value);
|
GetTimeEnd(ref value);
|
||||||
return (_TimeEnd = value);
|
return (_TimeEnd = value);
|
||||||
}
|
}
|
||||||
|
|
||||||
set
|
set
|
||||||
{
|
{
|
||||||
long? oldValue = _TimeEnd;
|
long? oldValue = _TimeEnd;
|
||||||
|
@ -243,7 +248,7 @@ namespace Jellyfin.Data.Entities
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Required, ConcurrenyToken
|
/// Required, ConcurrenyToken.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
[ConcurrencyCheck]
|
[ConcurrencyCheck]
|
||||||
[Required]
|
[Required]
|
||||||
|
|
|
@ -9,7 +9,7 @@ namespace Jellyfin.Data.Entities
|
||||||
partial void Init();
|
partial void Init();
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Default constructor
|
/// Default constructor.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public Collection()
|
public Collection()
|
||||||
{
|
{
|
||||||
|
@ -23,7 +23,7 @@ namespace Jellyfin.Data.Entities
|
||||||
*************************************************************************/
|
*************************************************************************/
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Backing field for Id
|
/// Backing field for Id.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
internal int _Id;
|
internal int _Id;
|
||||||
/// <summary>
|
/// <summary>
|
||||||
|
@ -36,7 +36,7 @@ namespace Jellyfin.Data.Entities
|
||||||
partial void GetId(ref int result);
|
partial void GetId(ref int result);
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Identity, Indexed, Required
|
/// Identity, Indexed, Required.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
[Key]
|
[Key]
|
||||||
[Required]
|
[Required]
|
||||||
|
@ -49,6 +49,7 @@ namespace Jellyfin.Data.Entities
|
||||||
GetId(ref value);
|
GetId(ref value);
|
||||||
return (_Id = value);
|
return (_Id = value);
|
||||||
}
|
}
|
||||||
|
|
||||||
protected set
|
protected set
|
||||||
{
|
{
|
||||||
int oldValue = _Id;
|
int oldValue = _Id;
|
||||||
|
@ -61,7 +62,7 @@ namespace Jellyfin.Data.Entities
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Backing field for Name
|
/// Backing field for Name.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
protected string _Name;
|
protected string _Name;
|
||||||
/// <summary>
|
/// <summary>
|
||||||
|
@ -86,6 +87,7 @@ namespace Jellyfin.Data.Entities
|
||||||
GetName(ref value);
|
GetName(ref value);
|
||||||
return (_Name = value);
|
return (_Name = value);
|
||||||
}
|
}
|
||||||
|
|
||||||
set
|
set
|
||||||
{
|
{
|
||||||
string oldValue = _Name;
|
string oldValue = _Name;
|
||||||
|
@ -98,7 +100,7 @@ namespace Jellyfin.Data.Entities
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Required, ConcurrenyToken
|
/// Required, ConcurrenyToken.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
[ConcurrencyCheck]
|
[ConcurrencyCheck]
|
||||||
[Required]
|
[Required]
|
||||||
|
|
|
@ -28,7 +28,7 @@ namespace Jellyfin.Data.Entities
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Public constructor with required data
|
/// Public constructor with required data.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
/// <param name="_collection0"></param>
|
/// <param name="_collection0"></param>
|
||||||
/// <param name="_collectionitem1"></param>
|
/// <param name="_collectionitem1"></param>
|
||||||
|
@ -67,7 +67,7 @@ namespace Jellyfin.Data.Entities
|
||||||
*************************************************************************/
|
*************************************************************************/
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Backing field for Id
|
/// Backing field for Id.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
internal int _Id;
|
internal int _Id;
|
||||||
/// <summary>
|
/// <summary>
|
||||||
|
@ -80,7 +80,7 @@ namespace Jellyfin.Data.Entities
|
||||||
partial void GetId(ref int result);
|
partial void GetId(ref int result);
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Identity, Indexed, Required
|
/// Identity, Indexed, Required.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
[Key]
|
[Key]
|
||||||
[Required]
|
[Required]
|
||||||
|
@ -93,6 +93,7 @@ namespace Jellyfin.Data.Entities
|
||||||
GetId(ref value);
|
GetId(ref value);
|
||||||
return (_Id = value);
|
return (_Id = value);
|
||||||
}
|
}
|
||||||
|
|
||||||
protected set
|
protected set
|
||||||
{
|
{
|
||||||
int oldValue = _Id;
|
int oldValue = _Id;
|
||||||
|
@ -105,7 +106,7 @@ namespace Jellyfin.Data.Entities
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Required, ConcurrenyToken
|
/// Required, ConcurrenyToken.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
[ConcurrencyCheck]
|
[ConcurrencyCheck]
|
||||||
[Required]
|
[Required]
|
||||||
|
@ -121,7 +122,7 @@ namespace Jellyfin.Data.Entities
|
||||||
*************************************************************************/
|
*************************************************************************/
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Required
|
/// Required.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
[ForeignKey("LibraryItem_Id")]
|
[ForeignKey("LibraryItem_Id")]
|
||||||
public virtual LibraryItem LibraryItem { get; set; }
|
public virtual LibraryItem LibraryItem { get; set; }
|
||||||
|
|
|
@ -28,7 +28,7 @@ namespace Jellyfin.Data.Entities
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Public constructor with required data
|
/// Public constructor with required data.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
/// <param name="_moviemetadata0"></param>
|
/// <param name="_moviemetadata0"></param>
|
||||||
/// <param name="_seriesmetadata1"></param>
|
/// <param name="_seriesmetadata1"></param>
|
||||||
|
@ -75,7 +75,7 @@ namespace Jellyfin.Data.Entities
|
||||||
*************************************************************************/
|
*************************************************************************/
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Backing field for Id
|
/// Backing field for Id.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
internal int _Id;
|
internal int _Id;
|
||||||
/// <summary>
|
/// <summary>
|
||||||
|
@ -88,7 +88,7 @@ namespace Jellyfin.Data.Entities
|
||||||
partial void GetId(ref int result);
|
partial void GetId(ref int result);
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Identity, Indexed, Required
|
/// Identity, Indexed, Required.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
[Key]
|
[Key]
|
||||||
[Required]
|
[Required]
|
||||||
|
@ -101,6 +101,7 @@ namespace Jellyfin.Data.Entities
|
||||||
GetId(ref value);
|
GetId(ref value);
|
||||||
return (_Id = value);
|
return (_Id = value);
|
||||||
}
|
}
|
||||||
|
|
||||||
protected set
|
protected set
|
||||||
{
|
{
|
||||||
int oldValue = _Id;
|
int oldValue = _Id;
|
||||||
|
@ -113,7 +114,7 @@ namespace Jellyfin.Data.Entities
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Required, ConcurrenyToken
|
/// Required, ConcurrenyToken.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
[ConcurrencyCheck]
|
[ConcurrencyCheck]
|
||||||
[Required]
|
[Required]
|
||||||
|
|
|
@ -24,7 +24,7 @@ namespace Jellyfin.Data.Entities
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Public constructor with required data
|
/// Public constructor with required data.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
/// <param name="title">The title or name of the object</param>
|
/// <param name="title">The title or name of the object</param>
|
||||||
/// <param name="language">ISO-639-3 3-character language codes</param>
|
/// <param name="language">ISO-639-3 3-character language codes</param>
|
||||||
|
@ -60,7 +60,7 @@ namespace Jellyfin.Data.Entities
|
||||||
*************************************************************************/
|
*************************************************************************/
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Backing field for Description
|
/// Backing field for Description.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
protected string _Description;
|
protected string _Description;
|
||||||
/// <summary>
|
/// <summary>
|
||||||
|
@ -85,6 +85,7 @@ namespace Jellyfin.Data.Entities
|
||||||
GetDescription(ref value);
|
GetDescription(ref value);
|
||||||
return (_Description = value);
|
return (_Description = value);
|
||||||
}
|
}
|
||||||
|
|
||||||
set
|
set
|
||||||
{
|
{
|
||||||
string oldValue = _Description;
|
string oldValue = _Description;
|
||||||
|
@ -97,7 +98,7 @@ namespace Jellyfin.Data.Entities
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Backing field for Headquarters
|
/// Backing field for Headquarters.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
protected string _Headquarters;
|
protected string _Headquarters;
|
||||||
/// <summary>
|
/// <summary>
|
||||||
|
@ -122,6 +123,7 @@ namespace Jellyfin.Data.Entities
|
||||||
GetHeadquarters(ref value);
|
GetHeadquarters(ref value);
|
||||||
return (_Headquarters = value);
|
return (_Headquarters = value);
|
||||||
}
|
}
|
||||||
|
|
||||||
set
|
set
|
||||||
{
|
{
|
||||||
string oldValue = _Headquarters;
|
string oldValue = _Headquarters;
|
||||||
|
@ -134,7 +136,7 @@ namespace Jellyfin.Data.Entities
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Backing field for Country
|
/// Backing field for Country.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
protected string _Country;
|
protected string _Country;
|
||||||
/// <summary>
|
/// <summary>
|
||||||
|
@ -159,6 +161,7 @@ namespace Jellyfin.Data.Entities
|
||||||
GetCountry(ref value);
|
GetCountry(ref value);
|
||||||
return (_Country = value);
|
return (_Country = value);
|
||||||
}
|
}
|
||||||
|
|
||||||
set
|
set
|
||||||
{
|
{
|
||||||
string oldValue = _Country;
|
string oldValue = _Country;
|
||||||
|
@ -171,7 +174,7 @@ namespace Jellyfin.Data.Entities
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Backing field for Homepage
|
/// Backing field for Homepage.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
protected string _Homepage;
|
protected string _Homepage;
|
||||||
/// <summary>
|
/// <summary>
|
||||||
|
@ -196,6 +199,7 @@ namespace Jellyfin.Data.Entities
|
||||||
GetHomepage(ref value);
|
GetHomepage(ref value);
|
||||||
return (_Homepage = value);
|
return (_Homepage = value);
|
||||||
}
|
}
|
||||||
|
|
||||||
set
|
set
|
||||||
{
|
{
|
||||||
string oldValue = _Homepage;
|
string oldValue = _Homepage;
|
||||||
|
|
|
@ -28,7 +28,7 @@ namespace Jellyfin.Data.Entities
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Public constructor with required data
|
/// Public constructor with required data.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
/// <param name="urlid">This is whats gets displayed in the Urls and API requests. This could also be a string.</param>
|
/// <param name="urlid">This is whats gets displayed in the Urls and API requests. This could also be a string.</param>
|
||||||
public CustomItem(Guid urlid, DateTime dateadded)
|
public CustomItem(Guid urlid, DateTime dateadded)
|
||||||
|
|
|
@ -23,7 +23,7 @@ namespace Jellyfin.Data.Entities
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Public constructor with required data
|
/// Public constructor with required data.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
/// <param name="title">The title or name of the object</param>
|
/// <param name="title">The title or name of the object</param>
|
||||||
/// <param name="language">ISO-639-3 3-character language codes</param>
|
/// <param name="language">ISO-639-3 3-character language codes</param>
|
||||||
|
|
|
@ -31,7 +31,7 @@ namespace Jellyfin.Data.Entities
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Public constructor with required data
|
/// Public constructor with required data.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
/// <param name="urlid">This is whats gets displayed in the Urls and API requests. This could also be a string.</param>
|
/// <param name="urlid">This is whats gets displayed in the Urls and API requests. This could also be a string.</param>
|
||||||
/// <param name="_season0"></param>
|
/// <param name="_season0"></param>
|
||||||
|
@ -66,7 +66,7 @@ namespace Jellyfin.Data.Entities
|
||||||
*************************************************************************/
|
*************************************************************************/
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Backing field for EpisodeNumber
|
/// Backing field for EpisodeNumber.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
protected int? _EpisodeNumber;
|
protected int? _EpisodeNumber;
|
||||||
/// <summary>
|
/// <summary>
|
||||||
|
@ -86,6 +86,7 @@ namespace Jellyfin.Data.Entities
|
||||||
GetEpisodeNumber(ref value);
|
GetEpisodeNumber(ref value);
|
||||||
return (_EpisodeNumber = value);
|
return (_EpisodeNumber = value);
|
||||||
}
|
}
|
||||||
|
|
||||||
set
|
set
|
||||||
{
|
{
|
||||||
int? oldValue = _EpisodeNumber;
|
int? oldValue = _EpisodeNumber;
|
||||||
|
|
|
@ -24,7 +24,7 @@ namespace Jellyfin.Data.Entities
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Public constructor with required data
|
/// Public constructor with required data.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
/// <param name="title">The title or name of the object</param>
|
/// <param name="title">The title or name of the object</param>
|
||||||
/// <param name="language">ISO-639-3 3-character language codes</param>
|
/// <param name="language">ISO-639-3 3-character language codes</param>
|
||||||
|
@ -60,7 +60,7 @@ namespace Jellyfin.Data.Entities
|
||||||
*************************************************************************/
|
*************************************************************************/
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Backing field for Outline
|
/// Backing field for Outline.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
protected string _Outline;
|
protected string _Outline;
|
||||||
/// <summary>
|
/// <summary>
|
||||||
|
@ -85,6 +85,7 @@ namespace Jellyfin.Data.Entities
|
||||||
GetOutline(ref value);
|
GetOutline(ref value);
|
||||||
return (_Outline = value);
|
return (_Outline = value);
|
||||||
}
|
}
|
||||||
|
|
||||||
set
|
set
|
||||||
{
|
{
|
||||||
string oldValue = _Outline;
|
string oldValue = _Outline;
|
||||||
|
@ -97,7 +98,7 @@ namespace Jellyfin.Data.Entities
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Backing field for Plot
|
/// Backing field for Plot.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
protected string _Plot;
|
protected string _Plot;
|
||||||
/// <summary>
|
/// <summary>
|
||||||
|
@ -122,6 +123,7 @@ namespace Jellyfin.Data.Entities
|
||||||
GetPlot(ref value);
|
GetPlot(ref value);
|
||||||
return (_Plot = value);
|
return (_Plot = value);
|
||||||
}
|
}
|
||||||
|
|
||||||
set
|
set
|
||||||
{
|
{
|
||||||
string oldValue = _Plot;
|
string oldValue = _Plot;
|
||||||
|
@ -134,7 +136,7 @@ namespace Jellyfin.Data.Entities
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Backing field for Tagline
|
/// Backing field for Tagline.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
protected string _Tagline;
|
protected string _Tagline;
|
||||||
/// <summary>
|
/// <summary>
|
||||||
|
@ -159,6 +161,7 @@ namespace Jellyfin.Data.Entities
|
||||||
GetTagline(ref value);
|
GetTagline(ref value);
|
||||||
return (_Tagline = value);
|
return (_Tagline = value);
|
||||||
}
|
}
|
||||||
|
|
||||||
set
|
set
|
||||||
{
|
{
|
||||||
string oldValue = _Tagline;
|
string oldValue = _Tagline;
|
||||||
|
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue
Block a user