2016-10-25 21:02:04 +02:00
|
|
|
|
using MediaBrowser.Model.Serialization;
|
2014-02-07 04:10:13 +01:00
|
|
|
|
using MediaBrowser.Controller.Providers;
|
2014-01-17 22:18:43 +01:00
|
|
|
|
using MediaBrowser.Model.Configuration;
|
2013-12-26 17:53:23 +01:00
|
|
|
|
using System;
|
2016-05-01 01:05:21 +02:00
|
|
|
|
using System.Collections.Generic;
|
2014-12-20 07:06:27 +01:00
|
|
|
|
using MediaBrowser.Model.Users;
|
2013-09-21 23:00:04 +02:00
|
|
|
|
|
|
|
|
|
namespace MediaBrowser.Controller.Entities
|
|
|
|
|
{
|
|
|
|
|
/// <summary>
|
|
|
|
|
/// Class GameSystem
|
|
|
|
|
/// </summary>
|
2014-02-07 04:10:13 +01:00
|
|
|
|
public class GameSystem : Folder, IHasLookupInfo<GameSystemInfo>
|
2013-09-21 23:00:04 +02: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 22:18:43 +01:00
|
|
|
|
[IgnoreDataMember]
|
2013-09-21 23:00:04 +02:00
|
|
|
|
public override Guid DisplayPreferencesId
|
|
|
|
|
{
|
|
|
|
|
get
|
|
|
|
|
{
|
|
|
|
|
return Id;
|
|
|
|
|
}
|
|
|
|
|
}
|
2013-09-22 18:49:55 +02:00
|
|
|
|
|
2016-10-11 08:46:59 +02:00
|
|
|
|
[IgnoreDataMember]
|
|
|
|
|
public override bool SupportsPlayedStatus
|
|
|
|
|
{
|
|
|
|
|
get
|
|
|
|
|
{
|
|
|
|
|
return false;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
2013-09-22 18:49:55 +02:00
|
|
|
|
/// <summary>
|
|
|
|
|
/// Gets or sets the game system.
|
|
|
|
|
/// </summary>
|
|
|
|
|
/// <value>The game system.</value>
|
|
|
|
|
public string GameSystemName { get; set; }
|
2013-10-02 01:33:50 +02:00
|
|
|
|
|
2016-05-01 01:05:21 +02:00
|
|
|
|
public override List<string> GetUserDataKeys()
|
2013-10-02 01:33:50 +02:00
|
|
|
|
{
|
2016-05-01 01:05:21 +02:00
|
|
|
|
var list = base.GetUserDataKeys();
|
|
|
|
|
|
2013-10-05 02:44:43 +02:00
|
|
|
|
if (!string.IsNullOrEmpty(GameSystemName))
|
|
|
|
|
{
|
2016-05-01 01:05:21 +02:00
|
|
|
|
list.Insert(0, "GameSystem-" + GameSystemName);
|
2013-10-05 02:44:43 +02:00
|
|
|
|
}
|
2016-05-01 01:05:21 +02:00
|
|
|
|
return list;
|
2013-10-02 01:33:50 +02:00
|
|
|
|
}
|
2013-12-26 17:53:23 +01:00
|
|
|
|
|
2014-12-20 07:06:27 +01:00
|
|
|
|
protected override bool GetBlockUnratedValue(UserPolicy config)
|
2013-12-26 17:53:23 +01:00
|
|
|
|
{
|
|
|
|
|
// Don't block. Determine by game
|
|
|
|
|
return false;
|
|
|
|
|
}
|
2014-02-07 04:10:13 +01:00
|
|
|
|
|
2015-11-06 16:02:22 +01:00
|
|
|
|
public override UnratedItem GetBlockUnratedType()
|
|
|
|
|
{
|
|
|
|
|
return UnratedItem.Game;
|
|
|
|
|
}
|
|
|
|
|
|
2014-02-07 04:10:13 +01:00
|
|
|
|
public GameSystemInfo GetLookupInfo()
|
|
|
|
|
{
|
|
|
|
|
var id = GetItemLookupInfo<GameSystemInfo>();
|
|
|
|
|
|
|
|
|
|
id.Path = Path;
|
|
|
|
|
|
|
|
|
|
return id;
|
|
|
|
|
}
|
2015-06-29 03:10:45 +02:00
|
|
|
|
|
|
|
|
|
[IgnoreDataMember]
|
|
|
|
|
public override bool SupportsPeople
|
|
|
|
|
{
|
|
|
|
|
get
|
|
|
|
|
{
|
|
|
|
|
return false;
|
|
|
|
|
}
|
|
|
|
|
}
|
2013-09-21 23:00:04 +02:00
|
|
|
|
}
|
|
|
|
|
}
|