Commit Graph
4249 Commits
Author SHA1 Message Date
Bharat Mediratta df3a1e730e Skip the copy if the watermark module is enabled *and* there's a watermark. 2009-05-12 05:56:27 +00:00
Bharat Mediratta fdb17d75ce Import keywords as tags.
Refactor the general flow of g2_import_task::import() to simplify it
and make it more sensible.  It had gotten a little overgrown.  It's
still a little overgrown, but I don't see an easy way to simplify it
from here.
2009-05-12 05:48:15 +00:00
Bharat Mediratta c397cc73be Don't divide by zero if there are no photos in the Gallery. 2009-05-12 04:22:05 +00:00
Bharat Mediratta 8ae6a7a144 Import tags. 2009-05-12 04:04:26 +00:00
Bharat Mediratta 61ad68f1e6 Deal gracefully with the case that the Gallery 2 instance didn't have
any resizes (or thumbnails).

Fix a case where we were over-weighting the max dimension for square
resizes and thumbs.
2009-05-12 02:12:39 +00:00
Bharat Mediratta a70cbed1d0 Import comments. This was a lot easier than I thought it would be 2009-05-11 20:16:54 +00:00
Bharat Mediratta de812e1e82 Refactor to support pagination and simplify the code.
- Simplify the public controller methods
- Fix a bug where missing thumbnails would cause a divide by zero error
- actually pay attention to the page # for pagination and limit the query accordingly.
2009-05-11 20:15:24 +00:00
Bharat Mediratta a2c188ac37 Update exif lib to upstream r3901 which resolves the following tickets:
http://www.zenphoto.org/trac/ticket/1117
  http://www.zenphoto.org/trac/ticket/1118
2009-05-11 19:19:13 +00:00
Bharat Mediratta 74b8937963 Framework for importing comments -- we don't actually do the import yet 2009-05-11 17:57:34 +00:00
Bharat Mediratta 62053b2c5c Add some comments 2009-05-11 16:38:58 +00:00
Bharat Mediratta 6ec24f2f00 Don't attempt to interact with comments if the Gallery2 comment module is not installed.
Resolves ticket #276
2009-05-11 16:27:52 +00:00
Tim Almdal 11477cbc3e Correct the reference to $item->id 2009-05-11 14:32:18 +00:00
Bharat Mediratta 8b33371e99 Index photos as they're added 2009-05-11 05:18:23 +00:00
Bharat Mediratta 891930ec2b Don't accept negative capture dates from EXIF, they're probably just crap data. 2009-05-11 04:22:50 +00:00
Bharat Mediratta 977d0da9f3 Refactor the exif module to denormalize the stored data. This way we
have a single exif_record for each item instead of 1 per key.  It's
about 5x faster to scan photos this way.
2009-05-11 03:53:44 +00:00
Bharat Mediratta b706cb69ac Reinstate abortCount code, originally added to exifer in G2:
http://gallery.svn.sourceforge.net/viewvc/gallery?view=rev&revision=13422

it was commented out in the ZenPhoto version.  Filed upstream ticket
about this:
  http://www.zenphoto.org/trac/ticket/1118
2009-05-11 02:37:12 +00:00
Bharat Mediratta 6dbd8aa002 Don't use ORM to delete old exif_keys.. it's too inefficient 2009-05-11 02:35:43 +00:00
Bharat Mediratta 8c776ffa6f Add a cache in intel2Moto(). Because of the duplicate nature of the
calls to this function, this is a 1-2x order of magnitude performance
improvement.
2009-05-11 01:36:36 +00:00
Bharat Mediratta fbcb01caca Only run copy_matching_thumbnails_and_resizes() when we're doing an import, else it interferes with thumbnail/resize generation during regular imports 2009-05-10 21:46:58 +00:00
Bharat Mediratta afa4a8acca After ajax login, just reload the current page. 2009-05-10 19:57:58 +00:00
Bharat Mediratta ce137d7bdc Change wording to avoid breaking File_Structure_Test 2009-05-10 18:52:08 +00:00
Bharat Mediratta cc0fcc8961 Use a clearer query syntax for deleting extra search and exif records (thanks Romain LE DISEZ) 2009-05-10 18:44:03 +00:00
Bharat Mediratta e6d3d42c22 Make the code that copies g2 derivatives more robust if the g2 data file doesn't exist. 2009-05-10 04:04:33 +00:00
Bharat Mediratta 0872cce1ea Fix a bug where when we copied over the g2 thumb or resize, we weren't
saving its dimensions to the item.

