Skip to content

Commit 0df8129

Browse files
committed
🔥 remove --not_check_player
1 parent d21486b commit 0df8129

4 files changed

Lines changed: 12 additions & 29 deletions

File tree

src/badapple/__main__.py

Lines changed: 7 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,12 @@
2727
get_info(),
2828
)
2929

30+
parser.add_argument(
31+
'--avaliable_player',
32+
help='show avaliable players',
33+
action='store_true'
34+
)
35+
3036
parser.add_argument(
3137
'-i', '--input',
3238
help='video file (use %s or %s to load built-in video)' % (
@@ -35,7 +41,6 @@
3541
),
3642
default=D_MP4
3743
)
38-
3944
parser.add_argument(
4045
'-o', '--output',
4146
help='preload output file',
@@ -47,7 +52,6 @@
4752
help='font data file',
4853
default=''
4954
)
50-
5155
parser.add_argument(
5256
'--audio',
5357
help='audio file (use %s or %s to load built-in audio)' % (
@@ -56,7 +60,6 @@
5660
),
5761
default=''
5862
)
59-
6063
parser.add_argument(
6164
'--audio_player',
6265
help='audio player [%s]' % ' '.join(get_names()),
@@ -80,31 +83,17 @@
8083
help='not clear screen (with ANSI) before each frame',
8184
action='store_true'
8285
)
83-
84-
parser.add_argument(
85-
'--not_check_player',
86-
help='not check if player is available before playing',
87-
action='store_true'
88-
)
89-
9086
parser.add_argument(
9187
'--contrast',
9288
help='contrast enhancement',
9389
action='store_true'
9490
)
95-
9691
parser.add_argument(
9792
'--preload',
9893
help='preload video (not play)',
9994
action='store_true'
10095
)
10196

102-
parser.add_argument(
103-
'--avaliable_player',
104-
help='show avaliable players',
105-
action='store_true'
106-
)
107-
10897
parser.add_argument(
10998
'--debug',
11099
help='debug',
@@ -121,7 +110,6 @@
121110
x = int(x)
122111
y = int(y)
123112
need_clear = not a.not_clear
124-
check_player = not a.not_check_player
125113

126114
p_list: list[Process] = list()
127115

@@ -134,8 +122,7 @@
134122
video=video, output=a.output,
135123
font=a.font, audio=audio, player=a.audio_player,
136124
x=x, y=y, fps=a.rate,
137-
need_clear=need_clear, check_player=check_player,
138-
contrast=a.contrast, preload=a.preload,
125+
need_clear=need_clear, contrast=a.contrast, preload=a.preload,
139126
debug=a.debug
140127
)
141128
except KeyboardInterrupt:

src/badapple/audio.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,6 @@ def get_player(
2222
audio: str,
2323
player: str,
2424
video: str = None,
25-
check_player: bool = True
2625
) -> None | Player:
2726
if not audio:
2827
if not player:

src/badapple/play.py

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -43,21 +43,19 @@ def play(
4343
video: str, output: str,
4444
font: str, audio: str, player: str,
4545
x: int, y: int, fps: int,
46-
need_clear: bool = True, check_player: bool = True,
47-
contrast: bool = False, preload: bool = False,
46+
need_clear: bool = True, contrast: bool = False, preload: bool = False,
4847
debug: bool = False
4948
) -> None:
5049
if video.endswith('.badapple'):
5150
return replay(
5251
p_list,
5352
video, audio, player,
54-
need_clear, check_player,
55-
debug
53+
need_clear, debug
5654
)
5755

5856
video = os.path.abspath(video)
5957
open(video, 'rb').close()
60-
p = get_player(audio, player, video, check_player=check_player)
58+
p = get_player(audio, player, video)
6159

6260
x = int(x)
6361
y = int(y)

src/badapple/replay.py

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -8,12 +8,11 @@
88
def replay(
99
p_list: list[Process],
1010
video: str, audio: str, player: str,
11-
need_clear: bool = True, check_player: bool = True,
12-
debug: bool = False
11+
need_clear: bool = True, debug: bool = False
1312
) -> None:
1413
video = os.path.abspath(video)
1514
open(video, 'r').close()
16-
p = get_player(audio, player, check_player=check_player)
15+
p = get_player(audio, player)
1716

1817
s = open(video, 'r').read().split('\n\n')
1918
x, y, clk = s[0].split()

0 commit comments

Comments
 (0)