initial commit
This commit is contained in:
23
push.py
Normal file
23
push.py
Normal file
@ -0,0 +1,23 @@
|
||||
import os
|
||||
import subprocess
|
||||
from pathlib import Path
|
||||
|
||||
|
||||
CWD = Path.cwd()
|
||||
AUDIOS_DIR = os.fsencode(os.path.join(CWD, "audios/"))
|
||||
OUT_DIR = "/storage/emulated/0/Music/lifeplaylist/"
|
||||
|
||||
|
||||
def main():
|
||||
files = os.listdir(AUDIOS_DIR)
|
||||
|
||||
for i, f in enumerate(files):
|
||||
print(f"pushing {i+1}/{len(files)}...")
|
||||
filepath = os.path.join(AUDIOS_DIR, f)
|
||||
|
||||
if subprocess.run(["adb", "push", filepath, OUT_DIR], capture_output=True).returncode != 0:
|
||||
print("ERR: Failed to push file:", filepath)
|
||||
|
||||
|
||||
if __name__ == "__main__":
|
||||
main()
|
||||
Reference in New Issue
Block a user