Skip to content

Commit

Permalink
[BACKEND] Make break message debug level and more clear (#496)
Browse files Browse the repository at this point in the history
  • Loading branch information
jmbannon authored Mar 2, 2023
1 parent 5d57eb1 commit 5d40d02
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 11 deletions.
10 changes: 5 additions & 5 deletions src/ytdl_sub/downloaders/downloader.py
Original file line number Diff line number Diff line change
Expand Up @@ -369,14 +369,14 @@ def extract_info_via_info_json(
with self._listen_and_log_downloaded_info_json(log_prefix=log_prefix_on_info_json_dl):
_ = self.extract_info(ytdl_options_overrides=ytdl_options_overrides, **kwargs)
except RejectedVideoReached:
download_logger.info(
"RejectedVideoReached, stopping additional downloads. "
"Disable by setting `ytdl_options.break_on_reject` to False."
download_logger.debug(
"RejectedVideoReached, stopping additional downloads "
"(Can be disable by setting `ytdl_options.break_on_reject` to False)."
)
except ExistingVideoReached:
download_logger.info(
download_logger.debug(
"ExistingVideoReached, stopping additional downloads. "
"Disable by setting `ytdl_options.break_on_existing` to False."
"(Can be disable by setting `ytdl_options.break_on_existing` to False)."
)
except MaxDownloadsReached:
download_logger.info("MaxDownloadsReached, stopping additional downloads.")
Expand Down
8 changes: 4 additions & 4 deletions tests/e2e/plugins/test_date_range.py
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@ def test_recent_channel_download(
with assert_logs(
logger=ytdl_sub.downloaders.downloader.download_logger,
expected_message="ExistingVideoReached, stopping additional downloads",
log_level="info",
log_level="debug",
):
transaction_log = recent_channel_subscription.download()
assert_transaction_log_matches(
Expand Down Expand Up @@ -141,7 +141,7 @@ def test_rolling_recent_channel_download(
with assert_logs(
logger=ytdl_sub.downloaders.downloader.download_logger,
expected_message="RejectedVideoReached, stopping additional downloads",
log_level="info",
log_level="debug",
):
transaction_log = recent_channel_subscription.download(dry_run=False)

Expand All @@ -161,7 +161,7 @@ def test_rolling_recent_channel_download(
with assert_logs(
logger=ytdl_sub.downloaders.downloader.download_logger,
expected_message="ExistingVideoReached, stopping additional downloads",
log_level="info",
log_level="debug",
):
transaction_log = rolling_recent_channel_subscription.download(dry_run=dry_run)

Expand All @@ -188,7 +188,7 @@ def test_rolling_recent_channel_download(
with assert_logs(
logger=ytdl_sub.downloaders.downloader.download_logger,
expected_message="ExistingVideoReached, stopping additional downloads",
log_level="info",
log_level="debug",
):
transaction_log = rolling_recent_channel_subscription.download()

Expand Down
4 changes: 2 additions & 2 deletions tests/e2e/youtube/test_playlist.py
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,7 @@ def test_playlist_download(
with assert_logs(
logger=ytdl_sub.downloaders.downloader.download_logger,
expected_message="ExistingVideoReached, stopping additional downloads",
log_level="info",
log_level="debug",
):
_ = playlist_subscription.download()

Expand Down Expand Up @@ -133,7 +133,7 @@ def test_playlist_download_from_cli_sub(
with assert_logs(
logger=ytdl_sub.downloaders.downloader.download_logger,
expected_message="ExistingVideoReached, stopping additional downloads",
log_level="info",
log_level="debug",
):
_ = mock_run_from_cli(args=args)[0][1]

Expand Down

0 comments on commit 5d40d02

Please sign in to comment.