Changeset 397


Ignore:
Timestamp:
13/07/08 19:37:15 (11 years ago)
Author:
stuarth
Message:

Experimental version to work with Erland's enhancements in bug #6023.

Location:
branches/pluggable-scanners
Files:
1 added
8 copied

Legend:

Unmodified
Added
Removed
  • branches/pluggable-scanners/HTML/EN/plugins/LazySearch2/settings/basic.html

    r378 r397  
    131131    <div class="settingSection"> 
    132132        <div class="prefHead">[% "SETUP_PLUGIN_LAZYSEARCH2_KEYWORD_HEAD" | string | upper %]</div> 
     133        <a href="http://www.hickinbottom.com/lazysearch" target="_blank"><img src="[% webroot %]settings/server/plugins/LazySearch2/settings/logo.jpg" alt="[% "PLUGIN_LAZYSEARCH2" | string | upper %]" class="viewSelect" align="right"></a> 
    133134 
    134135        [% IF prefs.pref_showhelp %] 
     
    185186    </div> 
    186187 
    187     <div class="settingSection"> 
    188         <div class="prefHead"> 
    189             <a href="http://www.hickinbottom.com/lazysearch" target="_blank"><img src="[% webroot %]settings/server/plugins/LazySearch2/settings/logo.jpg" alt="[% "PLUGIN_LAZYSEARCH2" | string | upper %]" class="viewSelect" align="right"></a> 
    190             [% "SETUP_PLUGIN_LAZYSEARCH2_DEBUGGING" | string | upper %] 
    191         </div> 
    192         [% IF prefs.pref_showhelp %] 
    193         <div class="prefDesc">[% "SETUP_PLUGIN_LAZYSEARCH2_LAZIFYNOW_DESC" | string %]</div> 
    194         [% END %] 
    195         <input name="pref_lazifynow" type="submit" class="stdclick" value="[% "SETUP_PLUGIN_LAZYSEARCH2_LAZIFYNOW_BUTTON" | string %]"> 
    196     </div> 
    197  
    198  
    199188[% PROCESS settings/footer.html %] 
  • branches/pluggable-scanners/Makefile

    r393 r397  
    2020# $Id$ 
    2121 
    22 VERSION=3.1 
    23 PERLSOURCE=Plugin.pm Settings.pm 
     22VERSION=3.1-ps 
     23PERLSOURCE=Plugin.pm Settings.pm Importer.pm 
    2424HTMLSOURCE=HTML/EN/plugins/LazySearch2/settings/basic.html HTML/EN/plugins/LazySearch2/settings/logo.jpg 
    2525SOURCE=$(PERLSOURCE) $(HTMLSOURCE) INSTALL strings.txt install.xml LICENSE 
  • branches/pluggable-scanners/Plugin.pm

    r393 r397  
    9090use constant LAZYSEARCH_KEYWORD_ALBUMARTISTS_DEFAULT => 0; 
    9191 
    92 # Constants that control the background lazy search database encoding. 
    93 use constant LAZYSEARCH_ENCODE_MAX_QUANTA    => 0.4; 
    94 use constant LAZYSEARCH_INITIAL_LAZIFY_DELAY => 5; 
    95  
    9692# Special item IDs that are used to recognise non-result items in the 
    9793# search results list. 
     
    107103# Export the version to the server (as a subversion keyword). 
    108104use vars qw($VERSION); 
    109 $VERSION = 'v@@VERSION@@ (trunk-7.0)'; 
     105$VERSION = 'v@@VERSION@@ (trunk-7.x)'; 
    110106 
    111107# A logger we will use to write plugin-specific messages. 
     
    199195my $initialised = 0; 
    200196 
    201 # Flag to indicate whether we're currently applying 'lazification' to the 
    202 # database. Used to detect and warn the user of this when entering 
    203 # lazy search mode while this is in progress. 
    204 my $lazifyingDatabase = 0; 
    205  
    206197# Map which is used to quickly translate the button pushes captured by our 
    207198# mode back into the numbers on those keys. 
     
    264255            # Push into a sub-mode for the selected category. 
    265256            enterCategoryItem( $client, $item ); 
    266  
    267             # If rescan is in progress then warn the user. 
    268             if ( $lazifyingDatabase || Slim::Music::Import->stillScanning() ) { 
    269                 $log->info("Entering search while scan in progress"); 
    270                 if ( $client->linesPerScreen == 1 ) { 
    271                     $client->showBriefly( 
    272                         { 
    273                             'line1' => $client->doubleString( 
    274                                 'PLUGIN_LAZYSEARCH2_SCAN_IN_PROGRESS') 
    275                         } 
    276                     ); 
    277                 } else { 
    278                     $client->showBriefly( 
    279                         { 
    280                             'line1' => 
    281                               string('PLUGIN_LAZYSEARCH2_SCAN_IN_PROGRESS') 
    282                         } 
    283                     ); 
    284                 } 
    285             } 
    286257        }, 
    287258 
     
    627598    # on them later. 
    628599    checkDefaults(); 
    629  
    630     # Subscribe so that we are notified when the database has been rescanned; 
    631     # we use this so that we can apply lazification. 
    632     Slim::Control::Request::subscribe( 
    633         \&Plugins::LazySearch2::Plugin::scanDoneCallback, 
    634         [ ['rescan'], ['done'] ] ); 
    635600 
    636601    # Top-level menu mode. We register a custom INPUT.Choice mode so that 
     
    748713    Slim::Buttons::Common::setFunction( 'search', \&lazyOnSearch ); 
    749714 
    750     # Schedule a lazification to ensure that the database is lazified. This 
    751     # is useful because the user might shut down the server during the scan 
    752     # and we would otherwise have a part filled database that couldn't be 
    753     # lazy searched. 
    754     Slim::Utils::Timers::setTimer( undef, 
    755         Time::HiRes::time() + LAZYSEARCH_INITIAL_LAZIFY_DELAY, 
    756         \&scanDoneCallback ); 
     715    # Register callback functions so that we lazify new items inserted or 
     716    # changed in the database. 
     717    $log->debug("Registering post scanner lazification hooks"); 
     718    Slim::Schema->registerTrackPostScanner("Plugins::LazySearch2::Plugin",{ 
     719        'weight' => 30, 
     720        'func' => \&trackUpdated, 
     721        }); 
     722    Slim::Schema->registerGenrePostScanner("Plugins::LazySearch2::Plugin",{ 
     723        'weight' => 30, 
     724        'func' => \&genreUpdated, 
     725        }); 
     726    Slim::Schema->registerContributorPostScanner("Plugins::LazySearch2::Plugin",{ 
     727        'weight' => 30, 
     728        'func' => \&contributorUpdated, 
     729        }); 
     730    Slim::Schema->registerAlbumPostScanner("Plugins::LazySearch2::Plugin",{ 
     731        'weight' => 30, 
     732        'func' => \&albumUpdated, 
     733        }); 
    757734 
    758735    $log->debug("Initialisation complete"); 
     
    764741    $log->debug("Shutting down"); 
    765742 
    766     # Remove the subscription we'd previously registered 
    767     Slim::Control::Request::unsubscribe( 
    768         \&Plugins::LazySearch2::Plugin::scanDoneCallback ); 
     743    # Remove database update callbacks. 
     744    $log->debug("Removing post scanner lazification hooks"); 
     745    Slim::Schema->registerTrackPostScanner("Plugins::LazySearch2::Plugin"); 
     746    Slim::Schema->registerGenrePostScanner("Plugins::LazySearch2::Plugin"); 
     747    Slim::Schema->registerContributorPostScanner("Plugins::LazySearch2::Plugin"); 
     748    Slim::Schema->registerAlbumPostScanner("Plugins::LazySearch2::Plugin"); 
    769749 
    770750    # We're no longer initialised. 
    771751    $initialised = 0; 
     752 
     753    $log->debug("Shutdown complete"); 
    772754} 
    773755 
     
    20121994} 
    20131995 
    2014 # This is called by SqueezeCentre when a scan has finished. We use this to kick 
    2015 # off lazification of the database once it's been populated with all music 
    2016 # information. 
    2017 sub scanDoneCallback($) { 
    2018     $log->debug("Received notification of end of rescan"); 
    2019  
    2020     # Check the plugin version that was present when we last lazified - if it 
    2021     # has changed then we're going to rebuild the database lazification in 
    2022     # case this different plugin revision has changed the format. 
    2023     my $force          = 0; 
    2024     my $prefRevision   = $myPrefs->get('pref_revision'); 
    2025     my $pluginRevision = '$Revision$'; 
    2026  
    2027     if ( $prefRevision ne $pluginRevision ) { 
    2028         $log->info( 
    2029 "Re-lazifying (plugin version changed from '$prefRevision' to '$pluginRevision'" 
    2030         ); 
    2031         $force = 1; 
    2032         $myPrefs->set( 'pref_revision', $pluginRevision ); 
    2033     } else { 
    2034         $log->info("Lazifying database items not already done"); 
    2035     } 
    2036  
    2037     lazifyDatabase($force); 
    2038 } 
    2039  
    2040 # This function is called when the music database scan has finished. It 
    2041 # identifies each artist, track and album that has not yet been encoded into 
    2042 # lazy form and schedules a SqueezeCentre background task to encode them. 
    2043 sub lazifyDatabase($) { 
    2044  
    2045     my $force = shift; 
    2046  
    2047     # Make sure the encode queue is empty, and cancel any lazification 
    2048     # currently underway. 
    2049     %encodeQueues = (); 
    2050     Slim::Utils::Scheduler::remove_task( \&encodeTask ); 
    2051  
    2052     # Convert the albums table. 
    2053     lazifyDatabaseType( 'Album', 'title', $force, 0, 0, 0 ); 
    2054  
    2055     # Convert the artists (contributors) table. 
    2056     lazifyDatabaseType( 'Contributor', 'name', $force, 0, 0, 0 ); 
    2057  
    2058     # Convert the genres table. 
    2059     lazifyDatabaseType( 'Genre', 'name', $force, 0, 0, 0 ); 
    2060  
    2061     # Convert the songs (tracks) table. 
    2062     lazifyDatabaseType( 'Track', 'title', $force, 1, 1, 1 ); 
    2063  
    2064     # If there are any items to encode then initialise a background task that 
    2065     # will do that work in chunks. 
    2066     if ( scalar keys %encodeQueues ) { 
    2067         $log->debug("Scheduling backround lazification"); 
    2068         Slim::Utils::Scheduler::add_task( \&encodeTask ); 
    2069         $lazifyingDatabase = 1; 
    2070     } else { 
    2071         $log->info("No database items require lazification"); 
    2072     } 
    2073 } 
    2074  
    20751996# Return a lazy-encoded search column value; the original 'search' version 
    20761997# is passed in. 
     
    20902011} 
    20912012 
    2092 # This function examines the database for a specific 'object' type (artist, 
    2093 # album or track), and looks for those which have not yet been lazy-encoded. 
    2094 # Those it finds are added to a global hash that is later worked through from 
    2095 # the background task. 
    2096 sub lazifyDatabaseType { 
    2097     my $type                  = shift; 
    2098     my $sourceAttr            = shift; 
    2099     my $force                 = shift; 
    2100     my $considerKeywordArtist = shift; 
    2101     my $considerKeywordAlbum  = shift; 
    2102     my $considerKeywordTrack  = shift; 
    2103     my $isTrackEncode         = 0; 
    2104  
    2105     # If any keyword encoding is considered then it's a track encode. 
    2106     $isTrackEncode = $considerKeywordArtist 
    2107       || $considerKeywordAlbum 
    2108       || $considerKeywordTrack; 
    2109  
    2110     # Include keywords in the lazified version if the caller asked for it and 
    2111     # the user preference says they want it. 
    2112     my $includeKeywordArtist = $considerKeywordArtist 
    2113       && $myPrefs->get('pref_keyword_artists_enabled'); 
    2114     my $includeKeywordAlbum = $considerKeywordAlbum 
    2115       && $myPrefs->get('pref_keyword_albums_enabled'); 
    2116     my $includeKeywordTrack = $considerKeywordTrack 
    2117       && $myPrefs->get('pref_keyword_tracks_enabled'); 
    2118  
    2119     # If adding keywords for album titles then we need to join to the album 
    2120     # table, too. 
    2121     my $extraJoins; 
    2122     $extraJoins = qw/ album / if $includeKeywordAlbum; 
    2123  
    2124     # The query to find items to lazify takes into account keyword columns 
    2125     # in case that column was previously lazified before keywords were 
    2126     # introduced. 
    2127     my $whereClause; 
    2128     if ( !$force ) { 
    2129         if (   $considerKeywordArtist 
    2130             || $considerKeywordAlbum 
    2131             || $considerKeywordTrack ) 
    2132         { 
    2133             $whereClause = { 
    2134                 -or => [ 
    2135                     'me.customsearch' => { 'not like', '%|%' }, 
    2136                     'me.customsearch' => undef 
    2137                 ] 
    2138             }; 
    2139         } else { 
    2140             $whereClause = { 'me.customsearch' => undef }; 
    2141         } 
    2142     } 
    2143  
    2144     # Find all entries that are not yet converted. 
    2145     my $rs = Slim::Schema->resultset($type)->search( 
    2146         $whereClause, 
    2147         { 
    2148             columns  => [ 'id', $sourceAttr, 'me.customsearch' ], 
    2149             join     => $extraJoins, 
    2150             prefetch => $extraJoins 
    2151         } 
    2152     ); 
    2153     my $rsCount = $rs->count; 
    2154  
    2155     $log->debug( "Lazify type=$type, " . $rsCount . " items to lazify" ); 
    2156  
    2157     # Store the unlazified item IDs; later, we'll work on these in chunks from 
    2158     # within a task. 
    2159     if ( $rsCount > 0 ) { 
    2160         my %typeHash = ( 
    2161             rs              => $rs, 
    2162             source_attr     => $sourceAttr, 
    2163             remaining_items => $rsCount, 
    2164             is_track_encode => $isTrackEncode, 
    2165             keyword_artist  => $includeKeywordArtist, 
    2166             keyword_album   => $includeKeywordAlbum, 
    2167             keyword_track   => $includeKeywordTrack, 
    2168         ); 
    2169         $encodeQueues{$type} = \%typeHash; 
    2170     } 
    2171 } 
    2172  
    2173 # This task function is periodically called by SqueezeCentre when it is 'idle'. 
    2174 # It works through the IDs of the objects that require encoding. They are 
    2175 # encoded in chunks taking a maximum amount of time to keep the server and 
    2176 # players responsive. This function returns 0 when the task has finished, and 
    2177 # 1 when there is more work to do and this function should be called again. 
    2178 sub encodeTask { 
    2179  
    2180     # As protection from two encodes going on simultaneously, if we detect that 
    2181     # a scan is in progress we cancel the whole encode task. 
    2182     if ( Slim::Music::Import->stillScanning() ) { 
    2183         $log->debug( 
    2184 "Detected a rescan while database scan in progress - cancelling lazy encoding" 
    2185         ); 
    2186         %encodeQueues = (); 
    2187  
    2188         return 0; 
    2189     } 
    2190  
    2191     # Bail out if the encode queue is empty. That can happen if another 
    2192     # lazification has been kicked off before this one has finished. 
    2193     if ( ( scalar keys %encodeQueues ) == 0 ) { 
    2194         return 0; 
    2195     } 
    2196  
    2197     # Get a single type hash from the encode queue. It doesn't matter on the 
    2198     # order they come out of the hash. 
    2199     my $type           = ( keys %encodeQueues )[0]; 
    2200     my $typeHashRef    = $encodeQueues{$type}; 
    2201     my %typeHash       = %$typeHashRef; 
    2202     my $rs             = $typeHash{rs}; 
    2203     my $sourceAttr     = $typeHash{source_attr}; 
    2204     my $remainingItems = $typeHash{remaining_items}; 
    2205     my $isTrackEncode  = $typeHash{is_track_encode}; 
    2206     my $keywordArtist  = $typeHash{keyword_artist}; 
    2207     my $keywordAlbum   = $typeHash{keyword_album}; 
    2208     my $keywordTrack   = $typeHash{keyword_track}; 
    2209  
    2210     $log->debug( 'EncodeTask - ' . $remainingItems . " $type" . "s remaining" ); 
    2211  
    2212     # Go through and encode each of the identified IDs. To maintain performance 
    2213     # we will bail out if this takes more than a defined time slice. 
     2013# Called when an object has been created or updated. 
     2014sub trackUpdated { 
     2015    my $obj = shift; 
     2016 
     2017    $log->debug("Lazifying TRACK #" . $obj->id); 
     2018 
     2019    # Include keywords in the lazified version if the user preference says they want it. 
     2020    my $includeKeywordArtist = $myPrefs->get('pref_keyword_artists_enabled'); 
     2021    my $includeKeywordAlbum = $myPrefs->get('pref_keyword_albums_enabled'); 
     2022    my $includeKeywordTrack = $myPrefs->get('pref_keyword_tracks_enabled'); 
    22142023 
    22152024    # Find what contributor roles we consider as 'artists'. This takes account 
     
    22172026    my @roles = @{ Slim::Schema::artistOnlyRoles('TRACKARTIST') }; 
    22182027 
    2219     my $rowsDone  = 0; 
    2220     my $startTime = Time::HiRes::time(); 
    2221     my $obj; 
    2222     do { 
    2223  
    2224         # Get the next row from the resultset. 
    2225         $obj = $rs->next; 
    2226         if ($obj) { 
    2227  
    2228             # Update the search text for this one row and write it back to the 
    2229             # database. 
    2230             my $customSearch = lazifyColumn( $obj->get_column($sourceAttr) ); 
    2231  
    2232             # Track encoding has a separator to separate the track part from 
    2233             # the keywords (if any are encoded). 
    2234             if ($isTrackEncode) { 
    2235                 $customSearch .= '|'; 
     2028    my $customSearch = lazifyColumn($obj->title) . '|'; 
     2029 
     2030    # If keyword searching is enabled then add keywords. 
     2031    if ( $includeKeywordArtist || $includeKeywordAlbum || $includeKeywordTrack ) { 
     2032        my $encodedArtist = ''; 
     2033        my $encodedAlbum  = ''; 
     2034        my $encodedTrack  = ''; 
     2035 
     2036        if ($includeKeywordTrack) { 
     2037            $encodedTrack = 
     2038              lazifyColumn( $obj->title ); 
     2039        } 
     2040 
     2041        if ($includeKeywordArtist) { 
     2042            my $contributors = $obj->contributorsOfType(@roles); 
     2043            while ( my $contributor = $contributors->next ) { 
     2044                $encodedArtist .= lazifyColumn( $contributor->name ); 
    22362045            } 
    2237  
    2238             # If keyword searching is enabled then add keywords. 
    2239             if ( $keywordArtist || $keywordAlbum || $keywordTrack ) { 
    2240                 my $encodedArtist = ''; 
    2241                 my $encodedAlbum  = ''; 
    2242                 my $encodedTrack  = ''; 
    2243  
    2244                 if ($keywordTrack) { 
    2245                     $encodedTrack = 
    2246                       lazifyColumn( $obj->get_column($sourceAttr) ); 
    2247                 } 
    2248  
    2249                 if ($keywordArtist) { 
    2250                     my $contributors = $obj->contributorsOfType(@roles); 
    2251                     while ( my $contributor = $contributors->next ) { 
    2252                         $encodedArtist .= lazifyColumn( $contributor->name ); 
    2253                     } 
    2254                 } 
    2255  
    2256                 if ($keywordAlbum) { 
    2257                     $encodedAlbum = lazifyColumn( $obj->album->title ); 
    2258                 } 
    2259  
    2260                 # Add this to the custom search column. 
    2261                 $customSearch .= "$encodedTrack$encodedAlbum$encodedArtist"; 
    2262             } 
    2263  
    2264             # Get the custom search added to the database. 
    2265             $obj->set_column( 'customsearch', $customSearch ); 
    2266             $obj->update; 
    2267  
    2268             $rowsDone++; 
    2269         } 
    2270       } while ( $obj 
    2271         && ( ( Time::HiRes::time() - $startTime ) < 
    2272             LAZYSEARCH_ENCODE_MAX_QUANTA ) ); 
    2273  
    2274     my $endTime = Time::HiRes::time(); 
    2275  
    2276     $typeHashRef->{remaining_items} -= $rowsDone; 
    2277  
    2278     # Speedometer 
    2279     my $speed = 0; 
    2280     if ( $endTime != $startTime ) { 
    2281         $speed = int( $rowsDone / ( $endTime - $startTime ) ); 
    2282     } 
    2283     $log->debug( "Lazifier running at $speed $type" . "s/sec" ); 
    2284  
    2285     # If we've exhausted the ids for this type then remove this type from the 
    2286     # hash. If there are any left, however, we'll leave those in for the task 
    2287     # next time. 
    2288     if ( !defined($obj) ) { 
    2289         delete $encodeQueues{$type}; 
    2290         $log->debug("Exhaused IDs for $type"); 
    2291     } 
    2292  
    2293     # Find if there there is more work to do, and if so request that this task 
    2294     # is rescheduled. 
    2295     my $rescheduleTask; 
    2296     if ( scalar keys %encodeQueues ) { 
    2297         $rescheduleTask = 1; 
    2298     } else { 
    2299         $log->info("Database lazification completed"); 
    2300  
    2301         $rescheduleTask = 0; 
    2302  
    2303         # Make sure our work gets persisted. 
    2304         Slim::Schema->forceCommit; 
    2305  
    2306         # Clear the global flag indicating the task is in progress. 
    2307         $lazifyingDatabase = 0; 
    2308     } 
    2309  
    2310     return $rescheduleTask; 
     2046        } 
     2047 
     2048        if ($includeKeywordAlbum) { 
     2049            $encodedAlbum = lazifyColumn( $obj->album->title ); 
     2050        } 
     2051 
     2052        # Add this to the custom search column. 
     2053        $customSearch .= "$encodedTrack$encodedAlbum$encodedArtist"; 
     2054    } 
     2055 
     2056    $obj->set_column('customsearch' => $customSearch); 
     2057    $obj->update; 
     2058} 
     2059 
     2060# Called when an object has been created or updated. 
     2061sub genreUpdated { 
     2062    my $obj = shift; 
     2063 
     2064    $log->debug("Lazifying GENRE #" . $obj->id); 
     2065 
     2066    $obj->set_column('customsearch' => lazifyColumn($obj->name)); 
     2067    $obj->update(); 
     2068} 
     2069 
     2070# Called when an object has been created or updated. 
     2071sub contributorUpdated { 
     2072    my $obj = shift; 
     2073 
     2074    $log->debug("Lazifying CONTRIBUTOR #" . $obj->id); 
     2075 
     2076    $obj->set_column('customsearch' => lazifyColumn($obj->name)); 
     2077    $obj->update(); 
     2078} 
     2079 
     2080# Called when an object has been created or updated. 
     2081sub albumUpdated { 
     2082    my $obj = shift; 
     2083 
     2084    $log->debug("Lazifying ALBUM #" . $obj->id); 
     2085 
     2086    $obj->set_column('customsearch' => lazifyColumn($obj->title)); 
     2087    $obj->update(); 
    23112088} 
    23122089 
     
    25642341} 
    25652342 
    2566 # Called when one of the plugin preferences that affects the contents of the 
    2567 # database has changed - this schedules a forced relazify of the database. 
    2568 sub scheduleForcedRelazify { 
    2569     $log->info( 
    2570         "Scheduling database relazification because of preference changes"); 
    2571  
    2572     # Remove any existing scheduled callback. 
    2573     Slim::Utils::Timers::killOneTimer( 1, \&lazifyDatabase ); 
    2574  
    2575     # Schedule a relazification to take place in a short time. We do this 
    2576     # rather than kick it off immediately since this can be called several 
    2577     # times in quick succession if a number of database-affecting preferences 
    2578     # are changed. With this approach that causes a timer to be set and 
    2579     # cleared a few times with the final 'set' actually causing the 
    2580     # relazification to take place. 
    2581     Slim::Utils::Timers::setTimer( 1, 
    2582         Time::HiRes::time() + LAZYSEARCH_INITIAL_LAZIFY_DELAY, 
    2583         \&lazifyDatabase ); 
    2584 } 
    2585  
    2586 # Called when the user pushes the 'lazify now' button on the plugin 
    2587 # preferences. This is principally used for debugging. 
    2588 sub lazifyNow { 
    2589     if ( !$lazifyingDatabase ) { 
    2590         $log->info("Manual lazification requested"); 
    2591  
    2592         # Forcibly re-lazify the whole database. 
    2593         relazifyDatabase(); 
    2594     } 
    2595 } 
    2596  
    2597 # Force relazification of the database - this is different to normal 
    2598 # relazification since it will completely rebuild our custom content, whether 
    2599 # it needs it or not. 
    2600 sub relazifyDatabase { 
    2601  
    2602     # Forcibly re-lazify the whole database. 
    2603     lazifyDatabase(1); 
    2604 } 
    2605  
    26062343# Method to register handlers for the web pages provided by this plugin. 
    26072344sub webPages { 
  • branches/pluggable-scanners/Settings.pm

    r378 r397  
    118118    } 
    119119 
    120     if ( $params->{'pref_lazifynow'} ) { 
    121         $log->debug('Lazify Now button pushed'); 
    122         Plugins::LazySearch2::Plugin::lazifyNow(); 
    123     } 
    124  
    125120    for my $pref (@prefs) { 
    126121        $params->{'prefs'}->{$pref} = $myPrefs->get($pref); 
  • branches/pluggable-scanners/install.xml

    r378 r397  
    3737    <optionsURL>plugins/LazySearch2/settings/basic.html</optionsURL> 
    3838    <type>2</type> 
     39    <importmodule>Plugins::LazySearch2::Importer</importmodule> 
    3940 
    4041    <targetApplication> 
  • branches/pluggable-scanners/strings.txt

    r393 r397  
    347347    NL  Geeft toegang tot het Lazy Search muziek menu 
    348348 
    349 PLUGIN_LAZYSEARCH2_SCAN_IN_PROGRESS 
    350     DA  Note: dit musik biblioteket bliver lige nu scannet 
    351     DE  Hinweis: Die Musikdatenbank wird gerade durchsucht 
    352     EN  Note: music library scan in progress 
    353     ES  Nota: se está recopilando la colección musical 
    354     FI  Huomautus: Musiikkikirjaston luominen on kÀynnissÀ 
    355     NL  Merk op: muziek bibliotheek wordt nu ingelezen 
    356  
    357 SETUP_PLUGIN_LAZYSEARCH2_DEBUGGING 
    358     EN  Debugging and Troubleshooting 
    359  
    360 SETUP_PLUGIN_LAZYSEARCH2_LAZIFYNOW_DESC 
    361     DA  Dette plugin er lavet til at vedligeholde Lazy Search indexet nÃ¥r det er nÞdvendigt. Derfor er det ikke, under normale omstÊndigheder, nÞdvendigt at tivnge re-index igennem. Du kan dog, hvis du vil vÊre sikker pÃ¥ at indexet er opbygget korrekt, trykke denne knap. Dette er primÊrt en debug funktion. 
    362     DE  Das Plugin erzeugt den Index fÃŒr die Faulpelz-Suche, wenn dies erforderlich ist. Normalerweise ist daher keine extra Pflege der Datenbank notwendig. Falls Sie sichergehen wollen, dass der Index der Faulpelz-Suche korrekt erzeugt wurde, können Sie die folgende SchaltflÀche anklicken. Aber in Anbetracht dessen, dass dies nie erforderlich sein sollte, ist dies in erster Linie eine Hilfe fÃŒr die Fehlersuche. 
    363     EN  The plugin is designed to build the lazy search index whenever required and so, under normal circumstances, no extra database maintenance is required. If you wish to ensure that the lazy search index has been correctly built you can press the following button, but given that it should never be necessary this is primarily a debugging aid. 
    364     ES  El plugin se ha diseñado para construir el índice de búsqueda laxa cuando sea que se requiera. Por lo tanto, en circunstancias normales, no se requiere mantenimiento extra de la base de datos. Si se quiere estar seguro que el índice de búsqueda laxa ha sido construido correctamente, se puede presionar el siguiente botón (aunque dado que nunca debería ser necesario reconstruirlo manualmente se lo incluye aquí simplemente como una ayuda para la depuración). 
    365     FI  Normaalisti laiska haku huomaa itse milloin sen pitÀÀ luoda hakuindeksi uudelleen. Jos haluat varmistaa, ettÀ laiskan haun hakuindeksi on varmasti ajan tasalla, niin voit tehdÀ sen painamalla alla olevaa nappia. SitÀ ei normaalisti tarvitse tehdÀ koskaan, joten tÀmÀ on lÀhinnÀ tarkoitettu vian etsintÀÀn. 
    366     NL  De plugin is zo ontworpen dat de Lazy Search index, wanneer het noodzakelijk is aangemaakt wordt, onder normale omstandigheden, is er geen extra  onderhoud vereist. Indien u er zeker van wilt zijn dat de Lazy Search index correct is ingelezen, kan u de volgende knop gebruiken, maar gegeven dat, het zal nooit noodzakelijk deze knop te moeten gebruiken, het is hoofdzakelijk een debugging tool. 
    367  
    368 SETUP_PLUGIN_LAZYSEARCH2_LAZIFYNOW_BUTTON 
    369     DA  Start opbygning af Lazy Search indexet 
    370     DE  Jetzt den Index fÃŒr die Faulpelz-Suche erzeugen 
    371     EN  Build Lazy Search Index Now 
    372     ES  Crear Índice de Búsqueda Laxa Ahora 
    373     FI  Luo laiskan haun indeksi nyt 
    374     NL  Creëer de Lazy Search Index 
    375  
    376349SETUP_PLUGIN_LAZYSEARCH2_KEYWORD_HEAD 
    377350    DA  Keyword sÞgning 
Note: See TracChangeset for help on using the changeset viewer.