Skip to content

Commit 0a3be7d

Browse files
committed
add mpv autoexit
1 parent 5806ca4 commit 0a3be7d

File tree

2 files changed

+9
-2
lines changed

2 files changed

+9
-2
lines changed

MANIFEST.in

+2-1
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,3 @@
11
include src/aniworld/aniskip/skip.lua
2-
include src/aniworld/aniskip/autostart.lua
2+
include src/aniworld/aniskip/autostart.lua
3+
include src/aniworld/aniskip/autoexit.lua

src/aniworld/common/common.py

+7-1
Original file line numberDiff line numberDiff line change
@@ -153,12 +153,14 @@ def clean_up_leftovers(directory: str) -> None:
153153

154154
def setup_aniskip() -> None:
155155
"""
156-
Copy 'skip.lua' and 'autostart.lua' to the correct MPV scripts directory based on the OS.
156+
Copy 'skip.lua', 'autostart.lua', and 'autoexit.lua'
157+
to the correct MPV scripts directory based on the OS.
157158
"""
158159
script_directory = os.path.dirname(os.path.dirname(os.path.abspath(__file__)))
159160

160161
skip_source_path = os.path.join(script_directory, 'aniskip', 'skip.lua')
161162
autostart_source_path = os.path.join(script_directory, 'aniskip', 'autostart.lua')
163+
autoexit_source_path = os.path.join(script_directory, 'aniskip', 'autoexit.lua')
162164

163165
if os.name == 'nt':
164166
mpv_scripts_directory = os.path.join(
@@ -177,6 +179,10 @@ def setup_aniskip() -> None:
177179
if not os.path.exists(autostart_destination_path):
178180
shutil.copy(autostart_source_path, autostart_destination_path)
179181

182+
autoexit_destination_path = os.path.join(mpv_scripts_directory, 'autoexit.lua')
183+
if not os.path.exists(autoexit_destination_path):
184+
shutil.copy(autoexit_source_path, autoexit_destination_path)
185+
180186

181187
def execute_command(command: List[str], only_command: bool) -> None:
182188
"""

0 commit comments

Comments
 (0)