[Bug 307253] New: Rename images according to photo (exif) date instead of file date

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

[Bug 307253] New: Rename images according to photo (exif) date instead of file date

pochini
https://bugs.kde.org/show_bug.cgi?id=307253

            Bug ID: 307253
          Severity: normal
           Version: 2.9.0
          Priority: NOR
          Assignee: [hidden email]
           Summary: Rename images according to photo (exif) date instead
                    of file date
    Classification: Unclassified
                OS: Linux
          Reporter: [hidden email]
          Hardware: Compiled Sources
            Status: UNCONFIRMED
         Component: Import
           Product: digikam

Digkam has options to rename files while importing them. The problem is that
the "[date]" option expands to the date/time of the file. This has the annoying
side effect of making the file names all wrong for files which have been
copied. Furthermore, when the camera is configured to save both raw and jpg,
files have a different mtime, so the two versions of the same image end up
having different names.

Reproducible: Always

--
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 307253] Rename images according to photo (exif) date instead of file date

pochini
https://bugs.kde.org/show_bug.cgi?id=307253

--- Comment #1 from [hidden email] ---
Created attachment 74106
  --> https://bugs.kde.org/attachment.cgi?id=74106&action=edit
Rename images according to photo (exif) date

This patch fixes the problem I reported.

--
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 307253] Rename images according to photo (exif) date instead of file date [PATCH]

Gilles Caulier-4
In reply to this post by pochini
https://bugs.kde.org/show_bug.cgi?id=307253

Gilles Caulier <[hidden email]> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |[hidden email]
                   |                            |, [hidden email]
            Summary|Rename images according to  |Rename images according to
                   |photo (exif) date instead   |photo (exif) date instead
                   |of file date                |of file date [PATCH]

--
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 307253] Rename images according to photo (exif) date instead of file date [PATCH]

Andi Clemens
In reply to this post by pochini
https://bugs.kde.org/show_bug.cgi?id=307253

Andi Clemens <[hidden email]> changed:

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

--- Comment #2 from Andi Clemens <[hidden email]> ---
Patch seems to be ok, I will apply it...

--
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 307253] Rename images according to photo (exif) date instead of file date [PATCH]

Gilles Caulier-4
In reply to this post by pochini
https://bugs.kde.org/show_bug.cgi?id=307253

Gilles Caulier <[hidden email]> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
   Version Fixed In|                            |3.0.0

--
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 307253] Rename images according to photo (exif) date instead of file date [PATCH]

Andi Clemens
In reply to this post by pochini
https://bugs.kde.org/show_bug.cgi?id=307253

Andi Clemens <[hidden email]> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|RESOLVED                    |REOPENED
   Version Fixed In|3.0.0                       |
         Resolution|FIXED                       |---
     Ever confirmed|0                           |1

--- Comment #3 from Andi Clemens <[hidden email]> ---
I'm unable to apply the patch because the import tool doesn't use the custom
renaming option anymore?

The option is broken... Someone seems to have changed the tool and removed the
custom renaming option...

I will check with "git blame"....

--
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 307253] Rename images according to photo (exif) date instead of file date [PATCH]

Andi Clemens
In reply to this post by pochini
https://bugs.kde.org/show_bug.cgi?id=307253

--- Comment #4 from Andi Clemens <[hidden email]> ---
I hope these errors are not present in the current digiKam release... the
import tool was not able to be used due to nullpointer exceptions, and now it
doesn't seem to work correctly...

--
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 307253] Rename images according to photo (exif) date instead of file date [PATCH]

Andi Clemens
In reply to this post by pochini
https://bugs.kde.org/show_bug.cgi?id=307253

--- Comment #5 from Andi Clemens <[hidden email]> ---
If I remove the function RenameCustomizer::newName() and
RenameCustomizer::renameManager(), digiKam still compiles. This can not be
right. At least one of these methods must be used to get the new name for
imported images.

--
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 307253] Rename images according to photo (exif) date instead of file date [PATCH]

Gilles Caulier-4
In reply to this post by pochini
https://bugs.kde.org/show_bug.cgi?id=307253

Gilles Caulier <[hidden email]> changed:

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

--- Comment #6 from Gilles Caulier <[hidden email]> ---
Andi, it's probably due to changes from Islam in Import tool revamp project. I
CC him for info...

Gilles

