mirror of
https://github.com/jellyfin/jellyfin.git
synced 2026-01-15 23:58:57 +00:00
Use our own Contains extension
This commit is contained in:
@@ -5,9 +5,9 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Globalization;
|
||||
using System.Linq;
|
||||
using System.Text.Json.Serialization;
|
||||
using Jellyfin.Data.Enums;
|
||||
using Jellyfin.Extensions;
|
||||
using MediaBrowser.Controller.Entities;
|
||||
using MediaBrowser.Model.Dto;
|
||||
using MediaBrowser.Model.Entities;
|
||||
@@ -74,7 +74,7 @@ namespace MediaBrowser.Controller.LiveTv
|
||||
/// </summary>
|
||||
/// <value><c>true</c> if this instance is kids; otherwise, <c>false</c>.</value>
|
||||
[JsonIgnore]
|
||||
public bool IsKids => Tags.Contains("Kids", StringComparer.OrdinalIgnoreCase);
|
||||
public bool IsKids => Tags.Contains("Kids", StringComparison.OrdinalIgnoreCase);
|
||||
|
||||
[JsonIgnore]
|
||||
public bool IsRepeat { get; set; }
|
||||
|
||||
@@ -8,6 +8,7 @@ using System.Globalization;
|
||||
using System.Linq;
|
||||
using System.Text.Json.Serialization;
|
||||
using Jellyfin.Data.Enums;
|
||||
using Jellyfin.Extensions;
|
||||
using MediaBrowser.Common.Configuration;
|
||||
using MediaBrowser.Controller.Entities;
|
||||
using MediaBrowser.Controller.Providers;
|
||||
@@ -66,7 +67,7 @@ namespace MediaBrowser.Controller.LiveTv
|
||||
/// </summary>
|
||||
/// <value><c>true</c> if this instance is sports; otherwise, <c>false</c>.</value>
|
||||
[JsonIgnore]
|
||||
public bool IsSports => Tags.Contains("Sports", StringComparer.OrdinalIgnoreCase);
|
||||
public bool IsSports => Tags.Contains("Sports", StringComparison.OrdinalIgnoreCase);
|
||||
|
||||
/// <summary>
|
||||
/// Gets or sets a value indicating whether this instance is series.
|
||||
@@ -80,28 +81,28 @@ namespace MediaBrowser.Controller.LiveTv
|
||||
/// </summary>
|
||||
/// <value><c>true</c> if this instance is live; otherwise, <c>false</c>.</value>
|
||||
[JsonIgnore]
|
||||
public bool IsLive => Tags.Contains("Live", StringComparer.OrdinalIgnoreCase);
|
||||
public bool IsLive => Tags.Contains("Live", StringComparison.OrdinalIgnoreCase);
|
||||
|
||||
/// <summary>
|
||||
/// Gets a value indicating whether this instance is news.
|
||||
/// </summary>
|
||||
/// <value><c>true</c> if this instance is news; otherwise, <c>false</c>.</value>
|
||||
[JsonIgnore]
|
||||
public bool IsNews => Tags.Contains("News", StringComparer.OrdinalIgnoreCase);
|
||||
public bool IsNews => Tags.Contains("News", StringComparison.OrdinalIgnoreCase);
|
||||
|
||||
/// <summary>
|
||||
/// Gets a value indicating whether this instance is kids.
|
||||
/// </summary>
|
||||
/// <value><c>true</c> if this instance is kids; otherwise, <c>false</c>.</value>
|
||||
[JsonIgnore]
|
||||
public bool IsKids => Tags.Contains("Kids", StringComparer.OrdinalIgnoreCase);
|
||||
public bool IsKids => Tags.Contains("Kids", StringComparison.OrdinalIgnoreCase);
|
||||
|
||||
/// <summary>
|
||||
/// Gets a value indicating whether this instance is premiere.
|
||||
/// </summary>
|
||||
/// <value><c>true</c> if this instance is premiere; otherwise, <c>false</c>.</value>
|
||||
[JsonIgnore]
|
||||
public bool IsPremiere => Tags.Contains("Premiere", StringComparer.OrdinalIgnoreCase);
|
||||
public bool IsPremiere => Tags.Contains("Premiere", StringComparison.OrdinalIgnoreCase);
|
||||
|
||||
/// <summary>
|
||||
/// Gets the folder containing the item.
|
||||
|
||||
@@ -4,8 +4,8 @@
|
||||
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text.Json.Serialization;
|
||||
using Jellyfin.Extensions;
|
||||
using MediaBrowser.Model.LiveTv;
|
||||
|
||||
namespace MediaBrowser.Controller.LiveTv
|
||||
@@ -123,11 +123,11 @@ namespace MediaBrowser.Controller.LiveTv
|
||||
|
||||
public bool IsMovie { get; set; }
|
||||
|
||||
public bool IsKids => Tags.Contains("Kids", StringComparer.OrdinalIgnoreCase);
|
||||
public bool IsKids => Tags.Contains("Kids", StringComparison.OrdinalIgnoreCase);
|
||||
|
||||
public bool IsSports => Tags.Contains("Sports", StringComparer.OrdinalIgnoreCase);
|
||||
public bool IsSports => Tags.Contains("Sports", StringComparison.OrdinalIgnoreCase);
|
||||
|
||||
public bool IsNews => Tags.Contains("News", StringComparer.OrdinalIgnoreCase);
|
||||
public bool IsNews => Tags.Contains("News", StringComparison.OrdinalIgnoreCase);
|
||||
|
||||
public bool IsSeries { get; set; }
|
||||
|
||||
@@ -136,10 +136,10 @@ namespace MediaBrowser.Controller.LiveTv
|
||||
/// </summary>
|
||||
/// <value><c>true</c> if this instance is live; otherwise, <c>false</c>.</value>
|
||||
[JsonIgnore]
|
||||
public bool IsLive => Tags.Contains("Live", StringComparer.OrdinalIgnoreCase);
|
||||
public bool IsLive => Tags.Contains("Live", StringComparison.OrdinalIgnoreCase);
|
||||
|
||||
[JsonIgnore]
|
||||
public bool IsPremiere => Tags.Contains("Premiere", StringComparer.OrdinalIgnoreCase);
|
||||
public bool IsPremiere => Tags.Contains("Premiere", StringComparison.OrdinalIgnoreCase);
|
||||
|
||||
public int? ProductionYear { get; set; }
|
||||
|
||||
|
||||
Reference in New Issue
Block a user