Migrated streams from bespoke settings to a database table, added DLive support and Streamlink capturing with remux support

This commit is contained in:
barelyprofessional
2025-07-20 01:27:00 -05:00
parent c086ed350a
commit c134a6808d
13 changed files with 1046 additions and 170 deletions

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

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