mirror of
https://github.com/barelyprofessional/KfChatDotNet.git
synced 2026-05-02 04:22:04 -04:00
Migrated streams from bespoke settings to a database table, added DLive support and Streamlink capturing with remux support
This commit is contained in:
8
KfChatDotNetBot/Models/DLiveModels.cs
Normal file
8
KfChatDotNetBot/Models/DLiveModels.cs
Normal file
@@ -0,0 +1,8 @@
|
||||
namespace KfChatDotNetBot.Models;
|
||||
|
||||
public class DLiveIsLiveModel
|
||||
{
|
||||
public required bool IsLive { get; set; }
|
||||
public string? Title { get; set; }
|
||||
public required string Username { get; set; }
|
||||
}
|
||||
38
KfChatDotNetBot/Models/DbModels/StreamDbModel.cs
Normal file
38
KfChatDotNetBot/Models/DbModels/StreamDbModel.cs
Normal file
@@ -0,0 +1,38 @@
|
||||
namespace KfChatDotNetBot.Models.DbModels;
|
||||
|
||||
public class StreamDbModel
|
||||
{
|
||||
public int Id { get; set; }
|
||||
/// <summary>
|
||||
/// User associated with the stream if any. If none associated, then it'll just say "Somebody has gone live"
|
||||
/// </summary>
|
||||
public UserDbModel? User { get; set; } = null;
|
||||
/// <summary>
|
||||
/// Absolute URL of the streamer
|
||||
/// </summary>
|
||||
public required string StreamUrl { get; set; }
|
||||
/// <summary>
|
||||
/// Service the streamer is using
|
||||
/// </summary>
|
||||
public required StreamService Service { get; set; }
|
||||
/// <summary>
|
||||
/// JSON containing arbitrary data, e.g. social name for Parti, streamer ID for Kick, etc.
|
||||
/// </summary>
|
||||
public string? Metadata { get; set; } = null;
|
||||
/// <summary>
|
||||
/// Whether to automatically capture a stream when it goes live using yt-dlp / streamlink
|
||||
/// </summary>
|
||||
public bool AutoCapture { get; set; } = false;
|
||||
}
|
||||
|
||||
public enum StreamService
|
||||
{
|
||||
Kick,
|
||||
Parti,
|
||||
DLive
|
||||
}
|
||||
|
||||
public class KickStreamMetaModel
|
||||
{
|
||||
public required int ChannelId { get; set; }
|
||||
}
|
||||
Reference in New Issue
Block a user