Ticket #1072 (closed enhancement: fixed)

Opened 21 months ago

Last modified 12 months ago

Picasa keeps uploading the same pictures

Reported by: anonymous Owned by:
Priority: normal Milestone: Firmware 2.3.7.0
Component: fon-plugin-picasa Version: 2.3.7.0 beta1
Severity: normal
Cc: decodecoding@… Hardware: 2.0n (FON2300)

Description

Adding pictures to the picasa folder and it keeps uploading the picture over and over.
removing lines 223-230 from  http://trac.fonosfera.org/fon-ng/browser/trunk/luci/libs/uploadd/luasrc/fon/gdata.lua seems to fix it but I guess they are there for a reason :)

Also as reported in  http://trac.fonosfera.org/fon-ng/ticket/495 when files are added through the Samba share they get added to the upload queue twice

Last thing, when they are uploaded they all show with the name 'fonera' it'd be cool if they could show their own name. Changing line 174 to

"<summary>"..file.."</summary>\r\n" ..

in the above file fixes this for me but I don't really know what I'm doing, just playing around.

Attachments

Change History

Changed 20 months ago by matthijs

  • status changed from new to investigate
  • milestone set to Firmware 2.3.7.0

Changed 12 months ago by matthijs

  • cc decodecoding@… added

#495 additionally reports that uploading files through FTP does not trigger an upload, so let's include that in this ticket and close #495 as a duplicate.

#495 also suggests that this applies to all uploader plugins, not just Picasa.

Changed 12 months ago by matthijs

  • status changed from investigate to testing-fix
  • severity changed from unknown to normal

I've been able to reproduce and fix all issues described in this ticket, except for the issue that files are uploaded twice. I've created a new ticket, #1172 to track that particular issue, so I can close this ticket once my fixes are committed.

I'm still testing those fixes, when they are committed, I'll closes this ticket.

Changed 12 months ago by matthijs

(In [2078]) uploadd: Fix the Picasa uploader uploading the same file over and over.

In r1915, the return value of httpclient.rquest_to_buffer was slightly change in case of an error, but this change silently broke the Picasa upload. There was some debugging code in place that didn't like the new return value, causing the uploadd uploader to error out directly after uploading the file, before having a chance to record that the file was uploaded. This caused the Picasa uploader to keep uploading the same file over and over again.

References: #1072

Changed 12 months ago by matthijs

(In [2079]) mountd: Also monitor uploader directories for moved files.

When mounting a disk, mountd installs inotify monitoring so it gets notified when a new file is written to the uploader (picasa, youtube, etc.) directories. It can then cause the file to be queued and uploaded.

However, mountd was looking for IN_CLOSE_WRITE events only, which means files which were closed after being opened with write access. There were two scenarios where this did not work:

  • When a file was first created outside of the relevant uploader directory (for example because it was downloaded by the Fonera downloader plugin, or just uploaded into a different directory) and then moved (e.g., through Samba) inside the uploader directory, the directory would not have been writting inside the watched directory, and mountd would not notice the change.
  • When uploading a file through FTP, the FTP daemon would first create and write to a temporary file (for which the monitoring would trigger, but not cause mountd to queue the file because it has no extension) and then rename (move) the file to the correct filename. This would also cause mountd to miss all the files uploaded through FTP.

The fix for both is simple: Make mountd watch for files moved into the watched directories as well, by looking for IN_MOVED_TO events.

References: #1072

Changed 12 months ago by matthijs

(In [2081]) uploadd: Set a sensible caption on files for Picasa.

In the upload, the "title" field was already set to the filename, but the "summary" field as always set to "Fonera". Apparently Picasa uses the former field for the username and the latter as the caption, causing all files uploaded to have a caption called "Fonera". This commit changes that to use the filename as the caption.

References: #1072

Changed 12 months ago by matthijs

(In [2082]) uploadd: Set sensible titles on files for Youtube.

Previously, all of the title, description and keywords would be set to "La Fonera upload", which was not very useful. Now, the title is set to the filename and the other two fields are left blank.

References: #1072

Changed 12 months ago by matthijs

I think all the issues raised in this ticket are fixed in SVN, so I'm closing this ticket.

Changed 12 months ago by matthijs

  • status changed from testing-fix to closed
  • resolution set to fixed

Changed 12 months ago by matthijs

Could you perhaps confirm that all these issues are indeed fixed by trying the latest automatic build from svn? The build is here:  http://download.fonosfera.org/auto-builds/fon-ng/fon-ng-r2085/

Changed 12 months ago by anonymous

I've checked uploading to picasa and youtube (I don't have a flickr or facebook account),
Both are now uploading, keeping the correct name and just uploading the once. I also tried uploading a file via FTP and it triggered an upload, so I think everything is sorted.
Many thanks matthijs.

Changed 12 months ago by matthijs

Cool, thanks for reporting back!

Add/Change #1072 (Picasa keeps uploading the same pictures)

Author


E-mail address and user name can be saved in the Preferences.


Action
as closed
 
Note: See TracTickets for help on using tickets.