Bug 149983 - show recursively sub-album images
Summary: show recursively sub-album images
Status: RESOLVED FIXED
Alias: None
Product: digikam
Classification: Applications
Component: Database-Albums (show other bugs)
Version: 0.9.1
Platform: unspecified Linux
: NOR wishlist
Target Milestone: ---
Assignee: Digikam Developers
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2007-09-18 18:21 UTC by Sébastien Lamy
Modified: 2019-12-25 10:19 UTC (History)
1 user (show)

See Also:
Latest Commit:
Version Fixed In: 7.0.0


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Sébastien Lamy 2007-09-18 18:21:34 UTC
Version:           0.9.1 (using KDE 3.5.6, Kubuntu (feisty) 4:3.5.6-0ubuntu14.1)
Compiler:          Target: i486-linux-gnu
OS:                Linux (i686) release 2.6.20-16-generic

Hi
I think it would be great if there was a little checkbox somewhere permitting to change the album-view behaviour:
I mean when selecting an album with sub-album, show the images of the current album AND all its sub-album, recursively.

There can be a separation between the images of each sub-album (like it is the keys in the "tag" view, where images are album-separated)

This would be usefull to have a good overview of a "global album" without having to browse all the sub-albums individually.

I would be glad to help you developping this function, and maybe one or two others I have in mind (for the tagging interface). It would be perfect if there was a french-speaking contributor with a little time, in order to help me getting started.

If no french contributor, an english-speaking one would be alright.
Comment 1 Arnd Baecker 2007-09-18 18:48:04 UTC
Hi Sebastian,

first I thought that this wish was already mentioned in the BKO,
but I could not find anything.
A related (highly voted for) wish is
http://bugs.kde.org/show_bug.cgi?id=134389

In my opinion your suggestion would be a very welcome feature.

Even more so, if you would like to contribute to digikam!
Gilles, is one of the main authors of digikam and a native French speaker.
He is extremely helpful; in particular you may want
to come to the irc.freenode.net, channel #digikam, to ask questions.

Best, Arnd
Comment 2 Sébastien Lamy 2007-09-19 03:13:53 UTC
I dont have any IRC client, and i'm not at my ease with it yet. Any mail 
of Gilles?

Arnd Baecker a écrit :
[bugs.kde.org quoted mail]
Comment 3 Arnd Baecker 2007-09-19 08:12:21 UTC
Hi Sebastien,

as IRC client you may use the KDE programm `konversation`
(Gilles is usually around in the evenings).
Gilles is available via:  caulier dot gilles  at gmail dot com  ,
but for the moment we can keep the discussion here.

To get started:
- first get the current version from svn working
  (I.e. follow http://www.digikam.org/?q=download/svn
   under "Install digiKam in your Home Directory"
  Note that the current svn version of exiv2 already
  needs XMP support, so v0.15 should be good enough)
- subscribe to Digikam-users and Digikam-devel
  (unless you have already done so ;-)

Now concerning the problem itself, let me try to
give you a few pointers (note that I am a real beginner
in poking around in digikams code, so all the following
might not be correct and should be double-checked by you ...;):

- When an album is selected,
  void DigikamApp::slotAlbumSelected(bool val)
  in graphics/digikam/digikam/digikamapp.cpp
  is called.
  There are different types of albums:
  - PAlbum (physical)
  - TAlbum (tags)
  - SAlbum (search)
  - DAlbum (date)
  The last three are virtual and all are derived from
   Album, which is the parent class (see album.cpp)
  Palbum is the one of interest,
  while for TAlbum the recursive view already works.
  (For SAlbum it does not make sense and for DAlbum,
   well, watching a whole year does not work.
  )

- I *think* (please check!)
  that in the end
    void AlbumLister::openAlbum(Album *album)
  in albumlister.cpp  is called,
  which then transfers the real job of digging
  out the album to kio_digikamalbums:
       // Protocol = digikamalbums -> kio_digikamalbums
      d->job = new KIO::TransferJob(album->kurl(), KIO::CMD_SPECIAL,
                                    ba, QByteArray(), false);
 where album->kurl() is essentially the path of the selected album.
 To check you could just add a
   DWarning() << "Right album?: " << album->kurl() << endl;
 before that statement and see if it arrives there.

 If this is true, the next step is to start digging
 KIO::TransferJob and see how one can add recursive
 subfolder view.

- Well, I had a further look, and it seems
  that the relevant routine is
  void kio_digikamalbums::special(const QByteArray& data)
   in digikam/kioslave/digikamalbums.cpp
  where the calls
    QStringList values;
    m_sqlDB.execSql(QString("SELECT id FROM Albums WHERE url='%1';")
                    .arg(escapeString(url)), &values);
    int albumid = values.first().toInt();


    values.clear();
    m_sqlDB.execSql(QString("SELECT id, name, datetime FROM Images "
                                    "WHERE dirid = %1;")
                            .arg(albumid), &values);
  are done.
  If one modifies the query, as discussed in
    http://bugs.kde.org/show_bug.cgi?id=149983
  this might already do the job...

So, before you try to make it configurable, I would
recommend to try to just always activate it. Adding
the configuration stuff is the simpler bit.

All looks complicated at first glance, but you will
get used to that very quickly, I am sure!

Hope this helps a bit,

Arnd
Comment 4 Arnd Baecker 2007-09-19 08:22:31 UTC
Now I found the wish I had in mind. So this wish is a duplicate.
Any further discussion should therefore be done
in http://bugs.kde.org/show_bug.cgi?id=128231  .

*** This bug has been marked as a duplicate of 128231 ***
Comment 5 caulier.gilles 2019-12-25 10:19:23 UTC
Not reproducible using digiKam 7.0.0 beta1.