aag / apple_trailer_downloader

A script to download HD trailers from the Apple Trailers website.
GNU General Public License v3.0
23 stars 5 forks source link

Duplicate entries in "already downloaded" file #15

Closed forthrin closed 5 years ago

forthrin commented 7 years ago

I noticed that in my "already download trailers" file, there are some duplicate entries:

Burnt.Trailer.1080p.mov (4 occurrences)
Truth.Trailer.1080p.mov
The Summer of Sangailé.Trailer.1080p.mov
In the Heart of the Sea.Trailer.1080p.mov
Elián.Trailer.1080p.mov

This is ironic, since the purpose of the file is to make sure trailers are not downloaded more than once.

"Elián" appears also once with an extra space (" Elián"), and has been download three times (so far!)

Please look into this.

forthrin commented 6 years ago

It's been months since this was posted. Any updates?

aag commented 6 years ago

I did look into this issue when it was posted, but I wasn't able to reproduce it, so I didn't get anywhere.

I'm planning to look into it further, but Apple has done a major restructuring of the trailers website, which broke some things. I need to rewrite a lot of the code before I can really test fully, and I haven't gotten around to doing that yet.

forthrin commented 6 years ago

So the script's broken? I'm still getting trailers, but maybe not as many as I should? I for one am only interested in one trailer per new film. Maybe quicker to write a simplified version from scratch? :)

aag commented 6 years ago

The script is partially broken. The main problem is that certain resolutions don't work. If you're getting trailers in your preferred resolution, then you should be getting them for every movie.

forthrin commented 6 years ago

I'm getting trailers in 1080p. I doubt there are many users with machines and screens that can't run 1080p these days, so feel free to cut support for lower resolutions.

Reasons for using this script are:

  1. Stay updated on all new trailers
  2. Remove any chance of buffering problems when watching trailers
  3. Keep local copies of particularly interesting trailers
aag commented 6 years ago

Hi @forthrin,

I still haven't been able to reproduce this problem exactly as you describe it. The only thing I saw was that Apple renamed a movie once (from "Gomaal Again!!!" to "Golmaal Again!!!"). Since the file names are based on the movie titles, the script thought this was a new file and re-downloaded it.

So, even though I didn't find a specific problem, I've recently made a number of improvements to the script, including how the movie titles are retrieved and how the downloaded files list is stored. Please update your script and let me know if you are still getting duplicate downloads.

Note: there's a slight chance that the changes will result in a couple of trailers being re-downloaded once with a new name when you first run the script after updating, but it shouldn't happen again after that.

forthrin commented 6 years ago

After updating, half a dozen unseen trailers (and one seen, "Brimstone Glory") was downloaded. No disasters seemed to happen. So all good, I guess!