Mozzo1000 / movielst

:movie_camera: Everything about your movies within the command line.
Other
0 stars 1 forks source link

Skip indexing if already exists #7

Closed Mozzo1000 closed 6 years ago

Mozzo1000 commented 6 years ago

What to do?

Make it so when indexing it skips every entry that already exists. add --force argument to force a reindex of everything like it does now.

Why?

It will make it faster to reindex folder when you have added content to it.

Mozzo1000 commented 6 years ago

This feature has proven itself to be a lot harder than it is supposed to be because of the underlying storage solution for the index file. Currently we override and create a new index file everytime movielst indexes a folder. Trying to append to an existing json file is not a good solution at the moment, it adds unnecessary bulk to the code and a few other problems.

I will be looking into if it would be better to save everything to a database of some sort and afterwords revisit this issue.

Mozzo1000 commented 6 years ago

Once #14 is fully implemented half of this issue feature will be implemented. When indexing the movies, sql has an INSERT OR IGNORE and couple that with an unique key (currently filename) it will automatically skip already existing movies in the index. We only need to add the --force command somehow.