First pass at syncing worked with some bug fixes

This commit is contained in:
watsonb8
2019-11-12 20:09:45 -05:00
parent 1acc383e90
commit 3398d145ac
8 changed files with 128 additions and 66 deletions

View File

@ -6,35 +6,39 @@ namespace Aurora.Models.Media
{
public abstract class BaseMedia
{
private bool _loaded;
private Stream _stream;
public BaseMedia()
{
_loaded = false;
Id = Guid.NewGuid().ToString();
}
#region Properties
public string Id { get; protected set; }
public abstract MediaTypeEnum MediaType { get; }
public abstract BaseMetadata Metadata { get; protected set; }
public bool IsLoaded
{
get
{
return DataStream != null;
}
}
#endregion Properties
public virtual Task Load()
{
_loaded = true;
return Task.FromResult(default(object));
}
public virtual void Unload()
{
_loaded = false;
}
public abstract MediaTypeEnum MediaType { get; }
public abstract BaseMetadata Metadata { get; protected set; }
/// <summary>
/// Gets or sets the data stream that holds the song.