fix small problems with captionfile of album of <dir> containing images
[booh] / bin / booh
index caf61e407a255b4fe239a82fdee346f06be97e02..9b4410d17d767c4b894376fbd684b4e814f90dbb 100755 (executable)
--- a/bin/booh
+++ b/bin/booh
@@ -2083,6 +2083,10 @@ def save_changes(*forced)
         $xmldir.add_attribute('thumbnails-caption', $thumbnails_title.buffer.text)
     end
 
+    if $xmldir.attributes['thumbnails-caption']
+        $xmldir.add_attribute('thumbnails-captionfile', $subalbums_edits[$xmldir.attributes['path']][:captionfile])
+    end
+
     #- remove and reinsert elements to reflect new ordering
     saves = {}
     cpt = 0
@@ -2235,8 +2239,8 @@ def change_dir
         subalbums_edits_bypos[counter] = $subalbums_edits[xmldir.attributes['path']]
         if xmldir == $xmldir
             thumbnail_file = "#{current_dest_dir}/thumbnails-thumbnail.jpg"
+            captionfile = from_utf8(xmldir.attributes['thumbnails-captionfile'])
             caption = xmldir.attributes['thumbnails-caption']
-            captionfile, dummy = find_subalbum_caption_info(xmldir)
             infotype = 'thumbnails'
         else
             thumbnail_file = "#{current_dest_dir}/thumbnails-#{make_dest_filename(from_utf8(File.basename(xmldir.attributes['path'])))}.jpg"