Summary: | MYSQL : text filter returns all videos regardless of string | ||
---|---|---|---|
Product: | [Applications] digikam | Reporter: | shaav |
Component: | Database-Mysql | Assignee: | Digikam Developers <digikam-bugs-null> |
Status: | RESOLVED FIXED | ||
Severity: | normal | CC: | caulier.gilles, shaav, swatilodha27 |
Priority: | NOR | ||
Version: | 3.4.0 | ||
Target Milestone: | --- | ||
Platform: | Mint (Ubuntu based) | ||
OS: | Linux | ||
Latest Commit: | http://commits.kde.org/digikam/e85a3c2ecd45be29b2b88e26d8884a4720e45abe | Version Fixed In: | 5.0.0 |
Sentry Crash Report: |
Description
shaav
2013-11-22 20:29:42 UTC
I think there is a confusion here. In Filter tab from right sidebar, the Text filter options available in drop-down menu permit to search string into : - Image Name - Image Title - Image Comment etc... In fact, as digiKam manage video as image, the options with "image" are wrong. This must be changed as : - Name - Title - Comment etc... To resume, the behavior to return video files with image files when you filter an album is fine. Gilles Caulier Also, use Mime type filter with "Image Files" option to only apply text filter to image items from album. Gilles Caulier Git commit e85a3c2ecd45be29b2b88e26d8884a4720e45abe by Gilles Caulier. Committed on 24/11/2013 at 13:55. Pushed by cgilles into branch 'master'. to be more generic, use "item" instead "image" on text filter options M +39 -39 digikam/filters/textfilter.cpp http://commits.kde.org/digikam/e85a3c2ecd45be29b2b88e26d8884a4720e45abe Thanks for the feedback Gilles, and I agree that the terms should be more generic, but that isn't the problem. It did, however, help me isolate the problem a little more though. I have a folder with photos and videos --- they all uniquely, sequentially numbered with different prefixes. There is an image with the filename "RIA_P_1741.JPG" and a movie: RIA_P_1753.MOV if the settings are: Text: RIA_P_1741.JPG Search Field: Image Name ONLY MIME: All Files This behaves as expected Text RIA_P_1753.MOV Search Field: Image Name ONLY MIME All Files This behaves as expected. In both cases if you change the fields searched to: * Image Comment * Image Album Name * Image Aspect Ratio * Image Pixel Size OR any combination that includes one of these ALL movies in the folder are returned as matches. Changing the Mime type from "All Files" to "Images" in the first example does, of course, filter out all of the movies, but in the second changing it to "Movie Files" does not limit the results. In fact, I can put ANY random text string in and it will return every movie in the folder as a match if one of the above search fields is selected.
> * Image Album Name
Er... that should be:
* Album Name
Dysfunction is not reproducible here with 4.0.0-beta1. Look my screenshots of a test album including some JPG, RAF and, MOV : 1/ album content not filtered : http://www.flickr.com/photos/digikam/11044998484/in/photostream/ 2/ album content filtered by item name, with a valid string query, and image type mime : http://www.flickr.com/photos/digikam/11044877605/in/photostream/ 3/ album content filtered by item name, with a valid string query, and video type mime : http://www.flickr.com/photos/digikam/11044962496/in/photostream/ 4/ album content filtered by item name, with a non valid string query, and all type mime : http://www.flickr.com/photos/digikam/11044961516/ Gilles Caulier So, i suspect that something is wrong in your database file to identify type mime of your video file. With Sqlite3 command line tool, look in digiKam database file "digikam4.db" the type mime of you MOV video file : SELECT DISTINCT Images.id, Images.name, Images.album, ImageInformation.rating, Images.category, ImageInformation.format, ImageInformation.creationDate, Images.modificationDate, Images.fileSize, ImageInformation.width, ImageInformation.height FROM Images INNER JOIN ImageInformation ON Images.id=ImageInformation.imageid WHERE Images.status=1 AND Images.name="RIA_P_1753.MOV"; With my DB it return this : [gilles@localhost GILLES]$ sqlite3 digikam4.db SQLite version 3.7.17 2013-05-20 00:56:22 Enter ".help" for instructions Enter SQL statements terminated with a ";" sqlite> SELECT DISTINCT Images.id, Images.name, Images.album, ImageInformation.rating, Images.category, ImageInformation.format, ImageInformation.creationDate, Images.modificationDate, Images.fileSize, ImageInformation.width, ImageInformation.height FROM Images INNER JOIN ImageInformation ON Images.id=ImageInformation.imageid WHERE Images.status=1 AND Images.name="DSCF1010.MOV"; 2286|DSCF1010.MOV|75|-1|2|MOV|2012-12-22T19:44:00|2012-12-22T19:44:00|128137088|1920|1080 sqlite> Look like the 6nd column is the type mime, and must be MOV in your case. If it's not the right type mime, In digiKam select you mov file, go to Image/Reread metadata... entry menu, and try to filter album again. Gilles Caulier Shaav, Do you see my previous comment ? Gilles Caulier It is correctly identified as MOV; oddly width and height are NULL. If it makes any differents I'm using MySQL for the backend. Is it possible that there is something weird in a SQL join somewhere that isn't behaving correctly with NULLs? Or one that is behaving differently in MySQL vs SQLite? I will be happy to run queries if you can send me them. --------------------- 60815 RIA_P_1753.MOV 1463 2 2 MOV 2013-11-01 02:45:39 2013-11-01 02:45:39 69154245 NULL NULL Yes MySQL must be the problem. Here i use SQLite... I know that MySQL interface has bugs. Gilles Caulier Incidentally, I am using 4.1.0 with SQLite now and the issue is unchanged. Still happens exactly as described above. MOV shows correctly as the type. I tried to generate the above issue which is not reproducible. Steps to reproduce: 1) Created a fresh new album. 2) Added with images and videos. Setting names such that they've common string. 3) Enter name in the "Text Filter" to search for an image. Expected Results: Videos/Images are filtered according to the MIME type filter. Actual Result: Videos/Images are filtered correctly according to the MIME type filter. |