1
0
mirror of https://github.com/ZetaKebab/MpcNET.git synced 2025-07-01 00:37:37 +00:00
Files
MpcNET/Sources/MpcNET/Commands/Playlist/ListPlaylistInfoCommand.cs
Kim Hugener-Ohlsen 12ddc4bca4 Major refactoring
2018-05-18 15:14:20 +02:00

31 lines
1.2 KiB
C#

// --------------------------------------------------------------------------------------------------------------------
// <copyright file="ListPlaylistInfoCommand.cs" company="MpcNET">
// Copyright (c) MpcNET. All rights reserved.
// Licensed under the MIT license. See LICENSE file in the project root for full license information.
// </copyright>
// --------------------------------------------------------------------------------------------------------------------
namespace MpcNET.Commands.Playlist
{
using System.Collections.Generic;
using MpcNET.Types;
/// <summary>
/// Lists the songs with metadata in the playlist.
/// </summary>
internal class ListPlaylistInfoCommand : IMpcCommand<IEnumerable<IMpdFile>>
{
private readonly string playlistName;
public ListPlaylistInfoCommand(string playlistName)
{
this.playlistName = playlistName;
}
public string Serialize() => string.Join(" ", "listplaylistinfo", $"\"{this.playlistName}\"");
public IEnumerable<IMpdFile> Deserialize(IReadOnlyList<KeyValuePair<string, string>> response)
{
return MpdFile.CreateList(response);
}
}
}