Improve LibVLC stability and add external playback host
- Add LibVLCManager singleton for safer LibVLC lifetime management - Introduce VlcHostClient and VlcHost.exe for external playback via JSON commands - Enhance VideoPlayer with error recovery and dependency property for SourceUrl - Implement IDisposable in ProgramsData and ViewModels for better cleanup - Update NuGet packages: LibVLCSharp to 3.9.6, System.Reactive to 6.1.0 - Add robust error handling and resource disposal throughout - Improve program guide handling in PlayerViewModel
This commit is contained in:
@@ -155,5 +155,18 @@ public class TVPlayerViewModel : IDisposable
|
||||
{
|
||||
if (_mainWindowViewModel.CurrentViewModel is IDisposable disposable)
|
||||
disposable.Dispose();
|
||||
|
||||
if (PlayListsData != null)
|
||||
{
|
||||
foreach (var kv in PlayListsData)
|
||||
{
|
||||
try { kv.Value.Dispose(); } catch { }
|
||||
}
|
||||
PlayListsData.Clear();
|
||||
}
|
||||
if (CurrentProgramsData != null)
|
||||
{
|
||||
try { CurrentProgramsData.Dispose(); } catch { }
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user