davidteather / TikTokBot

A TikTokBot that downloads trending tiktok videos and compiles them using FFmpeg
Other
347 stars 61 forks source link

How to remove duplicate videos? #21

Closed NecroBoy closed 3 years ago

NecroBoy commented 3 years ago

Hello! Is there a way for the program to check videos that have already been downloaded and not download them next time?

davidteather commented 3 years ago

This isn't currently a feature, although it wouldn't be too difficult to implement as an option to ask the user. I don't currently have time to add this feature although a simple solution for anyone who may want to add this functionality could be the following.

  1. Prompt users if they want to only save unique videos.
  2. Load from a downloads.json file (create if it doesn't exist) that has a key that contains the video IDs of videos downloaded
  3. When downloading a video add to the json file (you may have to increase the count returned by the methods as it would ignore IDs already in the list, which might mess up the video length parameters)