[Bug 261277] New: Windows and Linux Frontend using the same database

classic Classic list List threaded Threaded
26 messages Options
12
Reply | Threaded
Open this post in threaded view
|

[Bug 261277] New: Windows and Linux Frontend using the same database

Bugzilla from tobias@kaminsky.me
https://bugs.kde.org/show_bug.cgi?id=261277

           Summary: Windows and Linux Frontend using the same database
           Product: digikam
           Version: unspecified
          Platform: Gentoo Packages
        OS/Version: Linux
            Status: UNCONFIRMED
          Severity: wishlist
          Priority: NOR
         Component: general
        AssignedTo: [hidden email]
        ReportedBy: [hidden email]


Version:           unspecified (using KDE 4.5.90)
OS:                Linux

I have one database and three frontends. Frontend#2 is on Windows.
Therefore I have two entries in AlbumRoots:
4 fotos 0 3 networkshareid:?mountpath=%2Fmnt%2Fraid%2Ffotos /
5 fotos 0 3 networkshareid:?mountpath=Y:%2F /

All albums are now stored twice:
372     4     /unsortiert/Neuer Ordner     2010-07-11     NULL     NULL
    NULL
605     5     /unsortiert/Neuer Ordner     2010-07-11     NULL     NULL
    NULL

As you can see 4/5 is the AlbumRoots.id.
The problem is that, if I add a tag to one image on Windows the image is
related to album.id=605.
Linux does not recognize the tag as the same image is stored in
album.id=372.

(I have posted this on the mailing-list already, but I think a Bug-Report is
better as one can apply patches, etc.)

Thank you
Tobi

Reproducible: Always

--
Configure bugmail: https://bugs.kde.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.
_______________________________________________
Digikam-devel mailing list
[hidden email]
https://mail.kde.org/mailman/listinfo/digikam-devel
Reply | Threaded
Open this post in threaded view
|

[Bug 261277] Windows and Linux Frontend using the same database

Gilles Caulier-4
https://bugs.kde.org/show_bug.cgi?id=261277


Gilles Caulier <[hidden email]> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |[hidden email]
          Component|general                     |Database
            Version|unspecified                 |1.7.0




--
Configure bugmail: https://bugs.kde.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.
_______________________________________________
Digikam-devel mailing list
[hidden email]
https://mail.kde.org/mailman/listinfo/digikam-devel
Reply | Threaded
Open this post in threaded view
|

[Bug 261277] Windows and Linux Frontend using the same database

Bugzilla from antoine.spam@gmail.com
In reply to this post by Bugzilla from tobias@kaminsky.me
https://bugs.kde.org/show_bug.cgi?id=261277


Anw <[hidden email]> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |[hidden email]




--- Comment #1 from Anw <antoine spam gmail com>  2011-02-07 21:02:41 ---
Same here : I used digikam on Linux, with mysql backend.
When trying to join windows, I'm getting the following error :
"Your locale has changed since this album was last opened. Old locale: UTF-8,
new locale: System. If you have recently changed your locale, you need not be
concerned. Please note that if you switched to a locale that does not support
some of the filenames in your collection, these files may no longer be found in
the collection. If you are sure that you want to continue, click 'Yes'.
Otherwise, click 'No' and correct your locale setting before restarting
digiKam."

I didn't try clicking "yes" to not ruing my existing albums... It would be
really great if we could share same albums betweetn linux and windows.

--
Configure bugmail: https://bugs.kde.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.
_______________________________________________
Digikam-devel mailing list
[hidden email]
https://mail.kde.org/mailman/listinfo/digikam-devel
Reply | Threaded
Open this post in threaded view
|

[Bug 261277] Windows and Linux Frontend using the same database

Marcel Wiesweg
In reply to this post by Bugzilla from tobias@kaminsky.me
https://bugs.kde.org/show_bug.cgi?id=261277





--- Comment #2 from Marcel Wiesweg <marcel wiesweg gmx de>  2011-02-19 19:05:15 ---
Git commit 73fcc4ffb58dfdadd9bcec35487515c1eaad8ca5 by Marcel Wiesweg.
Committed on 19/02/2011 at 19:03.
Pushed by mwiesweg into branch 'development/2.0'.

