mirror of
https://github.com/jellyfin/jellyfin.git
synced 2026-05-27 19:08:27 +01:00
Use helper function to compare guid (#10825)
This commit is contained in:
@@ -240,7 +240,7 @@ namespace MediaBrowser.Controller.Entities
|
||||
{
|
||||
get
|
||||
{
|
||||
if (!ChannelId.Equals(default))
|
||||
if (!ChannelId.IsEmpty())
|
||||
{
|
||||
return SourceType.Channel;
|
||||
}
|
||||
@@ -530,7 +530,7 @@ namespace MediaBrowser.Controller.Entities
|
||||
get
|
||||
{
|
||||
var id = DisplayParentId;
|
||||
if (id.Equals(default))
|
||||
if (id.IsEmpty())
|
||||
{
|
||||
return null;
|
||||
}
|
||||
@@ -746,7 +746,7 @@ namespace MediaBrowser.Controller.Entities
|
||||
public virtual bool StopRefreshIfLocalMetadataFound => true;
|
||||
|
||||
[JsonIgnore]
|
||||
protected virtual bool SupportsOwnedItems => !ParentId.Equals(default) && IsFileProtocol;
|
||||
protected virtual bool SupportsOwnedItems => !ParentId.IsEmpty() && IsFileProtocol;
|
||||
|
||||
[JsonIgnore]
|
||||
public virtual bool SupportsPeople => false;
|
||||
@@ -823,7 +823,7 @@ namespace MediaBrowser.Controller.Entities
|
||||
public BaseItem GetOwner()
|
||||
{
|
||||
var ownerId = OwnerId;
|
||||
return ownerId.Equals(default) ? null : LibraryManager.GetItemById(ownerId);
|
||||
return ownerId.IsEmpty() ? null : LibraryManager.GetItemById(ownerId);
|
||||
}
|
||||
|
||||
public bool CanDelete(User user, List<Folder> allCollectionFolders)
|
||||
@@ -968,7 +968,7 @@ namespace MediaBrowser.Controller.Entities
|
||||
public BaseItem GetParent()
|
||||
{
|
||||
var parentId = ParentId;
|
||||
if (parentId.Equals(default))
|
||||
if (parentId.IsEmpty())
|
||||
{
|
||||
return null;
|
||||
}
|
||||
@@ -1361,7 +1361,7 @@ namespace MediaBrowser.Controller.Entities
|
||||
var tasks = extras.Select(i =>
|
||||
{
|
||||
var subOptions = new MetadataRefreshOptions(options);
|
||||
if (!i.OwnerId.Equals(ownerId) || !i.ParentId.Equals(default))
|
||||
if (!i.OwnerId.Equals(ownerId) || !i.ParentId.IsEmpty())
|
||||
{
|
||||
i.OwnerId = ownerId;
|
||||
i.ParentId = Guid.Empty;
|
||||
@@ -1673,7 +1673,7 @@ namespace MediaBrowser.Controller.Entities
|
||||
// First get using the cached Id
|
||||
if (info.ItemId.HasValue)
|
||||
{
|
||||
if (info.ItemId.Value.Equals(default))
|
||||
if (info.ItemId.Value.IsEmpty())
|
||||
{
|
||||
return null;
|
||||
}
|
||||
@@ -2439,7 +2439,7 @@ namespace MediaBrowser.Controller.Entities
|
||||
return Task.FromResult(true);
|
||||
}
|
||||
|
||||
if (video.OwnerId.Equals(default))
|
||||
if (video.OwnerId.IsEmpty())
|
||||
{
|
||||
video.OwnerId = this.Id;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user