From a0532db97721663dd5a5ac0d6c5629a8e00161f2 Mon Sep 17 00:00:00 2001 From: Oier Bravo Urtasun Date: Sat, 27 Sep 2025 03:40:50 +0200 Subject: [PATCH] player --- video_player.py | 13 ++++--------- 1 file changed, 4 insertions(+), 9 deletions(-) diff --git a/video_player.py b/video_player.py index aaa9192..389bd5b 100644 --- a/video_player.py +++ b/video_player.py @@ -596,7 +596,7 @@ class VideoPlayer: """Start the video player with specified mode Args: - startup_mode: "default", "random", "channel", or "index" + startup_mode: "default" (random), "random", "channel", or "index" channel_number: Channel number to play (for channel mode) video_index: Video index to play (for index mode) """ @@ -641,13 +641,8 @@ class VideoPlayer: success = self.play_channel(channel_number) elif startup_mode == "index" and video_index is not None: success = self.play_video_by_index(video_index) - else: # default mode - if self.default_channel in self.channels: - success = self.play_channel(self.default_channel) - else: - # Play first available channel - first_channel = min(self.channels.keys()) - success = self.play_channel(first_channel) + else: # default mode - use random channel for variety + success = self.play_random_video() if success: self.logger.info("Video player started successfully") @@ -752,7 +747,7 @@ def parse_arguments(): formatter_class=argparse.RawDescriptionHelpFormatter, epilog=""" Examples: - python3 video_player.py # Start with default channel (auto-assigned) + python3 video_player.py # Start with random channel python3 video_player.py --random # Start with random video python3 video_player.py --channel 5 # Start with channel 5 (auto-assigned) python3 video_player.py --index 2 # Start with video at index 2 (0-based)