Also, import originationTimestamp as captured field.
2009-05-10 01:11:16 +00:00
Bharat Mediratta 99b7cdeee1 Fix a copy/paste typo. 2009-05-10 00:13:39 +00:00
Tim Almdal e2d03c63fb Remove quotes and correct typo 2009-05-09 21:59:32 +00:00
Bharat Mediratta a43c57bf61 Sigh.. fix it the *right* way. 2009-05-09 21:13:59 +00:00
Bharat Mediratta 8c611fdc1b Oops, add in a missing ] (thanks kb7sei!) 2009-05-09 21:11:55 +00:00
Bharat Mediratta 6b00aa70e0 Don't try to put g2_stats and g2_size into the view if g2 is not initialized. 2009-05-09 20:18:24 +00:00
Bharat Mediratta 1bfbae15f6 Usability and performance improvements
Significantly speed up the process by copying Gallery2 thumbnails and
resizes wherever possible instead of regenerating them.  This requires
us to figure out the dimensions of the original G2 derivative and make
sure that it matches in some reasonable way.

To allow users to take advantage of this, calculate the optimal thumb
and resize size to set in G3 to match what was used in G2.  While
we're at it, give the user some idea of how much data is available in
G2 to import.
2009-05-09 19:03:00 +00:00
Bharat Mediratta db465072f5 Fix indentation. 2009-05-09 17:45:33 +00:00
Tim Almdal 48ee3d5fe8 Fix for ticket #217 2009-05-09 06:11:17 +00:00
Bharat Mediratta d1a9138925 Don't try to use mb_detect_encoding if the module isn't loaded. Not sure if this is a great solution, but it'll probably cut down on a big class of errors opportunistically 2009-05-08 19:16:48 +00:00
Tim Almdal 2c2839c13b Create a thumbnail stack of selected thumbnails for the organize
drawer
2009-05-07 17:39:34 +00:00
Tim Almdal 6a295dc93d 1) Leave an object selected if its clicked.
2) And a 1em left margin to provide more spacing, so the lasso is less inclusive
2009-05-07 05:16:56 +00:00
Bharat Mediratta 85832e2e0f Don't try to use the exif/iptc values if we couldn't extract them cleanly. 2009-05-07 05:04:11 +00:00
Tim Almdal 5305d1f569 Improve the selection/drag handling so that drag of a single item
doesn't have to be selected first
2009-05-07 04:56:08 +00:00
Bharat Mediratta fc6bdbbbc8 Grab photo capture date and captions from EXIF/IPTC data.
- Add a "captured" column to the items table.
- Pull the DateTime EXIF field and put it into the captured column
- Pull the Caption EXIF & IPTC fields and put them into the description
  field if there was not already a value there
2009-05-07 01:18:31 +00:00
Bharat Mediratta 934bc1e1f1 Add debug log strings with the G2 stack trace when there's a failure in a g2 call. 2009-05-07 00:46:35 +00:00
Tim Almdal a8879cfe89 1) Improved selection processing.
2) Drawer closes if no images or albums are selected
2009-05-06 20:27:49 +00:00
Bharat Mediratta e83b980d3d Don't fail when trying to import site admin group. Resolves ticket #249 2009-05-06 04:08:45 +00:00
Bharat Mediratta 2846e0df8b Return an array from available_tasks() when unconfigured.
Fixes ticket #247.
2009-05-05 03:56:42 +00:00
Bharat Mediratta 13f8a0dd7b Detect input encodings from EXIF/IPTC data and convert to utf-8 as
appropriate.  This allows us to switch the exif value column back to
varchar and improves the way that we deal with non-utf8 data in our
embedded EXIF/IPTC data.
2009-05-05 03:30:49 +00:00
Bharat Mediratta e70be4c0c2 Cache the entry in our in-memory map when we map a g2 item to a g3
item in the database.  This fixes the problem that the import fails
the first time around because the various groups are mapped in the db
but aren't available in the request.
2009-05-02 21:52:46 +00:00
Bharat Mediratta b4c9a97050 Create item helper and move move_item(), remove_album_cover() and
make_album_cover() functions into it.
2009-05-02 20:34:02 +00:00
Bharat Mediratta 0fd82598b5 Move make_album_cover and remove_album_cover out of Item_Model and
into the core helper.  Clean up interactions so that when we remove an
album cover we pick a new one, or clean out the old album cover if
there are no other choices.
2009-05-02 20:14:13 +00:00
Bharat Mediratta 977963444a Remove direct call to item_before_delete since r20647 moved it into Item_Model 2009-05-02 19:28:05 +00:00
Bharat Mediratta b4bc0a29a5 Change comment style for brevity. 2009-05-02 19:14:31 +00:00
Bharat Mediratta 54fa2391d0 Whitespace cleanup. 2009-05-02 19:14:06 +00:00
Bharat Mediratta 486517fac5 Clean up API to be organized around the functionality it provides, not the feature its provided for. 2009-05-02 19:11:22 +00:00