names changed, layer of abstraction added
This commit is contained in:
@@ -6,14 +6,12 @@ using System.Threading.Tasks;
|
||||
|
||||
namespace VDownload.Models
|
||||
{
|
||||
public abstract class Playlist : List<Video>
|
||||
public abstract class Playlist : VideoCollection
|
||||
{
|
||||
#region PROPERTIES
|
||||
|
||||
public required string Name { get; set; }
|
||||
public required string Description { get; set; }
|
||||
public required Uri Url { get; set; }
|
||||
public Source Source { get; protected set; }
|
||||
|
||||
#endregion
|
||||
}
|
||||
|
||||
@@ -8,6 +8,7 @@ namespace VDownload.Models
|
||||
{
|
||||
public enum Source
|
||||
{
|
||||
Twitch
|
||||
Twitch,
|
||||
Subscriptions
|
||||
}
|
||||
}
|
||||
|
||||
20
VDownload.Models/SubscriptionList.cs
Normal file
20
VDownload.Models/SubscriptionList.cs
Normal file
@@ -0,0 +1,20 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace VDownload.Models
|
||||
{
|
||||
public class SubscriptionList : VideoCollection
|
||||
{
|
||||
#region CONSTRUCTORS
|
||||
|
||||
public SubscriptionList()
|
||||
{
|
||||
Source = Source.Subscriptions;
|
||||
}
|
||||
|
||||
#endregion
|
||||
}
|
||||
}
|
||||
18
VDownload.Models/VideoCollection.cs
Normal file
18
VDownload.Models/VideoCollection.cs
Normal file
@@ -0,0 +1,18 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace VDownload.Models
|
||||
{
|
||||
public abstract class VideoCollection : List<Video>
|
||||
{
|
||||
#region PROPERTIES
|
||||
|
||||
public required string Name { get; init; }
|
||||
public Source Source { get; protected set; }
|
||||
|
||||
#endregion
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user