Fix beatmap author being stored in two different places

This commit is contained in:
Dean Herbert
2017-10-13 20:25:27 +09:00
parent b82f3fc710
commit cd722e4abb
18 changed files with 48 additions and 47 deletions

View File

@ -3,6 +3,7 @@
using System.Linq;
using Newtonsoft.Json;
using osu.Game.Users;
using SQLite.Net.Attributes;
namespace osu.Game.Beatmaps
@ -19,8 +20,20 @@ namespace osu.Game.Beatmaps
public string Artist { get; set; }
public string ArtistUnicode { get; set; }
/// <summary>
/// Helper property to deserialize a username to <see cref="User"/>.
/// </summary>
[JsonProperty(@"creator")]
public string Author { get; set; }
[Column("Author")]
public string AuthorString
{
set { Author = new User { Username = value }; }
}
/// <summary>
/// The author of the beatmaps in this set.
/// </summary>
public User Author;
public string Source { get; set; }
@ -32,7 +45,7 @@ namespace osu.Game.Beatmaps
public string[] SearchableTerms => new[]
{
Author,
Author?.Username,
Artist,
ArtistUnicode,
Title,