mirror of
https://github.com/ZetaKebab/MpcNET.git
synced 2025-01-14 22:18:43 +00:00
MpdDirectory contains now only files path.
This commit is contained in:
parent
ba83fbd824
commit
092240c22f
@ -10,13 +10,13 @@ namespace LibMpc
|
||||
/// </summary>
|
||||
public class MpdDirectoryListing
|
||||
{
|
||||
private readonly ReadOnlyCollection<MpdFile> file;
|
||||
private readonly ReadOnlyCollection<IMpdFile> file;
|
||||
private readonly ReadOnlyCollection<string> directory;
|
||||
private readonly ReadOnlyCollection<string> playlist;
|
||||
/// <summary>
|
||||
/// The list of files in the directory.
|
||||
/// </summary>
|
||||
public ReadOnlyCollection<MpdFile> FileList { get { return this.file; } }
|
||||
public ReadOnlyCollection<IMpdFile> FileList { get { return this.file; } }
|
||||
/// <summary>
|
||||
/// The list of subdirectories in the directory.
|
||||
/// </summary>
|
||||
@ -31,7 +31,7 @@ namespace LibMpc
|
||||
/// <param name="file">The list of files in the directory.</param>
|
||||
/// <param name="directory">The list of subdirectories in the directory.</param>
|
||||
/// <param name="playlist">The list of playlists in the directory.</param>
|
||||
public MpdDirectoryListing(List<MpdFile> file, List<string> directory, List<string> playlist)
|
||||
public MpdDirectoryListing(List<IMpdFile> file, List<string> directory, List<string> playlist)
|
||||
{
|
||||
if (file == null)
|
||||
throw new ArgumentNullException("file");
|
||||
@ -40,7 +40,7 @@ namespace LibMpc
|
||||
if (playlist == null)
|
||||
throw new ArgumentNullException("playlist");
|
||||
|
||||
this.file = new ReadOnlyCollection<MpdFile>(file);
|
||||
this.file = new ReadOnlyCollection<IMpdFile>(file);
|
||||
this.directory = new ReadOnlyCollection<string>(directory);
|
||||
this.playlist = new ReadOnlyCollection<string>(playlist);
|
||||
}
|
||||
@ -50,7 +50,7 @@ namespace LibMpc
|
||||
/// <param name="file">The list of files in the directory.</param>
|
||||
/// <param name="directory">The list of subdirectories in the directory.</param>
|
||||
/// <param name="playlist">The list of playlists in the directory.</param>
|
||||
public MpdDirectoryListing(ReadOnlyCollection<MpdFile> file, ReadOnlyCollection<string> directory, ReadOnlyCollection<string> playlist)
|
||||
public MpdDirectoryListing(ReadOnlyCollection<IMpdFile> file, ReadOnlyCollection<string> directory, ReadOnlyCollection<string> playlist)
|
||||
{
|
||||
if (file == null)
|
||||
throw new ArgumentNullException("file");
|
||||
|
@ -5,7 +5,7 @@ namespace LibMpc.Types
|
||||
{
|
||||
public class MpdDirectory
|
||||
{
|
||||
private readonly IList<MpdFile> _files = new List<MpdFile>();
|
||||
private readonly IList<IMpdFilePath> _files = new List<IMpdFilePath>();
|
||||
|
||||
public MpdDirectory(string path)
|
||||
{
|
||||
@ -19,7 +19,7 @@ namespace LibMpc.Types
|
||||
|
||||
public string Path { get; }
|
||||
public string Name { get; }
|
||||
public IEnumerable<MpdFile> Files => _files;
|
||||
public IEnumerable<IMpdFilePath> Files => _files;
|
||||
|
||||
internal void AddFile(string file)
|
||||
{
|
||||
|
@ -5,7 +5,7 @@ namespace LibMpc.Types
|
||||
/// <summary>
|
||||
/// The MpdFile class contains all meta data for a file of the MPD.
|
||||
/// </summary>
|
||||
public class MpdFile : IMpdFile
|
||||
internal class MpdFile : IMpdFile
|
||||
{
|
||||
private const string TagTime = "Time";
|
||||
private const string TagArtist = "Artist";
|
||||
@ -24,7 +24,7 @@ namespace LibMpc.Types
|
||||
|
||||
private readonly IDictionary<string, string> _unknownTags = new Dictionary<string, string>();
|
||||
|
||||
public MpdFile(string file)
|
||||
internal MpdFile(string file)
|
||||
{
|
||||
file.CheckNotNull();
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user