jellyfin-server/MediaBrowser.Controller/Entities/GameSystem.cs

62 lines
1.6 KiB
C#
Raw Normal View History

2014-01-17 21:18:43 +00:00
using System.Runtime.Serialization;
2014-02-07 03:10:13 +00:00
using MediaBrowser.Controller.Providers;
2014-01-17 21:18:43 +00:00
using MediaBrowser.Model.Configuration;
2013-12-26 16:53:23 +00:00
using System;
2013-09-21 21:00:04 +00:00
namespace MediaBrowser.Controller.Entities
{
/// <summary>
/// Class GameSystem
/// </summary>
2014-02-07 03:10:13 +00:00
public class GameSystem : Folder, IHasLookupInfo<GameSystemInfo>
2013-09-21 21:00:04 +00:00
{
/// <summary>
/// Return the id that should be used to key display prefs for this item.
/// Default is based on the type for everything except actual generic folders.
/// </summary>
/// <value>The display prefs id.</value>
2014-01-17 21:18:43 +00:00
[IgnoreDataMember]
2013-09-21 21:00:04 +00:00
public override Guid DisplayPreferencesId
{
get
{
return Id;
}
}
2013-09-22 16:49:55 +00:00
/// <summary>
/// Gets or sets the game system.
/// </summary>
/// <value>The game system.</value>
public string GameSystemName { get; set; }
/// <summary>
/// Gets the user data key.
/// </summary>
/// <returns>System.String.</returns>
public override string GetUserDataKey()
{
if (!string.IsNullOrEmpty(GameSystemName))
{
return "GameSystem-" + GameSystemName;
}
return base.GetUserDataKey();
}
2013-12-26 16:53:23 +00:00
protected override bool GetBlockUnratedValue(UserConfiguration config)
{
// Don't block. Determine by game
return false;
}
2014-02-07 03:10:13 +00:00
public GameSystemInfo GetLookupInfo()
{
var id = GetItemLookupInfo<GameSystemInfo>();
id.Path = Path;
return id;
}
2013-09-21 21:00:04 +00:00
}
}