aboutsummaryrefslogtreecommitdiffstats
path: root/src/util.py
blob: 7b012a2fb9050ee85a7cb2c9396e82a68f8b4083 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
import os
import stat
import ffmpeg
from kivy.utils import platform
from kivy.app import App

def get_default_download_dir() -> str:
    if platform == "android":
        return "/sdcard/Download"
    else:
        from pathlib import Path
        return os.path.join(str(Path.home()), "Downloads")

def convert_mp4_to_mp3(input_file: str, output_file: str) -> None:
    ffmpeg.input(input_file).output(output_file).run()