Skip to content

Commit

Permalink
8.3-rc6 (#308 #309 #310)
Browse files Browse the repository at this point in the history
  • Loading branch information
JuanBindez committed Nov 3, 2024
1 parent 4a8b63d commit 1d8f679
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 35 deletions.
2 changes: 1 addition & 1 deletion build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
VERSION=8
MINOR=3
PATCH=
EXTRAVERSION="-rc5"
EXTRAVERSION="-rc6"

NOTES="(#308 #309 #310)"
BRANCH="dev"
Expand Down
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -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="[email protected]" },
]
Expand Down
38 changes: 6 additions & 32 deletions pytubefix/cli.py
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand All @@ -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)

Expand All @@ -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...")
Expand Down
2 changes: 1 addition & 1 deletion pytubefix/version.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
__version__ = "8.3-rc5"
__version__ = "8.3-rc6"

if __name__ == "__main__":
print(__version__)

0 comments on commit 1d8f679

Please sign in to comment.