- [x] add stitched together
- [x] add force replace
- [ ] add album name
-- [ ] add force replace check for audio and video only
\ No newline at end of file
+- [x] add force replace check for audio and video only
\ No newline at end of file
def download(link, mode, force=False):
yt = YouTube(link)
filename = fix_filename(yt.title)
- if (filename + '.mp4' in glob.glob("*.mp4")) and not force:
+ if (
+ (
+ (mode == '-av' and
+ (filename + ' (audio only).mp4' in glob.glob("*.mp4") or
+ filename + ' (video only).mp4' in glob.glob("*.mp4"))) or
+ (mode != '-av' and filename + '.mp4' in glob.glob("*.mp4"))
+ ) and
+ (not force)
+ ):
print(f"{yt.title} is already downloaded")
return
yt.check_availability()