public JcfMedia LoadMedia(Model.SongInfo song) { string tracksPath = Path.Combine(dataDirectory, "Tracks"); string songPath = Path.Combine(dataDirectory, "Tracks", $"{song.Id}".ToUpper() + ".jcf"); var result = new JcfMedia(song, songPath); // Load length var beatArray = PropertyListParser.Parse(Path.Combine(songPath, "beats.plist")) as NSArray; var dictionary = beatArray[beatArray.Count - 1] as NSDictionary; var position = dictionary.Double("position") ?? 0; result.Length = TimeSpan.FromSeconds(position); LoadTracks(result, songPath); LoadBeats(result, songPath); LoadSections(result, songPath); LoadScoreNodes(result, songPath); return(result); }
public static string PositionKey(Model.SongInfo song) { return($"Song/{song.Sku}/Position"); }
public static string SoloTrackKey(Model.SongInfo song) { return($"Song/{song.Instrument}/SoloTrack"); }
public static string MixerCollapsedKey(Model.SongInfo song) { return($"Song/{song.Sku}/MixerCollapsed"); }
public static string SelectedScoreKey(Model.SongInfo song) { return($"Song/{song.Sku}/SelectedScore"); }