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:
parent
62f8804b45
commit
bacf36de86
9 changed files with 192 additions and 43 deletions
10
README.md
10
README.md
|
|
@ -4,14 +4,14 @@
|
|||
|
||||
**Kick.com için Modern Masaüstü Canlı Yayın İzleme Stüdyosu ve Sohbet İstemcisi**
|
||||
|
||||
[](https://github.com/LilDosto/LD-KickWatch/releases/latest)
|
||||
[](https://github.com/LilDosto/LD-KickWatch/releases/latest)
|
||||
[-0078D6?style=for-the-badge&logo=windows)](https://github.com/LilDosto/LD-KickWatch)
|
||||
[](https://dotnet.microsoft.com/download/dotnet/8.0)
|
||||
[](./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.
|
||||
|
||||
[📦 **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>
|
||||
|
||||
|
|
@ -130,6 +130,12 @@ LD-KickWatch/
|
|||
|
||||
## 🆕 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)
|
||||
- **⚙ 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.
|
||||
|
|
|
|||
|
|
@ -23,7 +23,7 @@ public partial class App : System.Windows.Application
|
|||
|
||||
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
|
||||
{
|
||||
using var evt = EventWaitHandle.OpenExisting(ActivateEventName);
|
||||
|
|
@ -31,12 +31,6 @@ public partial class App : System.Windows.Application
|
|||
}
|
||||
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);
|
||||
return;
|
||||
}
|
||||
|
|
|
|||
111
src/KickStreamHub/Helpers/ChildProcessTracker.cs
Normal file
111
src/KickStreamHub/Helpers/ChildProcessTracker.cs
Normal 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;
|
||||
}
|
||||
}
|
||||
|
|
@ -9,9 +9,9 @@
|
|||
<ImplicitUsings>enable</ImplicitUsings>
|
||||
<RootNamespace>KickStreamHub</RootNamespace>
|
||||
<AssemblyName>LDKickWatch</AssemblyName>
|
||||
<Version>1.3.0</Version>
|
||||
<AssemblyVersion>1.3.0.0</AssemblyVersion>
|
||||
<FileVersion>1.3.0.0</FileVersion>
|
||||
<Version>1.4.0</Version>
|
||||
<AssemblyVersion>1.4.0.0</AssemblyVersion>
|
||||
<FileVersion>1.4.0.0</FileVersion>
|
||||
<Product>LD KickWatch</Product>
|
||||
<AssemblyTitle>LD KickWatch</AssemblyTitle>
|
||||
<Company>LD KickWatch</Company>
|
||||
|
|
|
|||
|
|
@ -22,8 +22,8 @@ public class ChatMessageEventArgs : EventArgs
|
|||
/// </summary>
|
||||
public sealed partial class PusherChatService : IAsyncDisposable
|
||||
{
|
||||
private const string PusherAppKey = "32cbd69e4b950bf97679";
|
||||
private const string PusherCluster = "us2";
|
||||
private static string s_activeAppKey = "34bf7a0ff419a2a775b9";
|
||||
private static string s_activeCluster = "us2";
|
||||
|
||||
[GeneratedRegex(@"\[emote:\d+:([^\]]+)\]")]
|
||||
private static partial Regex KickEmoteRegex();
|
||||
|
|
@ -102,7 +102,7 @@ public sealed partial class PusherChatService : IAsyncDisposable
|
|||
private async Task ConnectOnceAsync(CancellationToken ct)
|
||||
{
|
||||
_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);
|
||||
_reconnectAttempt = 0;
|
||||
ConnectionStateChanged?.Invoke(this, true);
|
||||
|
|
@ -180,6 +180,10 @@ public sealed partial class PusherChatService : IAsyncDisposable
|
|||
case "pusher:ping":
|
||||
await SendAsync("{\"event\":\"pusher:pong\",\"data\":{}}", ct).ConfigureAwait(false);
|
||||
break;
|
||||
|
||||
case "pusher:error":
|
||||
LoggingService.Instance.Warning($"Pusher sohbet hatası: {raw}");
|
||||
break;
|
||||
}
|
||||
}
|
||||
catch (JsonException ex)
|
||||
|
|
|
|||
|
|
@ -142,6 +142,9 @@ public sealed class StreamlinkService
|
|||
var process = Process.Start(psi);
|
||||
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.Exited += (_, _) =>
|
||||
{
|
||||
|
|
@ -216,6 +219,8 @@ public sealed class StreamlinkService
|
|||
var process = Process.Start(psi);
|
||||
if (process is null) return (false, "İşlem başlatılamadı.");
|
||||
|
||||
Helpers.ChildProcessTracker.AddProcess(process);
|
||||
|
||||
process.EnableRaisingEvents = true;
|
||||
process.Exited += (_, _) =>
|
||||
{
|
||||
|
|
|
|||
|
|
@ -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;
|
||||
var status = GetStatus(channelName);
|
||||
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)
|
||||
{
|
||||
_ = EmbeddedChat.ConnectAsync(channelName, chatroomId);
|
||||
await EmbeddedChat.ConnectAsync(channelName, chatroomId).ConfigureAwait(false);
|
||||
}
|
||||
else
|
||||
{
|
||||
|
|
@ -744,7 +755,7 @@ public partial class MainViewModel : ObservableObject
|
|||
await Task.CompletedTask;
|
||||
}
|
||||
|
||||
private void OpenChat(string? channelName)
|
||||
private async void OpenChat(string? channelName)
|
||||
{
|
||||
channelName ??= SelectedChannel?.ChannelName;
|
||||
if (string.IsNullOrEmpty(channelName)) return;
|
||||
|
|
@ -761,14 +772,28 @@ public partial class MainViewModel : ObservableObject
|
|||
var chatroomId = status?.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;
|
||||
}
|
||||
|
||||
_dispatcher.Invoke(() =>
|
||||
{
|
||||
var chatWindow = new ChatWindow(channelName, chatroomId, Config.ChatMaxMessages);
|
||||
_openChatWindows[channelName] = chatWindow;
|
||||
chatWindow.Closed += (_, _) => _openChatWindows.Remove(channelName);
|
||||
chatWindow.Show();
|
||||
});
|
||||
}
|
||||
|
||||
[RelayCommand]
|
||||
|
|
|
|||
|
|
@ -488,30 +488,33 @@
|
|||
</Button.Style>
|
||||
</Button>
|
||||
|
||||
<!-- Stream Quality Dropdown Directly On Player Toolbar -->
|
||||
<Border Background="#090E16" CornerRadius="6" BorderBrush="#1F2E45" BorderThickness="1" Padding="6,1" VerticalAlignment="Center">
|
||||
<!-- Stream Quality Dropdown Directly On Player Toolbar (Spacious & Clean) -->
|
||||
<Border Background="#0B1320" CornerRadius="8" BorderBrush="#24344D" BorderThickness="1" Padding="8,2" Margin="6,0,0,0" 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}"
|
||||
SelectedValuePath="Tag"
|
||||
FontSize="10.5"
|
||||
Padding="4,2"
|
||||
Height="22"
|
||||
MinWidth="110"
|
||||
FontSize="12"
|
||||
FontWeight="SemiBold"
|
||||
Padding="8,4"
|
||||
MinHeight="28"
|
||||
MinWidth="155"
|
||||
VerticalContentAlignment="Center"
|
||||
VerticalAlignment="Center"
|
||||
Background="#0F1725"
|
||||
Background="#121B2A"
|
||||
Foreground="#F8FAFC"
|
||||
BorderThickness="0"
|
||||
ToolTip="Yayın Çözünürlüğü ve Kalitesi">
|
||||
<ComboBoxItem Tag="best" Content="Kaynak (En İyi)" />
|
||||
<ComboBoxItem Tag="1080p60" Content="1080p 60 FPS" />
|
||||
<ComboBoxItem Tag="720p60" Content="720p 60 FPS" />
|
||||
<ComboBoxItem Tag="720p" Content="720p 30 FPS" />
|
||||
<ComboBoxItem Tag="480p" Content="480p" />
|
||||
<ComboBoxItem Tag="360p" Content="360p" />
|
||||
<ComboBoxItem Tag="160p" Content="160p" />
|
||||
<ComboBoxItem Tag="worst" Content="En Düşük" />
|
||||
<ComboBoxItem Tag="audio_only" Content="Sadece Ses" />
|
||||
BorderBrush="#2E4160"
|
||||
BorderThickness="1"
|
||||
ToolTip="Yayın Çözünürlüğü ve Kalitesi (VLC & Harici Oynatıcılar)">
|
||||
<ComboBoxItem Tag="best" Content="Kaynak (En İyi)" Padding="10,6" />
|
||||
<ComboBoxItem Tag="1080p60" Content="1080p 60 FPS" Padding="10,6" />
|
||||
<ComboBoxItem Tag="720p60" Content="720p 60 FPS" Padding="10,6" />
|
||||
<ComboBoxItem Tag="720p" Content="720p (Normal)" Padding="10,6" />
|
||||
<ComboBoxItem Tag="480p" Content="480p" Padding="10,6" />
|
||||
<ComboBoxItem Tag="360p" Content="360p (Tasarruf)" Padding="10,6" />
|
||||
<ComboBoxItem Tag="160p" Content="160p (Düşük)" Padding="10,6" />
|
||||
<ComboBoxItem Tag="worst" Content="En Düşük" Padding="10,6" />
|
||||
<ComboBoxItem Tag="audio_only" Content="Sadece Ses" Padding="10,6" />
|
||||
</ComboBox>
|
||||
</StackPanel>
|
||||
</Border>
|
||||
|
|
|
|||
|
|
@ -402,7 +402,8 @@ public partial class MainWindow : Window
|
|||
try { MultiWebView3.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)
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue