in03 / proxima

Transcode source media directly from DaVinci Resolve using multiple machines for encoding. Great for creating proxies quickly.
MIT License
50 stars 3 forks source link

Newest proxy not always chosen #176

Closed in03 closed 2 years ago

in03 commented 2 years ago

If multiple existing unlinked proxies, the newest one isn't always chosen. It seems that the modification date sort isn't working:

matching_proxy_files.sort(key=os.path.getmtime, reverse=True)

This works:

matching_proxy_files = sorted(matching_proxy_files, key=os.path.getmtime, reverse=True)

The point of this check is kind of unclear, since overwrite behaviour is the norm. it would only really run if a user created proxies through DaVinci Resolve and then opted to redo them with rprox. If the extensions differ, they won't overwrite. This really only ensures that the newest file is chosen accounting for edge behaviours with other potential proxy generating applications.

Maybe an option to choose overwrite/increment behaviour is a good idea? In our NAS/storage setup we've never had overwrite issues, so long as we're not deleting or moving the file. This may not be the case for everyone though.