diff --git a/MainWindow.xaml b/MainWindow.xaml
index c38a19c..11eb2cf 100644
--- a/MainWindow.xaml
+++ b/MainWindow.xaml
@@ -381,9 +381,6 @@
-
diff --git a/MainWindow.xaml.cs b/MainWindow.xaml.cs
index e84863a..9dc63c9 100644
--- a/MainWindow.xaml.cs
+++ b/MainWindow.xaml.cs
@@ -42,10 +42,6 @@ public partial class MainWindow : Window
// WebView2 für Web-Sender (YouTube, Netflix etc.)
private bool _webViewReady = false;
- // Aufnahme
- private string? _recordingFilePath;
- private bool _isRecording = false;
-
// WndProc-Hook für globale Tastatureingaben (auch wenn WebView2 Fokus hat)
private System.Windows.Interop.HwndSource? _hwndSource;
@@ -210,7 +206,6 @@ public partial class MainWindow : Window
try
{
_hwndSource?.RemoveHook(WndProc);
- if (_isRecording) StopRecording();
_epgTimer.Stop();
_zapTimer.Stop();
_epgRefreshTimer.Stop();
@@ -398,7 +393,7 @@ public partial class MainWindow : Window
? new System.Windows.Media.SolidColorBrush(System.Windows.Media.Color.FromRgb(0x00, 0x78, 0xD4))
: new System.Windows.Media.SolidColorBrush(System.Windows.Media.Color.FromRgb(0x66, 0xBB, 0x6A));
// Aufnahme stoppen wenn Sender wechselt
- if (_isRecording) StopRecording();
+ // if (_isRecording) StopRecording();
TxtNoChannel.Visibility = Visibility.Collapsed;
UpdateFavButton();
@@ -694,108 +689,6 @@ public partial class MainWindow : Window
private void BtnFullscreen_Click(object sender, RoutedEventArgs e) => ToggleFullscreen();
- private void BtnRecord_Click(object sender, RoutedEventArgs e)
- {
- if (_isRecording) StopRecording();
- else StartRecording();
- }
-
- private void StartRecording()
- {
- if (_currentChannel == null || _currentChannel.Kind == ChannelKind.Web)
- {
- MessageBox.Show("Aufnahme nur für TV- und Radio-Sender möglich.",
- "HomeStream", MessageBoxButton.OK, MessageBoxImage.Information);
- return;
- }
- if (_player == null || _currentMedia == null) return;
-
- try
- {
- var dir = _settings.RecordingPath;
- Directory.CreateDirectory(dir);
- var safeName = string.Join("_", _currentChannel.Name.Split(Path.GetInvalidFileNameChars()));
- var fileName = $"{safeName}_{DateTime.Now:yyyy-MM-dd_HH-mm-ss}.ts";
- var filePath = Path.Combine(dir, fileName);
-
- // Laufenden Player stoppen, neue Media mit sout-duplicate starten
- // #duplicate: gleichzeitig Display (Abspielen) UND File (Aufnahme)
- _player.Stop();
-
- // sout-duplicate: display nur Video (kein Audio via sout-Pfad!), file bekommt alles
- // Audio laeuft separat ueber den normalen Decoder-Pfad -> kein Hall
- var sout = $":sout=#duplicate{{dst=display{{select=noaudio}},dst=std{{access=file,mux=ts,dst={filePath}}}}}";
- var media = new Media(_libVLC!, new Uri(_currentChannel.Url),
- sout,
- ":sout-keep",
- "--network-caching=1000",
- "--no-video-title-show",
- "--no-osd",
- "--rtsp-tcp");
-
- media.MetaChanged += OnMediaMetaChanged;
-
- var oldMedia = _currentMedia;
- _currentMedia = media;
- _player.Media = media;
- _player.Play();
-
- try { oldMedia?.Dispose(); } catch { }
-
- _isRecording = true;
- _recordingFilePath = filePath;
- BtnRecord.Foreground = new System.Windows.Media.SolidColorBrush(
- System.Windows.Media.Colors.Red);
- BtnRecord.ToolTip = $"Aufnahme läuft: {fileName} — Klicken zum Stoppen";
- TxtChannelSource.Text = (_currentChannel.Source == ChannelSource.Online
- ? "● Online" : "● FritzBox") + " 🔴 REC";
- }
- catch (Exception ex)
- {
- MessageBox.Show($"Aufnahme-Fehler:\n{ex.Message}",
- "HomeStream", MessageBoxButton.OK, MessageBoxImage.Error);
- }
- }
-
- private void StopRecording()
- {
- if (!_isRecording) return;
- try
- {
- // Player mit normalem Stream neu starten (ohne sout)
- if (_currentChannel != null && _player != null && _libVLC != null)
- {
- _player.Stop();
- var media = new Media(_libVLC, new Uri(_currentChannel.Url));
- media.MetaChanged += OnMediaMetaChanged;
- var oldMedia = _currentMedia;
- _currentMedia = media;
- _player.Media = media;
- _player.Play();
- try { oldMedia?.Dispose(); } catch { }
- }
- }
- catch { }
- finally
- {
- _isRecording = false;
- _recordingFilePath = null;
- BtnRecord.Foreground = new System.Windows.Media.SolidColorBrush(
- System.Windows.Media.Color.FromRgb(0x88, 0x88, 0x88));
- BtnRecord.ToolTip = "Aufnahme starten";
- if (_currentChannel != null)
- {
- TxtChannelSource.Text = _currentChannel.Source == ChannelSource.Online
- ? "● Online" : "● FritzBox";
- TxtChannelSource.Foreground = _currentChannel.Source == ChannelSource.Online
- ? new System.Windows.Media.SolidColorBrush(
- System.Windows.Media.Color.FromRgb(0x00, 0x78, 0xD4))
- : new System.Windows.Media.SolidColorBrush(
- System.Windows.Media.Color.FromRgb(0x66, 0xBB, 0x6A));
- }
- }
- }
-
private void ToggleFullscreen()
{
if (!_isFullscreen)
diff --git a/Services/AppSettings.cs b/Services/AppSettings.cs
index 19e5a59..87fd4c8 100644
--- a/Services/AppSettings.cs
+++ b/Services/AppSettings.cs
@@ -16,10 +16,6 @@ public class AppSettings
/// Startkategorie beim App-Start (default: Favoriten)
public string StartCategory { get; set; } = "fav";
- /// Ordner fuer Aufnahmen (default: Videos\HomeStream)
- public string RecordingPath { get; set; } = System.IO.Path.Combine(
- Environment.GetFolderPath(Environment.SpecialFolder.MyVideos), "HomeStream");
-
private static readonly string ConfigPath = AppPaths.Settings;
public static AppSettings Load()