From 1d8f67962c189158296eea7e002ffb24c52e7638 Mon Sep 17 00:00:00 2001 From: JuanBindez Date: Sun, 3 Nov 2024 14:20:38 -0300 Subject: [PATCH] 8.3-rc6 (#308 #309 #310) --- build.sh | 2 +- pyproject.toml | 2 +- pytubefix/cli.py | 38 ++++++-------------------------------- pytubefix/version.py | 2 +- 4 files changed, 9 insertions(+), 35 deletions(-) diff --git a/build.sh b/build.sh index 4a515e0..a631105 100755 --- a/build.sh +++ b/build.sh @@ -3,7 +3,7 @@ VERSION=8 MINOR=3 PATCH= -EXTRAVERSION="-rc5" +EXTRAVERSION="-rc6" NOTES="(#308 #309 #310)" BRANCH="dev" diff --git a/pyproject.toml b/pyproject.toml index d6f6f37..9e389e1 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -4,7 +4,7 @@ build-backend = "setuptools.build_meta" [project] name = "pytubefix" -version = "8.3-rc5" +version = "8.3-rc6" authors = [ { name="Juan Bindez", email="juanbindez780@gmail.com" }, ] diff --git a/pytubefix/cli.py b/pytubefix/cli.py index 2f20c4b..3399ae6 100644 --- a/pytubefix/cli.py +++ b/pytubefix/cli.py @@ -286,7 +286,7 @@ def _parse_args(parser: argparse.ArgumentParser, args: Optional[List] = None) -> def _perform_args_on_youtube(youtube: YouTube, args: argparse.Namespace) -> None: if len(sys.argv) == 2: download_highest_resolution_progressive(youtube=youtube, resolution="highest", target=args.target) - + if args.list_captions: _print_available_captions(youtube.captions) if args.list: @@ -312,15 +312,6 @@ def main(): parser = argparse.ArgumentParser(description=main.__doc__) args = _parse_args(parser) - global oauth, cache - - oauth = False - cache = False - - if args.oauth: - oauth = True - cache = True - log_filename = args.logfile if args.verbose else None setup_logger(logging.DEBUG if args.verbose else logging.INFO, log_filename=log_filename) @@ -343,29 +334,12 @@ def main(): print(f"There was an error with video: {youtube_video}") print(e) - if len(sys.argv) == 2: - download_highest_resolution_progressive(youtube=youtube, resolution="highest", target=args.target) - return # Exit early as no further actions are needed - - if args.list_captions: - _print_available_captions(youtube.captions) - if args.list: - display_streams(youtube) - - if args.itag: - download_by_itag(youtube=youtube, itag=args.itag, target=args.target) - elif args.caption_code: - download_caption(youtube=youtube, lang_code=args.caption_code, target=args.target) - elif args.resolution: - download_by_resolution(youtube=youtube, resolution=args.resolution, target=args.target) - elif args.audio: - download_audio(youtube=youtube, filetype=args.audio, target=args.target) - - if args.ffmpeg: - ffmpeg_process(youtube=youtube, resolution=args.resolution, target=args.target) + oauth = False + cache = False - if args.build_playback_report: - build_playback_report(youtube) + if args.oauth: + oauth = True + cache = True else: print("Loading video...") diff --git a/pytubefix/version.py b/pytubefix/version.py index abf45ad..79e3130 100644 --- a/pytubefix/version.py +++ b/pytubefix/version.py @@ -1,4 +1,4 @@ -__version__ = "8.3-rc5" +__version__ = "8.3-rc6" if __name__ == "__main__": print(__version__) \ No newline at end of file