Bug 180055 - Can't create new photoset: Invalid primary photo id (n) [patch]
Summary: Can't create new photoset: Invalid primary photo id (n) [patch]
Status: RESOLVED FIXED
Alias: None
Product: digikam
Classification: Applications
Component: Plugin-WebService-Flickr (show other bugs)
Version: 5.6.0
Platform: Compiled Sources Linux
: NOR normal
Target Milestone: ---
Assignee: Digikam Developers
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2009-01-08 19:57 UTC by Will Stephenson
Modified: 2018-03-23 11:30 UTC (History)
4 users (show)

See Also:
Latest Commit:
Version Fixed In: 0.5.0


Attachments
Delay photo set creation until first picture is uploaded (21.06 KB, patch)
2009-05-16 10:03 UTC, Pieter Edelman
Details
Updated patch against latest svn r978055 (16.32 KB, patch)
2009-06-06 11:46 UTC, James Vega
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Will Stephenson 2009-01-08 19:57:38 UTC
Version:            (using Devel)
OS:                Linux
Installed from:    Compiled sources

No matter what I enter as 'primary photo id', 0, 1, n, <blank>, I get an error message "Photoset creation failedInvalid primary photo id (n)".

It should not be necessary to specify a photo id when creating a photoset, but the flickr API assumes [1] that the photoset is being created from an existing set of photos and thus that the user can give a photo ID. I don't see how a photoset can be created before an upload - maybe you should make the uploader a wizard and create the set after the upload?

[1] http://www.flickr.com/services/api/flickr.photosets.create.html
Comment 1 caulier.gilles 2009-01-08 20:07:49 UTC
Do you use KDE3 or KDE4 version of kipi-plugins ?

Gilles Caulier
Comment 2 Will Stephenson 2009-01-09 09:49:22 UTC
0.2beta5 on KDE 4.  Any bugreport from me on digikam refers to KDE 4.
Comment 3 Luka Renko 2009-03-21 21:35:47 UTC
See also this thread:
http://mail.kde.org/pipermail/digikam-users/2009-March/007229.html
Comment 4 Pieter Edelman 2009-05-16 10:03:42 UTC
Created attachment 33708 [details]
Delay photo set creation until first picture is uploaded

Flickr doesn't know the concept of empty photosets, is expects that sets are created from an already present set of photos, one of which should be the main photo. I think the most sensible thing to do is to delay the actual creation of the photo set until the first photo for it is uploaded. The following patch implements this principle.

After the photo set creation dialog is executed, a new FPhotoSet object is created with a temporary ID in the form of "UNIDENTIFIED_" followed by a unique number, instead of the Flickr ID. When the addToPhotoSet method encounters this, it invokes the createPhotoSet method. The resulting ID is consequently set in the FPhotoSet object and the relevant entry in the m_photoSetList.

To facilitate this, I modified the FlickrTalker object so that it doesn’t store the ID of the selected photo (m_selectedPhotoSetId), but instead the complete FPhotoSet (m_selectedPhotoSet).

This patch removes the 'primary photo id' option altogether from the photo set creation dialogue. I also removed the 'photoset name' option – as far as I can tell it isn't used for anything.

This patch implies the patch in bug 192541.
Comment 5 caulier.gilles 2009-05-16 10:27:50 UTC
Pieter, Thanks you for your patch. it's very appreciate.

Mathias,

As you use and know Flickr Export plugin, can you take a look please ?

Thanks in advance

Gilles
Comment 6 Jean-Marc Liotier 2009-05-31 15:51:06 UTC
If someone has a binary of the plugin available somewhere with Pieter's patch, I'm willing to test it.
Comment 7 James Vega 2009-06-06 11:46:42 UTC
Created attachment 34320 [details]
Updated patch against latest svn r978055

I tested Pieter's patch (refreshed version attached) against latest svn.  The patch does work as intended.  Creating a new set has a simplified dialog, only requiring the title and description.  The set was created and the first uploaded photo was set as the primary photo.  I was also able to upload photos directly to my photostream, without needing to add them to a set.
Comment 8 caulier.gilles 2009-06-14 20:54:19 UTC
*** Bug 196179 has been marked as a duplicate of this bug. ***
Comment 9 caulier.gilles 2009-06-28 09:32:25 UTC
targeted to 0.5.0 release.
Comment 10 Nicolas L. 2009-07-05 03:52:30 UTC
SVN commit 991484 by nlecureuil:

Fix creation of photoset ( Patch from Pieter Edelman and enhanced by James Vega )
BUG:180055
BUG:192541
CCMAIL:vega.james@gmail.com
CCMAIL:p.edelman@gmx.net


 M  +2 -1      NEWS  
 M  +8 -57     flickrexport/flickralbumdialog.ui  
 M  +50 -25    flickrexport/flickrtalker.cpp  
 M  +6 -1      flickrexport/flickrtalker.h  
 M  +73 -23    flickrexport/flickrwindow.cpp  
 M  +2 -1      flickrexport/flickrwindow.h  


WebSVN link: http://websvn.kde.org/?view=rev&revision=991484