names changed, layer of abstraction added

This commit is contained in:
2024-03-08 00:07:22 +01:00
Unverified
parent 88a513d32f
commit fe37fc3369
11 changed files with 61 additions and 24 deletions

View File

@@ -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
}

View File

@@ -8,6 +8,7 @@ namespace VDownload.Models
{
public enum Source
{
Twitch
Twitch,
Subscriptions
}
}

View 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
}
}

View 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
}
}