Re: Drive letter for image filename from database on Windows
Gilles Caulier <[email protected]> Sat, 1 Apr 2023 14:36:26 +0200
| Newsgroups | gmane.comp.kde.digikam.devel |
|---|---|
| Message-ID | <CAHFG6sGf2chTFEe4bk0AXeMrzEdek0pbEQshFVbG5gDU2cTX7g@mail.gmail.com> |
Run digiKam and go to Help / Detected Hardware dialog, all info come from kf5 Solid component Best Gilles Caulier Le sam. 1 avr. 2023 à 13:36, Nino <[email protected]> a écrit : > I see. Any idea how I could get the current drive letter in Python w/o > reverse engineering the whole KDF:Solid library? > > Cheers, > Nino > > Am Sa., 1. Apr. 2023 um 13:23 Uhr schrieb Maik Qualmann < > [email protected]>: > >> We use the KF5:Solid framework to get the drive information. The UUID is >> the >> partition UUID. So we are looking for the UUID that the Solid Framework >> returns to us as drive information and we get the corresponding path. >> Therefore, the drive letter can change with removable drives, we would >> find the >> new one via the UUID. >> >> Maik >> >> Am Samstag, 1. April 2023, 13:01:04 CEST schrieb Nino: >> > Hi, >> > >> > I'm trying to construct the full image path from the images in the >> sqlite >> > database. >> > >> > I have this file, for example: >> > X:\Nino\Pictures\2018-03\20160511_162826.jpg >> > >> > What I have so far is the: >> > - image filename (images.name): 20160511_162826.jpg >> > - the relative path in the album (albums.relativePath): /2018-03 >> > - the root path of the album (albumRoots.specificPath): /Nino/Pictures >> > >> > What I'm missing though is the drive letter. >> > There is sth. like this in albumRoots.identifier: >> volumeid:?uuid=c472a11d >> > But the uuid is completely different(and very short) than what mountvol >> > gives me: >> > \\?\Volume{3293a795-02c3-11e8-b7f0-50e549c6af80}\ >> > X:\ >> > >> > How is Digikam constructing the filename from the database? >> > >> > Cheers, >> > Nino >> >> >> >> >> -- Send with Gmail Mobile