docs(downloader): note rename_chapters param shadowing
Add inline comment in _finalize_download() explaining that the rename_chapters bool param shadows the module-level rename_chapters() function. This is safe because the actual call is delegated to _rename_and_log(), which has its own clean scope.
This commit is contained in:
1 parent
8acea390e6
commit
8619b400f2
1 file changed
+3
@@ -325,6 +325,9 @@ def _finalize_download(
|
||||
branches in download_book(). Callers only need to attempt their download;
|
||||
on success they delegate here for everything else.
|
||||
"""
|
||||
# Note: 'rename_chapters' param shadows the module-level rename_chapters()
|
||||
# function. The actual function is called via _rename_and_log(), which has
|
||||
# its own clean scope, so this is safe.
|
||||
# MP3-only: optionally rename chapter files
|
||||
if format == "mp3" and rename_chapters:
|
||||
_rename_and_log(result_path, mp3_tracks or [], book.title, reporter)
|
||||
|
||||
Reference in new issue
Block a user