using Cryville.Common; using Cryville.Crtr.Extension; using System; using System.Collections.Generic; using UnityEngine; namespace Cryville.Crtr.Browsing { public class ChartDetail : IResourceMeta { public AsyncDelivery Cover { get; set; } public ChartMeta Meta { get; set; } public IEnumerable Properties { get { if (Meta == null) yield break; yield return new MetaProperty("Name", new Dictionary { { "", string.Format("{0} - {1}", Meta.song.name, Meta.name) }, { "short", Meta.name }, { "distinct-primary", Meta.song.name }, { "distinct-secondary", Meta.name }, }); yield return new MetaProperty("Image", Cover); yield return new MetaProperty("Song.Author", Meta.song.author); yield return new MetaProperty("Author", Meta.author); yield return new MetaProperty("Length", TimeSpan.FromSeconds(Meta.length)); yield return new MetaProperty("NoteCount", Meta.note_count); } } } }