Bug 430589 - Want to disable face detection extra download on Mac version
Summary: Want to disable face detection extra download on Mac version
Status: RESOLVED FIXED
Alias: None
Product: digikam
Classification: Applications
Component: Faces-Workflow (show other bugs)
Version: 7.2.0
Platform: MacPorts macOS
: NOR normal
Target Milestone: ---
Assignee: Digikam Developers
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2020-12-19 17:14 UTC by Geoff King
Modified: 2020-12-27 17:26 UTC (History)
2 users (show)

See Also:
Latest Commit:
Version Fixed In: 7.2.0


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Geoff King 2020-12-19 17:14:44 UTC
I have two comments about face detection.  
1 - I can't download the extra required content on Mac. 
2 - I would like an option to disable the requirement for extra content on Mac.  

I-am having trouble downloading the face detection extra content.  
I have tried a few times and am getting errors like this:

An error occurred during the download.
File: openface_nn4.small2.v1.t7
Insecure redirect
The download will continue at the next start.

An error occurred during the download.
File: yolov3-wider_16000.weights
Insecure redirect
The download will continue at the next start.

I have made sure that Digikam has access to the hard drive in settings.  

However, 
For me, I don't think I'm going to use this new feature, and would like to disable the requirement to download extra content.  I have been clicking cancel, but it keeps asking me at every restart.  


This on Catalina 10.15.7 and digiKam-7.2.0-beta2-20201219T112949-MacOS-x86-64.pkg

Thanks, Geoff
Comment 1 Maik Qualmann 2020-12-19 17:39:10 UTC
Disabling it is not an option. Tools like red eye correction also need files from it. The problem is forwarding to insecure servers in your country from http-> https-> http

Maik
Comment 2 Maik Qualmann 2020-12-19 17:48:18 UTC
Git commit c0b3f83725a03ec0ee5d895f604b8dba1813adcb by Maik Qualmann.
Committed on 19/12/2020 at 17:47.
Pushed by mqualmann into branch 'master'.

force the use of insecure connections

M  +3    -1    core/utilities/setup/downloader/filesdownloader.cpp

https://invent.kde.org/graphics/digikam/commit/c0b3f83725a03ec0ee5d895f604b8dba1813adcb
Comment 3 Maik Qualmann 2020-12-22 06:45:57 UTC
Was it now possible to download all the necessary files?

Keep in mind that most of the files were in the installer and do not need to be downloaded and installed every time you update to a new version of digiKam.

Maik
Comment 4 Geoff King 2020-12-22 16:24:43 UTC
Yes. no issues second time.  
Thanks, Geoff
Comment 5 Maik Qualmann 2020-12-22 20:16:21 UTC
Thanks for the feedback, I close the bug.

Maik
Comment 6 Geoff King 2020-12-22 21:12:41 UTC
I just tried again to be sure and am now having the problem again.  
To test I deleted the 6 files in the facesengine directory. 
Started digikam. 
It downloaded 2 files fine, but got stuck on this third one.  I tried restarting digikam a few times, but keep getting this message now.   

An error occurred during the download.
File: deploy.prototxt
Insecure redirect
The download will continue at the next start.
Comment 7 Maik Qualmann 2020-12-22 22:12:50 UTC
Git commit 84c153bfd1e0089aeb03dabd502345eef6a5c288 by Maik Qualmann.
Committed on 22/12/2020 at 22:11.
Pushed by mqualmann into branch 'master'.

forward network redirects manually
FIXED-IN: 7.2.0

M  +35   -18   core/utilities/setup/downloader/filesdownloader.cpp
M  +1    -0    core/utilities/setup/downloader/filesdownloader.h

https://invent.kde.org/graphics/digikam/commit/84c153bfd1e0089aeb03dabd502345eef6a5c288
Comment 8 caulier.gilles 2020-12-25 16:19:28 UTC
Maik,

I finalize the MacOS relocatable PKG installer, and during my test, i see some point to improve about downloaded model for face management:

1/ At first start of digiKam, the download assistant is displayed. I valid to continue the process and only one file is downloaded. Process stop at next one about a security error. I need to close digiKam and start again, to process next file. This must be done like this until last file processed...

2/ Under MacOS bundle, Showfoto is also available. At first start of the application, the same assistant is show. The data must be shared between both application to reduce spaced used (after all, it's 300Mb used as data model).

Voilà, have a nice Christmas with your family.

Gilles
Comment 9 Maik Qualmann 2020-12-25 17:13:30 UTC
1) Which error is displayed under MacOS? We are now making a manual redirection, whether HTTPS is now being redirect to HTTP actually doesn't matter.

2) We only download one file for Showfoto that is used for the red eye tool. The problem is that with QStandardPaths::AppDataLocation the application name is included in the search path. The file would not be found in the digiKam path. Users may also be able to use Showfoto only. Maybe we could set a symbolic link if the digiKam directory exists.

Maik
Comment 10 Maik Qualmann 2020-12-25 17:49:06 UTC
Git commit 009adfc57cc0886ae3defb822c76193bd9e08ed7 by Maik Qualmann.
Committed on 25/12/2020 at 17:48.
Pushed by mqualmann into branch 'master'.

ignore QNetworkReply::InsecureRedirectError

M  +2    -1    core/utilities/setup/downloader/filesdownloader.cpp

https://invent.kde.org/graphics/digikam/commit/009adfc57cc0886ae3defb822c76193bd9e08ed7
Comment 11 Maik Qualmann 2020-12-27 16:41:14 UTC
Gilles,

does the problem with the insecure redirection error still exist?

Maik
Comment 12 caulier.gilles 2020-12-27 16:41:44 UTC
I check it imediatly
Comment 13 caulier.gilles 2020-12-27 16:49:14 UTC
Maik, yes it's fixed. great...

Gilles
Comment 14 Maik Qualmann 2020-12-27 17:11:54 UTC
Fine. We download only one file twice for Showfoto. We have to use QStandardPaths::AppDataLocation because it also includes the Roaming directory on Windows. A genereric variable from QStandardPaths doesn't help us here.

Maik
Comment 15 Maik Qualmann 2020-12-27 17:15:09 UTC
Another question, how can digiKam be moved in MacOS? You have to keep in mind that QStandardPaths only covers certain directories in order to find program data in the bundle.

Maik
Comment 16 caulier.gilles 2020-12-27 17:26:12 UTC
Maik, 

bundle can be moved everywhere, i tested this. Under MacOS data are search in the bundle in priority. 

Qt support this rules by default, even if i know that Macports team patch source code a lots.

About KF5 and digiKam codes, i patch libraries in the same way with this script:

https://invent.kde.org/graphics/digikam/-/blob/master/project/bundles/macports/fixbundledatapath.sh

Et voilà. Now it's fully relocatable. I don't know why KF5 API do not respect this important feature... (certainly because KF5 team considerate MacOS as a niche).

Gilles