Support testing of multiple mount paths for a network share

CCBUG: 261277

M  +19   -11   libs/database/collectionmanager.cpp    

http://commits.kde.org/digikam/73fcc4ffb58dfdadd9bcec35487515c1eaad8ca5

--
Configure bugmail: https://bugs.kde.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.
_______________________________________________
Digikam-devel mailing list
[hidden email]
https://mail.kde.org/mailman/listinfo/digikam-devel
Reply | Threaded
Open this post in threaded view
|

[Bug 261277] Windows and Linux Frontend using the same database

Marcel Wiesweg
In reply to this post by Bugzilla from tobias@kaminsky.me
https://bugs.kde.org/show_bug.cgi?id=261277





--- Comment #3 from Marcel Wiesweg <marcel wiesweg gmx de>  2011-02-19 19:08:41 ---
The idea is, as discussed on the mailing list, to allow to have multiple
mountpath query items in the URL:
networkshareid:?mountpath=%2Fmnt%2Fraid%2Ffotos?mountpath=Y:%2F

No UI atm.
I did not test it, missing a good cross-platform testing environment. So any
feedback is welcome.

--
Configure bugmail: https://bugs.kde.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.
_______________________________________________
Digikam-devel mailing list
[hidden email]
https://mail.kde.org/mailman/listinfo/digikam-devel
Reply | Threaded
Open this post in threaded view
|

[Bug 261277] Windows and Linux Frontend using the same database

Bugzilla from tobias@kaminsky.me
In reply to this post by Bugzilla from tobias@kaminsky.me
https://bugs.kde.org/show_bug.cgi?id=261277