--
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 307253] Rename images according to photo (exif) date instead of file date [PATCH]

Gilles Caulier-4
In reply to this post by pochini
https://bugs.kde.org/show_bug.cgi?id=307253

Gilles Caulier <[hidden email]> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
            Version|2.9.0                       |3.0.0

--
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 307253] Rename images according to photo (exif) date instead of file date [PATCH]

pochini
In reply to this post by pochini
https://bugs.kde.org/show_bug.cgi?id=307253

--- Comment #7 from [hidden email] ---
My patch is incomplete. It fixes only the names of the photos which have been
loaded (at least their thumbnails). The name get fixed only when the icon is
selected while it is visible. If I press ctrl-a, then I scroll down the list,
the names of the newly exposed icons are wrong. Once a photo is assigned the
right name, it stays.
When AdvancedRenameManager::addFile() is called for a file which hasn't been
loaded yet datetime.toTime_t() is -1. I'm not sure how to fix this issue...

--
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 307253] Rename images according to photo (exif) date instead of file date [PATCH]

Andi Clemens
In reply to this post by pochini
https://bugs.kde.org/show_bug.cgi?id=307253

--- Comment #8 from Andi Clemens <[hidden email]> ---
Are you sure you are calling AdvancedRenameManager::addFile()? This method is
private and should not be accessible.

--
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 307253] Rename images according to photo (exif) date instead of file date [PATCH]

pochini
In reply to this post by pochini
https://bugs.kde.org/show_bug.cgi?id=307253

--- Comment #9 from [hidden email] ---
This is the backtrace:

#1  0x00000000006b97ca in Digikam::AdvancedRenameManager::addFiles
(this=0x4b8bd80, files=<optimized out>) at
/home/giu/apps/digikam-2.9.0/core/utilities/advancedrename/advancedrenamemanager.cpp:281
#2  0x00000000007b237f in Digikam::CameraIconView::slotUpdateDownloadNames
(this=0x32eacf0, hasSelection=true) at
/home/giu/apps/digikam-2.9.0/core/utilities/cameragui/views/cameraiconview.cpp:481
#3  0x00007ffff25f45f1 in QMetaObject::activate(QObject*, QMetaObject const*,
int, void**) () from /usr/lib64/qt4/libQtCore.so.4
#4  0x00000000007acfe0 in Digikam::CameraIconView::signalNewSelection
(this=<optimized out>, _t1=true) at
/home/giu/apps/digikam-2.9.0/build/core/utilities/cameragui/cameraiconview.moc:223
#5  0x00000000007ad509 in Digikam::CameraIconView::slotSelectionChanged
(this=0x32eacf0) at
/home/giu/apps/digikam-2.9.0/core/utilities/cameragui/views/cameraiconview.cpp:586
#6  0x00007ffff25f45f1 in QMetaObject::activate(QObject*, QMetaObject const*,
int, void**) () from /usr/lib64/qt4/libQtCore.so.4
#7  0x000000000078a59a in Digikam::IconView::selectItem (this=0x32eacf0,
item=0x4c20590, select=<optimized out>) at
/home/giu/apps/digikam-2.9.0/core/utilities/cameragui/q3support/iconview.cpp:500
#8  0x00000000007bfbec in Digikam::IconItem::setSelected (this=0x4c20590,
val=true, cb=true) at
/home/giu/apps/digikam-2.9.0/core/utilities/cameragui/q3support/iconitem.cpp:186
#9  0x0000000000789d10 in Digikam::IconView::slotRearrange (this=0x32eacf0) at
/home/giu/apps/digikam-2.9.0/core/utilities/cameragui/q3support/iconview.cpp:827
#10 0x00007ffff25f45f1 in QMetaObject::activate(QObject*, QMetaObject const*,
int, void**) () from /usr/lib64/qt4/libQtCore.so.4
#11 0x00007ffff25f94e9 in QObject::event(QEvent*) () from
/usr/lib64/qt4/libQtCore.so.4
#12 0x00007ffff14f2a74 in QApplicationPrivate::notify_helper(QObject*, QEvent*)
() from /usr/lib64/qt4/libQtGui.so.4
#13 0x00007ffff14f78f3 in QApplication::notify(QObject*, QEvent*) () from
/usr/lib64/qt4/libQtGui.so.4
#14 0x00007ffff32e0f46 in KApplication::notify(QObject*, QEvent*) () from
/usr/lib64/libkdeui.so.5
#15 0x00007ffff25e086c in QCoreApplication::notifyInternal(QObject*, QEvent*)
() from /usr/lib64/qt4/libQtCore.so.4
#16 ...

