release: LD KickWatch v1.4.0 - Live chat fix with updated Pusher protocol, enlarged quality dropdown, and Windows Job Object process cleanup

This commit is contained in:
LilDosto 2026-10-28 03:16:52 +03:00
parent 62f8804b45
commit bacf36de86
9 changed files with 192 additions and 43 deletions

View file

@ -4,14 +4,14 @@
**Kick.com için Modern Masaüstü Canlı Yayın İzleme Stüdyosu ve Sohbet İstemcisi** **Kick.com için Modern Masaüstü Canlı Yayın İzleme Stüdyosu ve Sohbet İstemcisi**
[![Release](https://img.shields.io/badge/Release-v1.3.0-53FC18?style=for-the-badge&logo=github)](https://github.com/LilDosto/LD-KickWatch/releases/latest) [![Release](https://img.shields.io/badge/Release-v1.4.0-53FC18?style=for-the-badge&logo=github)](https://github.com/LilDosto/LD-KickWatch/releases/latest)
[![Platform](https://img.shields.io/badge/Platform-Windows%2010%20%2F%2011%20(x64)-0078D6?style=for-the-badge&logo=windows)](https://github.com/LilDosto/LD-KickWatch) [![Platform](https://img.shields.io/badge/Platform-Windows%2010%20%2F%2011%20(x64)-0078D6?style=for-the-badge&logo=windows)](https://github.com/LilDosto/LD-KickWatch)
[![.NET](https://img.shields.io/badge/.NET-8.0%20WPF-512BD4?style=for-the-badge&logo=dotnet)](https://dotnet.microsoft.com/download/dotnet/8.0) [![.NET](https://img.shields.io/badge/.NET-8.0%20WPF-512BD4?style=for-the-badge&logo=dotnet)](https://dotnet.microsoft.com/download/dotnet/8.0)
[![License](https://img.shields.io/badge/Lisans-MIT-53FC18?style=for-the-badge)](./LICENSE) [![License](https://img.shields.io/badge/Lisans-MIT-53FC18?style=for-the-badge)](./LICENSE)
Favori **Kick.com** yayıncılarınızı takip edin, anlık canlı yayın ve kategori bildirimleri alın, **Pencere İçi Web Oynatıcı (WebView2)** veya **Pencere İçi Gömülü VLC** ile yayınları izleyin, **2x2 Çoklu Yayın (Squad View)** modunda 4 yayını aynı anda takip edin ve gerçek **Kick Emote** destekli canlı sohbete bağlanın. Favori **Kick.com** yayıncılarınızı takip edin, anlık canlı yayın ve kategori bildirimleri alın, **Pencere İçi Web Oynatıcı (WebView2)** veya **Pencere İçi Gömülü VLC** ile yayınları izleyin, **2x2 Çoklu Yayın (Squad View)** modunda 4 yayını aynı anda takip edin ve gerçek **Kick Emote** destekli canlı sohbete bağlanın.
[📦 **Son Sürümü İndir (v1.3.0 Releases)**](https://github.com/LilDosto/LD-KickWatch/releases/latest) • [🚀 **Özellikler**](#-başlıca-özellikler) • [⌨ **Kısayollar**](#-klavye-kısayolları) • [🛠 **Derleme**](#-kaynak-koddan-derleme) [📦 **Son Sürümü İndir (v1.4.0 Releases)**](https://github.com/LilDosto/LD-KickWatch/releases/latest) • [🚀 **Özellikler**](#-başlıca-özellikler) • [⌨ **Kısayollar**](#-klavye-kısayolları) • [🛠 **Derleme**](#-kaynak-koddan-derleme)
</div> </div>
@ -130,6 +130,12 @@ LD-KickWatch/
## 🆕 Sürüm Geçmişi ## 🆕 Sürüm Geçmişi
### 🟢 v1.4.0 (28 Ekim 2026)
- **💬 Canlı Sohbet Bağlantı Sorunu Düzeltildi:** Kick'in yenilediği güncel Pusher WebSocket protokolü ve anahtarı entegre edildi. Artık tüm yayıncıların canlı sohbet akışları anında ve kesintisiz bağlanıyor.
- **🔍 Kalite Seçim Kutusu Büyütüldü ve Ferahlatıldı:** Oynatıcı çubuğundaki kalite kutucuğu genişletildi, yazıların dikey/yatay kırpılması ve sıkışıklık tamamen giderildi; okunabilir, şık ve ferah bir tasarıma kavuşturuldu.
- **🛑 Kesin Kapanış & Windows Job Object ile VLC Süreç Temizliği:** Uygulama kapatıldığında VLC veya alt süreçlerin arkada asılı kalması engellendi. Windows Job Object (`KILL_ON_JOB_CLOSE`) ile işletim sistemi seviyesinde tüm süreçler anında ve temiz şekilde sonlandırılır.
- **🛡 Çift Açılma İyileştirmesi:** İkinci örnek açılmaya çalışıldığında modal kutu bekletmeden mevcut açık pencereyi sessizce öne getirir ve yeni örneği anında sonlandırır.
### 🟢 v1.3.0 (28 Ekim 2026) ### 🟢 v1.3.0 (28 Ekim 2026)
- **⚙ Oynatıcı İçi Anlık Kalite Seçimi:** Yayın çözünürlüğü ve kalite seçimi (`best`, `1080p60`, `720p60`, `720p`, `480p`, `360p`, `160p`, `audio_only`) doğrudan video oynatıcı araç çubuğuna taşındı. - **⚙ Oynatıcı İçi Anlık Kalite Seçimi:** Yayın çözünürlüğü ve kalite seçimi (`best`, `1080p60`, `720p60`, `720p`, `480p`, `360p`, `160p`, `audio_only`) doğrudan video oynatıcı araç çubuğuna taşındı.
- **⚡ Ultra Hızlı Pencere İçi VLC Motoru:** Streamlink/Cloudflare bekleme ve donma sorunları tamamen giderildi. Kick AWS IVS master playlisti doğrudan bellek içinde ayrıştırılarak VLC'ye iletiliyor; yayınlar 0.3 saniyede gecikmesiz açılıyor. - **⚡ Ultra Hızlı Pencere İçi VLC Motoru:** Streamlink/Cloudflare bekleme ve donma sorunları tamamen giderildi. Kick AWS IVS master playlisti doğrudan bellek içinde ayrıştırılarak VLC'ye iletiliyor; yayınlar 0.3 saniyede gecikmesiz açılıyor.

View file

@ -23,7 +23,7 @@ public partial class App : System.Windows.Application
if (!isNewInstance) if (!isNewInstance)
{ {
// Çalışmakta olan örneği öne getir // Çalışmakta olan açık pencereyi öne getir ve ikinci örneği derhal sonlandır
try try
{ {
using var evt = EventWaitHandle.OpenExisting(ActivateEventName); using var evt = EventWaitHandle.OpenExisting(ActivateEventName);
@ -31,12 +31,6 @@ public partial class App : System.Windows.Application
} }
catch { } catch { }
System.Windows.MessageBox.Show(
"LD KickWatch zaten çalışıyor! Açık olan pencere ekrana getirildi.",
"LD KickWatch",
MessageBoxButton.OK,
MessageBoxImage.Information);
Environment.Exit(0); Environment.Exit(0);
return; return;
} }

View file

@ -0,0 +1,111 @@
using System.Diagnostics;
using System.Runtime.InteropServices;
namespace KickStreamHub.Helpers;
/// <summary>
/// Windows Job Object kullanarak alt süreçleri (VLC, Streamlink, MPV) ana uygulamaya bağlar.
/// Ana uygulama kapandığında veya çöktüğünde işletim sistemi seviyesinde TÜM alt süreçlerin
/// anında sonlandırılmasını garanti eder (JOB_OBJECT_LIMIT_KILL_ON_JOB_CLOSE).
/// </summary>
public static class ChildProcessTracker
{
private static readonly IntPtr s_jobHandle;
static ChildProcessTracker()
{
try
{
s_jobHandle = CreateJobObject(IntPtr.Zero, null);
if (s_jobHandle == IntPtr.Zero) return;
var info = new JOBOBJECT_BASIC_LIMIT_INFORMATION
{
LimitFlags = 0x2000 // JOB_OBJECT_LIMIT_KILL_ON_JOB_CLOSE
};
var extendedInfo = new JOBOBJECT_EXTENDED_LIMIT_INFORMATION
{
BasicLimitInformation = info
};
int length = Marshal.SizeOf(typeof(JOBOBJECT_EXTENDED_LIMIT_INFORMATION));
IntPtr extendedInfoPtr = Marshal.AllocHGlobal(length);
try
{
Marshal.StructureToPtr(extendedInfo, extendedInfoPtr, false);
SetInformationJobObject(s_jobHandle, JobObjectInfoType.ExtendedLimitInformation, extendedInfoPtr, (uint)length);
}
finally
{
Marshal.FreeHGlobal(extendedInfoPtr);
}
}
catch
{
// Job Object desteklenmeyen ortamlarda sessizce geçilir
}
}
public static void AddProcess(Process? process)
{
if (process is null) return;
try
{
if (s_jobHandle != IntPtr.Zero && !process.HasExited)
{
AssignProcessToJobObject(s_jobHandle, process.Handle);
}
}
catch { }
}
[DllImport("kernel32.dll", CharSet = CharSet.Unicode)]
private static extern IntPtr CreateJobObject(IntPtr lpJobAttributes, string? lpName);
[DllImport("kernel32.dll")]
private static extern bool SetInformationJobObject(IntPtr hJob, JobObjectInfoType infoType, IntPtr lpJobObjectInfo, uint cbJobObjectInfoLength);
[DllImport("kernel32.dll", SetLastError = true)]
private static extern bool AssignProcessToJobObject(IntPtr hJob, IntPtr hProcess);
private enum JobObjectInfoType
{
ExtendedLimitInformation = 9
}
[StructLayout(LayoutKind.Sequential)]
private struct JOBOBJECT_BASIC_LIMIT_INFORMATION
{
public long PerProcessUserTimeLimit;
public long PerJobUserTimeLimit;
public uint LimitFlags;
public UIntPtr MinimumWorkingSetSize;
public UIntPtr MaximumWorkingSetSize;
public uint ActiveProcessLimit;
public UIntPtr Affinity;
public uint PriorityClass;
public uint SchedulingClass;
}
[StructLayout(LayoutKind.Sequential)]
private struct IO_COUNTERS
{
public ulong ReadOperationCount;
public ulong WriteOperationCount;
public ulong OtherOperationCount;
public ulong ReadTransferCount;
public ulong WriteTransferCount;
public ulong OtherTransferCount;
}
[StructLayout(LayoutKind.Sequential)]
private struct JOBOBJECT_EXTENDED_LIMIT_INFORMATION
{
public JOBOBJECT_BASIC_LIMIT_INFORMATION BasicLimitInformation;
public IO_COUNTERS IoInfo;
public UIntPtr ProcessMemoryLimit;
public UIntPtr JobMemoryLimit;
public UIntPtr PeakProcessMemoryLimit;
public UIntPtr PeakJobMemoryLimit;
}
}

View file

@ -9,9 +9,9 @@
<ImplicitUsings>enable</ImplicitUsings> <ImplicitUsings>enable</ImplicitUsings>
<RootNamespace>KickStreamHub</RootNamespace> <RootNamespace>KickStreamHub</RootNamespace>
<AssemblyName>LDKickWatch</AssemblyName> <AssemblyName>LDKickWatch</AssemblyName>
<Version>1.3.0</Version> <Version>1.4.0</Version>
<AssemblyVersion>1.3.0.0</AssemblyVersion> <AssemblyVersion>1.4.0.0</AssemblyVersion>
<FileVersion>1.3.0.0</FileVersion> <FileVersion>1.4.0.0</FileVersion>
<Product>LD KickWatch</Product> <Product>LD KickWatch</Product>
<AssemblyTitle>LD KickWatch</AssemblyTitle> <AssemblyTitle>LD KickWatch</AssemblyTitle>
<Company>LD KickWatch</Company> <Company>LD KickWatch</Company>

View file

@ -22,8 +22,8 @@ public class ChatMessageEventArgs : EventArgs
/// </summary> /// </summary>
public sealed partial class PusherChatService : IAsyncDisposable public sealed partial class PusherChatService : IAsyncDisposable
{ {
private const string PusherAppKey = "32cbd69e4b950bf97679"; private static string s_activeAppKey = "34bf7a0ff419a2a775b9";
private const string PusherCluster = "us2"; private static string s_activeCluster = "us2";
[GeneratedRegex(@"\[emote:\d+:([^\]]+)\]")] [GeneratedRegex(@"\[emote:\d+:([^\]]+)\]")]
private static partial Regex KickEmoteRegex(); private static partial Regex KickEmoteRegex();
@ -102,7 +102,7 @@ public sealed partial class PusherChatService : IAsyncDisposable
private async Task ConnectOnceAsync(CancellationToken ct) private async Task ConnectOnceAsync(CancellationToken ct)
{ {
_socket = new ClientWebSocket(); _socket = new ClientWebSocket();
var uri = new Uri($"wss://ws-{PusherCluster}.pusher.com/app/{PusherAppKey}?protocol=7&client=js&version=8.4.0&flash=false"); var uri = new Uri($"wss://ws-{s_activeCluster}.pusher.com/app/{s_activeAppKey}?protocol=7&client=js&version=8.4.0&flash=false");
await _socket.ConnectAsync(uri, ct).ConfigureAwait(false); await _socket.ConnectAsync(uri, ct).ConfigureAwait(false);
_reconnectAttempt = 0; _reconnectAttempt = 0;
ConnectionStateChanged?.Invoke(this, true); ConnectionStateChanged?.Invoke(this, true);
@ -180,6 +180,10 @@ public sealed partial class PusherChatService : IAsyncDisposable
case "pusher:ping": case "pusher:ping":
await SendAsync("{\"event\":\"pusher:pong\",\"data\":{}}", ct).ConfigureAwait(false); await SendAsync("{\"event\":\"pusher:pong\",\"data\":{}}", ct).ConfigureAwait(false);
break; break;
case "pusher:error":
LoggingService.Instance.Warning($"Pusher sohbet hatası: {raw}");
break;
} }
} }
catch (JsonException ex) catch (JsonException ex)

View file

@ -142,6 +142,9 @@ public sealed class StreamlinkService
var process = Process.Start(psi); var process = Process.Start(psi);
if (process is null) return (false, "Pencere içi VLC başlatılamadı."); if (process is null) return (false, "Pencere içi VLC başlatılamadı.");
// Windows Job Object'e bağla: Uygulama kapatıldığında VLC asla arkada açık kalmaz
Helpers.ChildProcessTracker.AddProcess(process);
process.EnableRaisingEvents = true; process.EnableRaisingEvents = true;
process.Exited += (_, _) => process.Exited += (_, _) =>
{ {
@ -216,6 +219,8 @@ public sealed class StreamlinkService
var process = Process.Start(psi); var process = Process.Start(psi);
if (process is null) return (false, "İşlem başlatılamadı."); if (process is null) return (false, "İşlem başlatılamadı.");
Helpers.ChildProcessTracker.AddProcess(process);
process.EnableRaisingEvents = true; process.EnableRaisingEvents = true;
process.Exited += (_, _) => process.Exited += (_, _) =>
{ {

View file

@ -578,14 +578,25 @@ public partial class MainViewModel : ObservableObject
} }
} }
private void SyncEmbeddedChat(string channelName) private async void SyncEmbeddedChat(string channelName)
{ {
if (!IsEmbeddedChatOpen || string.IsNullOrWhiteSpace(channelName)) return; if (!IsEmbeddedChatOpen || string.IsNullOrWhiteSpace(channelName)) return;
var status = GetStatus(channelName); var status = GetStatus(channelName);
var chatroomId = status?.ChatroomId ?? 0; var chatroomId = status?.ChatroomId ?? 0;
if (chatroomId == 0)
{
var channelData = await _api.GetChannelAsync(channelName).ConfigureAwait(false);
chatroomId = channelData?.Chatroom?.Id ?? 0;
if (chatroomId > 0 && status != null)
{
status.ChatroomId = chatroomId;
}
}
if (chatroomId > 0) if (chatroomId > 0)
{ {
_ = EmbeddedChat.ConnectAsync(channelName, chatroomId); await EmbeddedChat.ConnectAsync(channelName, chatroomId).ConfigureAwait(false);
} }
else else
{ {
@ -744,7 +755,7 @@ public partial class MainViewModel : ObservableObject
await Task.CompletedTask; await Task.CompletedTask;
} }
private void OpenChat(string? channelName) private async void OpenChat(string? channelName)
{ {
channelName ??= SelectedChannel?.ChannelName; channelName ??= SelectedChannel?.ChannelName;
if (string.IsNullOrEmpty(channelName)) return; if (string.IsNullOrEmpty(channelName)) return;
@ -761,14 +772,28 @@ public partial class MainViewModel : ObservableObject
var chatroomId = status?.ChatroomId ?? 0; var chatroomId = status?.ChatroomId ?? 0;
if (chatroomId == 0) if (chatroomId == 0)
{ {
StatusMessage = "⏳ Sohbet odası bilgisi henüz yüklenmedi, lütfen birkaç saniye bekleyin."; StatusMessage = $"⏳ {channelName.ToUpperInvariant()} sohbet odası bağlanıyor...";
var channelData = await _api.GetChannelAsync(channelName).ConfigureAwait(false);
chatroomId = channelData?.Chatroom?.Id ?? 0;
if (chatroomId > 0 && status != null)
{
status.ChatroomId = chatroomId;
}
}
if (chatroomId == 0)
{
StatusMessage = $"⚠ {channelName.ToUpperInvariant()} için sohbet odası bulunamadı.";
return; return;
} }
var chatWindow = new ChatWindow(channelName, chatroomId, Config.ChatMaxMessages); _dispatcher.Invoke(() =>
_openChatWindows[channelName] = chatWindow; {
chatWindow.Closed += (_, _) => _openChatWindows.Remove(channelName); var chatWindow = new ChatWindow(channelName, chatroomId, Config.ChatMaxMessages);
chatWindow.Show(); _openChatWindows[channelName] = chatWindow;
chatWindow.Closed += (_, _) => _openChatWindows.Remove(channelName);
chatWindow.Show();
});
} }
[RelayCommand] [RelayCommand]

View file

@ -488,30 +488,33 @@
</Button.Style> </Button.Style>
</Button> </Button>
<!-- Stream Quality Dropdown Directly On Player Toolbar --> <!-- Stream Quality Dropdown Directly On Player Toolbar (Spacious & Clean) -->
<Border Background="#090E16" CornerRadius="6" BorderBrush="#1F2E45" BorderThickness="1" Padding="6,1" VerticalAlignment="Center"> <Border Background="#0B1320" CornerRadius="8" BorderBrush="#24344D" BorderThickness="1" Padding="8,2" Margin="6,0,0,0" VerticalAlignment="Center">
<StackPanel Orientation="Horizontal" VerticalAlignment="Center"> <StackPanel Orientation="Horizontal" VerticalAlignment="Center">
<TextBlock Text="⚙ Kalite:" Foreground="#94A3B8" FontSize="10.5" FontWeight="SemiBold" VerticalAlignment="Center" Margin="0,0,4,0" /> <TextBlock Text="⚙ Kalite:" Foreground="#A0B3CC" FontSize="12" FontWeight="Bold" VerticalAlignment="Center" Margin="0,0,6,0" />
<ComboBox SelectedValue="{Binding SelectedQuality, Mode=TwoWay}" <ComboBox SelectedValue="{Binding SelectedQuality, Mode=TwoWay}"
SelectedValuePath="Tag" SelectedValuePath="Tag"
FontSize="10.5" FontSize="12"
Padding="4,2" FontWeight="SemiBold"
Height="22" Padding="8,4"
MinWidth="110" MinHeight="28"
MinWidth="155"
VerticalContentAlignment="Center"
VerticalAlignment="Center" VerticalAlignment="Center"
Background="#0F1725" Background="#121B2A"
Foreground="#F8FAFC" Foreground="#F8FAFC"
BorderThickness="0" BorderBrush="#2E4160"
ToolTip="Yayın Çözünürlüğü ve Kalitesi"> BorderThickness="1"
<ComboBoxItem Tag="best" Content="Kaynak (En İyi)" /> ToolTip="Yayın Çözünürlüğü ve Kalitesi (VLC &amp; Harici Oynatıcılar)">
<ComboBoxItem Tag="1080p60" Content="1080p 60 FPS" /> <ComboBoxItem Tag="best" Content="Kaynak (En İyi)" Padding="10,6" />
<ComboBoxItem Tag="720p60" Content="720p 60 FPS" /> <ComboBoxItem Tag="1080p60" Content="1080p 60 FPS" Padding="10,6" />
<ComboBoxItem Tag="720p" Content="720p 30 FPS" /> <ComboBoxItem Tag="720p60" Content="720p 60 FPS" Padding="10,6" />
<ComboBoxItem Tag="480p" Content="480p" /> <ComboBoxItem Tag="720p" Content="720p (Normal)" Padding="10,6" />
<ComboBoxItem Tag="360p" Content="360p" /> <ComboBoxItem Tag="480p" Content="480p" Padding="10,6" />
<ComboBoxItem Tag="160p" Content="160p" /> <ComboBoxItem Tag="360p" Content="360p (Tasarruf)" Padding="10,6" />
<ComboBoxItem Tag="worst" Content="En Düşük" /> <ComboBoxItem Tag="160p" Content="160p (Düşük)" Padding="10,6" />
<ComboBoxItem Tag="audio_only" Content="Sadece Ses" /> <ComboBoxItem Tag="worst" Content="En Düşük" Padding="10,6" />
<ComboBoxItem Tag="audio_only" Content="Sadece Ses" Padding="10,6" />
</ComboBox> </ComboBox>
</StackPanel> </StackPanel>
</Border> </Border>

View file

@ -402,7 +402,8 @@ public partial class MainWindow : Window
try { MultiWebView3.Dispose(); } catch { } try { MultiWebView3.Dispose(); } catch { }
try { VlcHost.Dispose(); } catch { } try { VlcHost.Dispose(); } catch { }
System.Windows.Application.Current.Shutdown(); // Tüm arkaplan iş parçacıkları ve süreçleriyle birlikte hemen ve tamamen sonlandır
Environment.Exit(0);
} }
private void BrowseStreamlink_Click(object sender, RoutedEventArgs e) private void BrowseStreamlink_Click(object sender, RoutedEventArgs e)