feat: m3u8 download

This commit is contained in:
WorldObservationLog
2024-05-05 05:02:17 +08:00
parent 2d0ea60556
commit 62702df164
5 changed files with 28 additions and 9 deletions

View File

@@ -14,6 +14,8 @@ from src.config import Config
from src.rip import rip_song, rip_album
from src.types import GlobalAuthParams
from src.url import AppleMusicURL, URLType
from src.url import AppleMusicURL, URLType, Song
from src.utils import get_song_id_from_m3u8
class NewInteractiveShell:
@@ -38,6 +40,12 @@ class NewInteractiveShell:
choices=["alac", "ec3", "aac", "aac-binaural", "aac-downmix", "ac3"],
default="alac")
download_parser.add_argument("-f", "--force", type=bool, default=False)
m3u8_parser = subparser.add_parser("m3u8")
m3u8_parser.add_argument("url", type=str)
m3u8_parser.add_argument("-c", "--codec",
choices=["alac", "ec3", "aac", "aac-binaural", "aac-downmix", "ac3"],
default="alac")
m3u8_parser.add_argument("-f", "--force", type=bool, default=False)
subparser.add_parser("exit")
logger.remove()