1
0
mirror of https://github.com/ZetaKebab/MpcNET.git synced 2025-07-01 16:47:37 +00:00

Bug in find command fixed.

This commit is contained in:
glucaci
2016-12-20 15:42:48 +01:00
parent b12ded8121
commit ba83fbd824
4 changed files with 36 additions and 17 deletions

28
LibMpc/Types/IMpdFile.cs Normal file
View File

@ -0,0 +1,28 @@
using System.Collections.Generic;
namespace LibMpc.Types
{
public interface IMpdFilePath
{
string File { get; }
}
public interface IMpdFile : IMpdFilePath
{
int Time { get; }
string Album { get; }
string Artist { get; }
string Title { get; }
string Track { get; }
string Name { get; }
string Genre { get; }
string Date { get; }
string Composer { get; }
string Performer { get; }
string Comment { get; }
int Disc { get; }
int Pos { get; }
int Id { get; }
IDictionary<string, string> UnknownTags { get; }
}
}

View File

@ -5,10 +5,8 @@ namespace LibMpc.Types
/// <summary>
/// The MpdFile class contains all meta data for a file of the MPD.
/// </summary>
public class MpdFile
public class MpdFile : IMpdFile
{
public static readonly MpdFile EmptyFile = new MpdFile(string.Empty);
private const string TagTime = "Time";
private const string TagArtist = "Artist";
private const string TagAlbum = "Album";
@ -28,8 +26,9 @@ namespace LibMpc.Types
public MpdFile(string file)
{
file.CheckNotNull();
File = file;
IsInitialized = !string.IsNullOrEmpty(File);
}
public string File { get; }
@ -49,8 +48,6 @@ namespace LibMpc.Types
public int Id { get; private set; } = -1;
public IDictionary<string, string> UnknownTags => _unknownTags;
internal bool IsInitialized { get; }
internal void AddTag(string tag, string value)
{
switch (tag)