--- Comment #5 from Tobias Kaminsky <tobias kaminsky me>  2011-10-19 08:11:19 ---
(In reply to comment #3)
> The idea is, as discussed on the mailing list, to allow to have multiple
> mountpath query items in the URL:
> networkshareid:?mountpath=%2Fmnt%2Fraid%2Ffotos?mountpath=Y:%2F
>
> No UI atm.
> I did not test it, missing a good cross-platform testing environment. So any
> feedback is welcome.

Hi,

I have tried this with two linux machines with digikam-2.2.0:
Computer A: /mnt/raid/fotos/ (local RAID-system)
Computer B: /mnt/mediacenter/fotos (mounted via nfs)

This is my entry in AlbumRoots:
networkshareid:?mountpath=%2Fmnt%2Fraid%2Ffotos?mountpath=%2Fmnt%2Fmediacenter%2Ffotos

But this does not work. No computer shows this album, but
networkshareid:?mountpath=%2Fmnt%2Fraid%2Ffotos is working on Computer A.

What is wrong?

Thank you!
Tobi

--
Configure bugmail: https://bugs.kde.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.
_______________________________________________
Digikam-devel mailing list
[hidden email]
https://mail.kde.org/mailman/listinfo/digikam-devel
Reply | Threaded
Open this post in threaded view
|

[Bug 261277] Windows and Linux Frontend using the same database

Marcel Wiesweg
In reply to this post by Bugzilla from tobias@kaminsky.me
https://bugs.kde.org/show_bug.cgi?id=261277





--- Comment #6 from Marcel Wiesweg <marcel wiesweg gmx de>  2011-10-19 16:55:11 ---
Is the album root type set to network? It's the fourth field in the table and
should be 3

--
Configure bugmail: https://bugs.kde.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.
_______________________________________________
Digikam-devel mailing list
[hidden email]
https://mail.kde.org/mailman/listinfo/digikam-devel
Reply | Threaded
Open this post in threaded view
|

[Bug 261277] Windows and Linux Frontend using the same database

Bugzilla from tobias@kaminsky.me
In reply to this post by Bugzilla from tobias@kaminsky.me
https://bugs.kde.org/show_bug.cgi?id=261277





--- Comment #7 from Tobias Kaminsky <tobias kaminsky me>  2011-10-19 17:55:08 ---
(In reply to comment #6)
> Is the album root type set to network? It's the fourth field in the table and
> should be 3

id     label     status     type     identifier     specificPath
1     fotos    0     3    
networkshareid:?mountpath=%2Fmnt%2Fraid%2Ffotos?mo...    /
2     test    0     3     networkshareid:?mountpath=%2Fmnt%2Fraid%2Ffotos    /

Yes, it is. id=1 does not work, but id=2 does work.

--
Configure bugmail: https://bugs.kde.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.
_______________________________________________
Digikam-devel mailing list
[hidden email]
https://mail.kde.org/mailman/listinfo/digikam-devel
Reply | Threaded
Open this post in threaded view
|

[Bug 261277] Windows and Linux Frontend using the same database

Bugzilla from tobias@kaminsky.me
In reply to this post by Bugzilla from tobias@kaminsky.me
https://bugs.kde.org/show_bug.cgi?id=261277





--- Comment #8 from Tobias Kaminsky <tobias kaminsky me>  2011-10-20 14:38:18 ---
return url.allQueryItemValues("mountpath"); (collectionmanager.cpp:460)
does not work properly.

I have changed this to

return url.toString().split("?mountpath=",  QString::SkipEmptyParts);

and it seems to work.

--
Configure bugmail: https://bugs.kde.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.
_______________________________________________
Digikam-devel mailing list
[hidden email]
https://mail.kde.org/mailman/listinfo/digikam-devel
Reply | Threaded
Open this post in threaded view
|

[Bug 261277] Windows and Linux Frontend using the same database

Gilles Caulier-4
In reply to this post by Bugzilla from tobias@kaminsky.me
https://bugs.kde.org/show_bug.cgi?id=261277


Gilles Caulier <[hidden email]> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |[hidden email]




--- Comment #9 from Gilles Caulier <caulier gilles gmail com>  2011-10-28 17:56:20 ---
Ananta,

This fix from #8 is valid for you under Windows ?

Gilles Caulier

--
Configure bugmail: https://bugs.kde.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.
_______________________________________________
Digikam-devel mailing list
[hidden email]
https://mail.kde.org/mailman/listinfo/digikam-devel
Reply | Threaded
Open this post in threaded view
|

[Bug 261277] Windows and Linux Frontend using the same database

Ananta Palani
In reply to this post by Bugzilla from tobias@kaminsky.me
https://bugs.kde.org/show_bug.cgi?id=261277





--- Comment #10 from Ananta Palani <anantapalani gmail com>  2011-10-29 10:32:32 ---
Does this fix only apply with mysql back-end or with sqlite as well?

--
Configure bugmail: https://bugs.kde.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.
_______________________________________________
Digikam-devel mailing list
[hidden email]
https://mail.kde.org/mailman/listinfo/digikam-devel
Reply | Threaded
Open this post in threaded view
|

[Bug 261277] Windows and Linux Frontend using the same database

Bugzilla from tobias@kaminsky.me
In reply to this post by Bugzilla from tobias@kaminsky.me
https://bugs.kde.org/show_bug.cgi?id=261277





--- Comment #11 from Tobias Kaminsky <tobias kaminsky me>  2011-10-29 10:37:58 ---
(In reply to comment #10)
> Does this fix only apply with mysql back-end or with sqlite as well?

I have only tried it with mysql.
Dabase Settings also say:
Note: a remote file system, such as NFS, cannot be used here.

So I think that sqlite is only for local usage.
If you want to use digikam on multiple computer, you should setup one pc as
master with all pictures and a mysql-server on it.
Then the other machines connect directly to this mysql server and can mount via
samba/nfs the directory with the albums.

Tobi

--
Configure bugmail: https://bugs.kde.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.
_______________________________________________
Digikam-devel mailing list
[hidden email]
https://mail.kde.org/mailman/listinfo/digikam-devel
Reply | Threaded
Open this post in threaded view
|

[Bug 261277] Windows and Linux Frontend using the same database

Gilles Caulier-4
In reply to this post by Bugzilla from tobias@kaminsky.me
https://bugs.kde.org/show_bug.cgi?id=261277





--- Comment #12 from Gilles Caulier <caulier gilles gmail com>  2011-10-29 11:41:10 ---
Tobias,

You can use share collection with sqlite, but DB file must still on local
computer and cannot be shared as well.

Mysql is more powerful and versatile of course.

Gilles Caulier

--
Configure bugmail: https://bugs.kde.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.
_______________________________________________
Digikam-devel mailing list
[hidden email]
https://mail.kde.org/mailman/listinfo/digikam-devel
Reply | Threaded
Open this post in threaded view
|

[Bug 261277] Windows and Linux Frontend using the same database

Marcel Wiesweg
In reply to this post by Bugzilla from tobias@kaminsky.me
https://bugs.kde.org/show_bug.cgi?id=261277





--- Comment #13 from Marcel Wiesweg <marcel wiesweg gmx de>  2011-10-29 12:36:45 ---
Sorry, the URL formatting I gave is wrong: The second query item is appended
with a "&", the "?" is only appended once before all query items.
Interestingly, QUrl does not percent-encode the slashes at all:

"networkshareid:?mountpath=/mnt/test1&mountpath=/mnt/test2"

This test works:

    QUrl url;
    url.setScheme("networkshareid");
    url.addQueryItem("mountpath", "/mnt/test1");
    url.addQueryItem("mountpath", "/mnt/test2");
    QByteArray urlString = url.toEncoded();
    QUrl url2 = QUrl::fromEncoded(urlString);
    qDebug() << url2.toEncoded()
             << url.toString();
    qDebug() << url2.allQueryItemValues("mountpath");

Output

"networkshareid:?mountpath=/mnt/test1&mountpath=/mnt/test2"
"networkshareid:?mountpath=/mnt/test1&mountpath=/mnt/test2"
("/mnt/test1", "/mnt/test2")

--
Configure bugmail: https://bugs.kde.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.
_______________________________________________
Digikam-devel mailing list
[hidden email]
https://mail.kde.org/mailman/listinfo/digikam-devel
Reply | Threaded
Open this post in threaded view
|

[Bug 261277] Windows and Linux Frontend using the same database

Bugzilla from tobias@kaminsky.me
In reply to this post by Bugzilla from tobias@kaminsky.me
https://bugs.kde.org/show_bug.cgi?id=261277





--- Comment #14 from Tobias Kaminsky <tobias kaminsky me>  2011-10-29 12:55:08 ---
Great.
Is this also in Digikam 2.2.0 for Windows?
If so, then I will try it with this setup:
Linux (Master)
Linux: connects via NFS
Windows: connects via Samba

Thank you
Tobi

--
Configure bugmail: https://bugs.kde.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.
_______________________________________________
Digikam-devel mailing list
[hidden email]
https://mail.kde.org/mailman/listinfo/digikam-devel
Reply | Threaded
Open this post in threaded view
|

[Bug 261277] Windows and Linux Frontend using the same database

Bugzilla from tobias@kaminsky.me
In reply to this post by Bugzilla from tobias@kaminsky.me
https://bugs.kde.org/show_bug.cgi?id=261277





--- Comment #15 from Tobias Kaminsky <tobias kaminsky me>  2011-10-30 14:35:29 ---
(In reply to comment #14)
> Great.
> Is this also in Digikam 2.2.0 for Windows?
> If so, then I will try it with this setup:
> Linux (Master)
> Linux: connects via NFS
> Windows: connects via Samba
>
> Thank you
> Tobi

It works without a problem, but on windows it says that the old locale is utf-8
and the new is "system". But as far as I see there are no problems.

Tobi

--
Configure bugmail: https://bugs.kde.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.
_______________________________________________
Digikam-devel mailing list
[hidden email]
https://mail.kde.org/mailman/listinfo/digikam-devel
Reply | Threaded
Open this post in threaded view
|

[Bug 261277] Windows and Linux Frontend using the same database

Ananta Palani
In reply to this post by Bugzilla from tobias@kaminsky.me
https://bugs.kde.org/show_bug.cgi?id=261277





--- Comment #16 from Ananta Palani <anantapalani gmail com>  2011-11-02 15:30:02 ---
(In reply to comment #14)
> Is this also in Digikam 2.2.0 for Windows?

Only the changes made prior to comment #4 are included in 2.2.0 for Windows.


(In reply to comment #9)
> This fix from #8 is valid for you under Windows ?

I will try recompiling soon and let you know. It looks like it would work just
fine.


(In reply to comment #13)
Marcel, what is the expected behavior if digiKam can access multiple mountpaths
for a single networkshareid? Will it ignore all the other mountpaths after the
first working mountpath it finds?

Also, how is the behavior of digiKam different with 'Local collections' and
'Collections on Network Shares' if I am able to add a local collection to
either? In other words, why is there a distinction between the two at all?
Couldn't there be just be a list of 'collections' and for each collection we
have can have multiple mountpaths (i.e. replace 'Local collections' and
'Collections on Network Shares' with a single 'Collections')? Maybe in Linux
the behavior is different.

-Ananta

--
Configure bugmail: https://bugs.kde.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.
_______________________________________________
Digikam-devel mailing list
[hidden email]
https://mail.kde.org/mailman/listinfo/digikam-devel
Reply | Threaded
Open this post in threaded view
|

[Bug 261277] Windows and Linux Frontend using the same database

Ananta Palani
In reply to this post by Bugzilla from tobias@kaminsky.me
https://bugs.kde.org/show_bug.cgi?id=261277





--- Comment #17 from Ananta Palani <anantapalani gmail com>  2011-11-02 15:33:26 ---
(In reply to comment #13)
Also, will a sigle thumbnail be shared for the same image between all
mountpoints? (ex. 3 mount points, but only 1 thumbnail created).

--
Configure bugmail: https://bugs.kde.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.
_______________________________________________
Digikam-devel mailing list
[hidden email]
https://mail.kde.org/mailman/listinfo/digikam-devel
Reply | Threaded
Open this post in threaded view
|

[Bug 261277] Windows and Linux Frontend using the same database

Marcel Wiesweg
In reply to this post by Bugzilla from tobias@kaminsky.me
https://bugs.kde.org/show_bug.cgi?id=261277





--- Comment #18 from Marcel Wiesweg <marcel wiesweg gmx de>  2011-11-02 21:02:50 ---

> Marcel, what is the expected behavior if digiKam can access multiple mountpaths
> for a single networkshareid? Will it ignore all the other mountpaths after the
> first working mountpath it finds?

Yes

> Also, how is the behavior of digiKam different with 'Local collections' and
> 'Collections on Network Shares' if I am able to add a local collection to
> either? In other words, why is there a distinction between the two at all?
> Couldn't there be just be a list of 'collections' and for each collection we
> have can have multiple mountpaths (i.e. replace 'Local collections' and
> 'Collections on Network Shares' with a single 'Collections')? Maybe in Linux
> the behavior is different.

There is at the moment no good way for us to detect if a specific path is a
mounted network share (there's statfs on Linux, something different on Windows,
neither implemented, no cross-platform KDE libs support).

So for network collections, we just see if the specified folder is empty, then
the collection is unavailable. It's really accessed by mount path only. Local
collections are tied to a storage medium (harddisk partition)

> Also, will a sigle thumbnail be shared for the same image between all
> mountpoints? (ex. 3 mount points, but only 1 thumbnail created).

Yes, because thumbnails are preferably referenced by a file hash

--
Configure bugmail: https://bugs.kde.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.
_______________________________________________
Digikam-devel mailing list
[hidden email]
https://mail.kde.org/mailman/listinfo/digikam-devel
Reply | Threaded
Open this post in threaded view
|

[Bug 261277] Windows and Linux Frontend using the same database

Marcel Wiesweg
In reply to this post by Bugzilla from tobias@kaminsky.me
https://bugs.kde.org/show_bug.cgi?id=261277


Marcel Wiesweg <[hidden email]> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|UNCONFIRMED                 |RESOLVED
         Resolution|                            |FIXED




--- Comment #19 from Marcel Wiesweg <marcel wiesweg gmx de>  2011-11-05 13:43:41 ---
Ok, backend solution seems to work. Not sure if and how this should be
presented in a GUI.

--
Configure bugmail: https://bugs.kde.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.
_______________________________________________
Digikam-devel mailing list
[hidden email]
https://mail.kde.org/mailman/listinfo/digikam-devel
12