Ignore:
Timestamp:
10/19/12 13:05:31 (7 years ago)
Author:
plg
Message:

if readme.txt defines Title:, we use it as album title

File:
1 edited

Legend:

Unmodified
Added
Removed
  • extensions/piwigo_import_tree/piwigo_import_tree.pl

    r18692 r18693  
    213213 
    214214    open(IN, '<', $desc_filepath); 
     215    my $title = undef; 
    215216    my $date_string = undef; 
    216217    my $is_details = 0; 
     
    225226            $date_string = $1; 
    226227        } 
     228        elsif ($desc_line =~ /^Title:\s*(.*)$/) { 
     229            $title = $1; 
     230        } 
    227231        elsif ($desc_line =~ /^Details:/) { 
    228232            # from now, all the remaining lines are "details" 
     
    236240 
    237241        if (defined $date_string) { 
    238             $comment = '<span class="albumDate">'.$date_string.'</span><br>' 
     242            $comment = '<span class="albumDate">'.$date_string.'</span><br>'; 
    239243        } 
    240244        $comment.= $details; 
     
    245249            comment => $comment, 
    246250        }; 
     251 
     252        if (defined $title) { 
     253            $form->{name} = $title; 
     254        } 
    247255 
    248256        piwigo_login(); 
Note: See TracChangeset for help on using the changeset viewer.