player
This commit is contained in:
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user