mirror of
https://github.com/ZetaKebab/MpcNET.git
synced 2025-07-01 00:37:37 +00:00
Rewrote most of the library
This commit is contained in:
30
Sources/MpcNET/Commands/Playlist/LoadCommand.cs
Normal file
30
Sources/MpcNET/Commands/Playlist/LoadCommand.cs
Normal file
@ -0,0 +1,30 @@
|
||||
// --------------------------------------------------------------------------------------------------------------------
|
||||
// <copyright file="LoadCommand.cs" company="Hukano">
|
||||
// Copyright (c) Hukano. 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;
|
||||
|
||||
/// <summary>
|
||||
/// Loads the playlist into the current queue.
|
||||
/// </summary>
|
||||
internal class LoadCommand : IMpcCommand<string>
|
||||
{
|
||||
private readonly string playlistName;
|
||||
|
||||
public LoadCommand(string playlistName)
|
||||
{
|
||||
this.playlistName = playlistName;
|
||||
}
|
||||
|
||||
public string Serialize() => string.Join(" ", "load", $"\"{this.playlistName}\"");
|
||||
|
||||
public string Deserialize(IReadOnlyList<KeyValuePair<string, string>> response)
|
||||
{
|
||||
return string.Join(", ", response);
|
||||
}
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user