-
-
Notifications
You must be signed in to change notification settings - Fork 12
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
333ce47
commit 7f8dcf5
Showing
4 changed files
with
156 additions
and
34 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,44 @@ | ||
#pragma warning disable CA1002 // Do not expose generic lists | ||
#pragma warning disable CA2227 // Collection properties should be read only | ||
|
||
using System.Collections.Generic; | ||
using System.Globalization; | ||
using System.Text; | ||
using Jellyfin.XmlTv.Interfaces; | ||
|
||
namespace Jellyfin.XmlTv.Entities; | ||
|
||
/// <summary> | ||
/// StarRating class. | ||
/// </summary> | ||
public class XmlTvStarRating : IHasIcons | ||
{ | ||
/// <summary> | ||
/// Gets or sets the system. | ||
/// </summary> | ||
/// Example: TV Guide | ||
public string? System { get; set; } | ||
|
||
/// <summary> | ||
/// Gets or setsthe star rating. | ||
/// </summary> | ||
public decimal? StarRating { get; set; } | ||
|
||
/// <summary> | ||
/// Gets or sets the icons. | ||
/// </summary> | ||
public List<XmlTvIcon>? Icons { get; set; } | ||
|
||
/// <inheritdoc /> | ||
public override string ToString() | ||
{ | ||
var builder = new StringBuilder(StarRating?.ToString(CultureInfo.InvariantCulture)); | ||
|
||
if (!string.IsNullOrEmpty(System)) | ||
{ | ||
builder.Append(" (").Append(System).Append(')'); | ||
} | ||
|
||
return builder.ToString(); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters