NaPs / Kolekto

Kolekto is a really KISS movie catalog software
MIT License
27 stars 3 forks source link

Adding filtering to avoid some file analysis #12

Closed nadley closed 10 years ago

nadley commented 11 years ago

In my case I have something like this :

Folder
   - MyMovieTitle.mkv
   - MyMovieTitle.nfo

When I launch kolekto to import content of this folder, I got two entries on .kolekto/movies. First one is pointing on .mkv file, the other one is pointing on .nfo file.

That should be cool if we can have filter parameter in config to avoid indexing of crapy files like : nfo, srt, jpg....

NaPs commented 11 years ago

You can do:

$ kolekto import ./Folder/*.mkv

Is this feature really needed?

nadley commented 10 years ago

Yes it can be a solution but not the best in my opinion as we need to run the import command for each extension. Unless we can do something like this :

$ kolekto import ./Folder/*.{mkv,avi,webm}

I'll try to implement this feature and make a PR for it if you want :-) it will be my small contribution to this great tool. Le 2 août 2013 23:06, "Antoine Millet" notifications@github.com a écrit :

You can do:

$ kolekto import ./Folder/*.mkv

Is this feature really needed?

— Reply to this email directly or view it on GitHubhttps://github.com/NaPs/Kolekto/issues/12#issuecomment-22035824 .

NaPs commented 10 years ago

Actually your example will work as expected (your shell will expand the pattern) :-).

nadley commented 10 years ago

Ok so maybe this feature is not needed as you said or with a low priority to give the ability to import a folder without thinking about what is inside it.

NaPs commented 10 years ago

Note that I'm not totally against your idea, I just want to be sure that the feature is really useful.

I also think that this feature is not so trivial to implement. A naive filtering based on the file extension is not sufficient (imho), the number of different video file extensions is very large, and if we miss one of them, it can be annoying to a user. Adding a parameter to enable the filter and specify extension doesn't bring more functionally than the shell expansion. A filter based on the file content (like the "file" binary) become really complicated...