I simply added in AdvancedRenameManager::addFile(const QString& filename, const
QDateTime& datetime) a printf("%d %s\n", datetime.toTime_t(), filename.ascii())
which shows that datetime is -1 the first time the thumbnail are loaded and
displayed. When I click on a thumbnail something updates datetime and it prints
the correct value of that thumbnail.

--
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 307253] Rename images according to photo (exif) date instead of file date [PATCH]

Marcel Wiesweg
In reply to this post by pochini
https://bugs.kde.org/show_bug.cgi?id=307253

--- Comment #10 from Marcel Wiesweg <[hidden email]> ---
Islam, is this regression fixed for the final release?
In the ImportUI, I see d->renameCustomizer being created and added to the UI.
But the line d->view->setRenameCustomizer() is commented out => how does the
view compute the adjusted names?

When computing the download name, starting from line 1685, the
renameCustomizer is not asked. The source could be the downloadUrl retrieved
from the view (I believe it was previously, but not a clean solution) but the
renameCustomizer is not asked here as well.

--
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 307253] Rename images according to photo (exif) date instead of file date [PATCH]

Marcel Wiesweg
In reply to this post by pochini
https://bugs.kde.org/show_bug.cgi?id=307253

--- Comment #11 from Marcel Wiesweg <[hidden email]> ---
No response from Islam.
Andi, can you give some guidance what would be the right lines of code to
retrieve a name from the RenameCustomizer?

--
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
|

[digikam] [Bug 307253] Rename images according to photo (exif) date instead of file date [PATCH]

Gilles Caulier-4
In reply to this post by pochini
https://bugs.kde.org/show_bug.cgi?id=307253

--- Comment #12 from Gilles Caulier <[hidden email]> ---
Andi,

This file can be considerated as fixed since you close bug #312433 ?

Gilles Caulier

--
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
|

[digikam] [Bug 307253] Rename images according to photo (exif) date instead of file date [PATCH]

Andi Clemens
In reply to this post by pochini
https://bugs.kde.org/show_bug.cgi?id=307253

--- Comment #13 from Andi Clemens <[hidden email]> ---
No I don't think so, the custom names are still not working. I had not yet the
time to look into this, so it definitely isn't fixed at the moment.

--
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
|

[digikam] [Bug 307253] Rename images according to photo (exif) date instead of file date [PATCH]

Gilles Caulier-4
In reply to this post by pochini
https://bugs.kde.org/show_bug.cgi?id=307253

Gilles Caulier <[hidden email]> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
            Version|3.0.0                       |3.1.0

--
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
|

[digikam] [Bug 307253] Rename images according to Exif date instead of file date [patch]

Gilles Caulier-4
In reply to this post by pochini
https://bugs.kde.org/show_bug.cgi?id=307253

Gilles Caulier <[hidden email]> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
            Summary|Rename images according to  |Rename images according to
                   |photo (exif) date instead   |Exif date instead of file
                   |of file date [PATCH]        |date [patch]

--
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
|

[digikam] [Bug 307253] Rename images according to Exif date instead of file date [patch]

Gilles Caulier-4
In reply to this post by pochini
https://bugs.kde.org/show_bug.cgi?id=307253

--- Comment #14 from Gilles Caulier <[hidden email]> ---
Git commit 7f3459d55dd453f257ece35398175bba22ea4109 by Gilles Caulier.
Committed on 25/01/2015 at 11:39.
Pushed by cgilles into branch 'master'.

Apply patch #90637 from Maik Qualmann to fix image renaming settings rules in
Import Tool to work properly while downloading.
Related: bug 342996, bug 314441, bug 329438, bug 342430
FIXED-IN: 4.7.0

M  +3    -1    NEWS
M  +2    -2    utilities/importui/backend/cameracontroller.cpp
M  +67   -44   utilities/importui/main/importui.cpp
M  +1    -0    utilities/importui/main/importui.h
M  +5    -0    utilities/importui/views/importview.cpp
M  +1    -0    utilities/importui/views/importview.h

http://commits.kde.org/digikam/7f3459d55dd453f257ece35398175bba22ea4109

--
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