Fix limiting copying playlists
This commit is contained in:
parent
f33297382e
commit
0e9ba7048d
6
main.py
6
main.py
@ -169,12 +169,12 @@ def copy_playlist_items(yt_api,
|
||||
delete_from_src: bool = False,
|
||||
limit: int = -1,
|
||||
dry_run: bool = False):
|
||||
if limit < 0:
|
||||
limit = len(src_playlist)
|
||||
|
||||
src_videos = list_playlist(yt_api, src_playlist)
|
||||
dst_videos = list_playlist(yt_api, dst_playlist)
|
||||
|
||||
if limit < 0:
|
||||
limit = len(src_videos)
|
||||
|
||||
dst_video_map = {video['snippet']['resourceId']['videoId']: video['id']
|
||||
for video in dst_videos}
|
||||
|
||||
|
||||
Loading…
Reference in New Issue
Block a user