Here's what I've found so far... does cover web UI and controllers, but
not ip3k players.


Code:
--------------------
    diff --git a/HTML/Classic/status_header.html 
b/HTML/Classic/status_header.html
  index a0416b5..d9c9803 100644
  --- a/HTML/Classic/status_header.html
  +++ b/HTML/Classic/status_header.html
  @@ -173,7 +173,7 @@
  
                        <a [% songinfoHRef %] target="browser">[% songtitle 
%]</a>
  
  -                     [% IF itemobj.album.title && itemobj.album.title != 
noAlbum  && includeAlbum %]
  +                     [% IF itemobj.album.title.defined && 
itemobj.album.title != noAlbum  && includeAlbum %]
  
                                <span class="exnotactivenowplaying">[% 
stringFROM %] </span>
  
  diff --git a/HTML/Classic/status_list.html b/HTML/Classic/status_list.html
  index c69d68b..32c3af7 100644
  --- a/HTML/Classic/status_list.html
  +++ b/HTML/Classic/status_list.html
  @@ -7,7 +7,7 @@
                <span class="exlisting">
                [% END %]
                <a href="[% webroot %]songinfo.html?item=[% item.id 
%]&amp;player=[% playerURI %]" target="browser">[% item.title | html %]</a>
  -             [% IF item.includeAlbum && item.album && item.album != noAlbum 
%]
  +             [% IF item.includeAlbum && item.album.defined && item.album != 
noAlbum %]
                        [% stringFROM %]
                        [% IF item.album_id %]
                                <a href="[% webroot 
%]clixmlbrowser/clicmd=browselibrary+items&amp;mode=albums&amp;linktitle=[% 
stringALBUM %]%20([% item.album | uri %])&amp;album_id=[% item.album_id 
%]&amp;player=[% playerURI %]/index.html?index=0" target="browser">[% 
item.album | html %]</a>
  diff --git a/HTML/Default/status_list.html b/HTML/Default/status_list.html
  index 30245cd..7573df1 100644
  --- a/HTML/Default/status_list.html
  +++ b/HTML/Default/status_list.html
  @@ -5,7 +5,7 @@
                [% item.album_id = item.album_id %]
                [% IF noPlaylistCover %]
                        <a href="[% webroot _ info_link %]?item=[% item.id 
%]&amp;player=[% playerURI %]" target="browser" class="browseItemLink">[% 
item.title | html %]</a>
  -                     [% IF item.includeAlbum && item.album && item.album != 
noAlbum %]
  +                     [% IF item.includeAlbum && item.album.defined && 
item.album != noAlbum %]
                                [% stringFROM %]
                                [% IF item.album_id %]
                                <a href="[% webroot 
%]clixmlbrowser/clicmd=browselibrary+items&amp;mode=albums&amp;linktitle=[% 
stringALBUM %]%20([% item.album | uri %])&amp;album_id=[% item.album_id 
%]&amp;player=[% playerURI %]/index.html?index=0" target="browser" 
class="browseItemLink">[% item.album | html %]</a>
  @@ -47,7 +47,7 @@
                                        END;
                                END %]
                        </div>
  -                     [% IF item.includeAlbum && item.album && item.album != 
noAlbum %]
  +                     [% IF item.includeAlbum && item.album.defined && 
item.album != noAlbum %]
                                <div class="playlistSongDetail">
                                        [% IF item.album_id %]
                                        <a href="[% webroot 
%]clixmlbrowser/clicmd=browselibrary+items&amp;mode=albums&amp;linktitle=[% 
stringALBUM %]%20([% item.album | uri %])&amp;album_id=[% item.album_id 
%]&amp;player=[% playerURI %]/index.html?index=0" target="browser" 
class="browseItemLink"><span>[% item.album | html %]</span></a>
  diff --git a/HTML/Default/xmlbrowser.html b/HTML/Default/xmlbrowser.html
  index 3cbb88d..7801aaa 100644
  --- a/HTML/Default/xmlbrowser.html
  +++ b/HTML/Default/xmlbrowser.html
  @@ -375,7 +375,10 @@ useSpecialExt="-browse" %]
                                                        [%- stringCOLON %]
                                                [% END %]       
                                                [% WRAPPER weblink %]
  -                                                     [% title = 
(item.web.value || item.name || item.title) %]
  +                                                     [% title = 
item.web.value;
  +                                                        IF !title.defined || 
title == ''; title = item.name; END;
  +                                                        IF !title.defined || 
title == ''; title = item.title; END
  +                                                     %]
                                                        [% title | 
html_line_break %]
  
                                                        [% IF includeArtist && 
item.hasMetadata == 'track' && !item.name2 %]
  diff --git a/HTML/EN/status.html b/HTML/EN/status.html
  index 11771f7..c9562e5 100644
  --- a/HTML/EN/status.html
  +++ b/HTML/EN/status.html
  @@ -16,7 +16,7 @@
  [% IF currentsong %][% currentsong %] [% "OUT_OF" | string %] [% songcount 
%][% END %][% stringCOLON %]
  </div>
  <div class="playingSong"><a [% songinfoHRef %] target="browser">[% songtitle 
%]</a>
  -   [% IF itemobj.album.title && itemobj.album.title != noAlbum %]
  +   [% IF itemobj.album.title.defined && itemobj.album.title != noAlbum %]
  [% stringFROM %] <a [% albumHRef %] target="browser">[% itemobj.album.title | 
html %]</a>
  [%- END %]
  [% IF itemobj.artist && itemobj.artist != noArtist %]
  diff --git a/HTML/EN/status_list.html b/HTML/EN/status_list.html
  index b26cd9e..cfe5258 100644
  --- a/HTML/EN/status_list.html
  +++ b/HTML/EN/status_list.html
  @@ -7,7 +7,7 @@
                <span class="exlisting">
                [% END %]
                <a href="[% webroot %]songinfo.html?item=[% item.id 
%]&amp;player=[% playerURI %]" target="browser">[% item.title | html %]</a>
  -             [% IF item.includeAlbum && item.album && item.album != noAlbum 
%]
  +             [% IF item.includeAlbum && item.album.defined && item.album != 
noAlbum %]
                        [% stringFROM %]
                        [% IF item.album_id %]
                                <a href="[% webroot 
%]clixmlbrowser/clicmd=browselibrary+items&amp;mode=albums&amp;linktitle=[% 
stringALBUM %]%20([% item.album | uri %])&amp;album_id=[% item.album_id 
%]&amp;player=[% playerURI %]/index.html?index=0" target="browser">[% 
item.album | html %]</a>
  diff --git a/HTML/EN/xmlbrowser.html b/HTML/EN/xmlbrowser.html
  index c8b8c8d..afdb7eb 100644
  --- a/HTML/EN/xmlbrowser.html
  +++ b/HTML/EN/xmlbrowser.html
  @@ -253,7 +253,11 @@
                                                [% ELSIF 
!item.type.match('^text') %]
                                                        <a href="[% path %]?[% 
searchquery %]index=[% item.index || index _ (start + loop.index) 
%]&amp;player=[% player | uri %]&amp;sess=[% sess %]">
                                                [% END %]
  -                                             [% item.name || item.title || 
item.web.value %]
  +                                             [% title = item.web.value;
  +                                                IF !title.defined || title 
== ''; title = item.name; END;
  +                                                IF !title.defined || title 
== ''; title = item.title; END
  +                                             %]
  +                                             [% title | html_line_break %]
                                                [% IF item.weblink || 
!item.type.match('^text') %]
                                                </a>
                                                [% END %]
  diff --git a/Slim/Control/XMLBrowser.pm b/Slim/Control/XMLBrowser.pm
  index 0ccb1e9..1230104 100644
  --- a/Slim/Control/XMLBrowser.pm
  +++ b/Slim/Control/XMLBrowser.pm
  @@ -1010,8 +1010,8 @@ sub _cliQuery_done {
                                        
                                        my $id = $baseId . $itemIndex;
                                        
  -                                     my $name;
  -                                     if ($name = $item->{name}) {
  +                                     my $name = $item->{name};
  +                                     if (defined $name && $name ne '') {
                                                if (defined $item->{'label'}) {
                                                        $name = 
$request->string($item->{'label'}) . $request->string('COLON') . ' ' .  $name;
                                                } elsif (!$search && 
($item->{'hasMetadata'} || '') eq 'track') {
  @@ -1043,7 +1043,7 @@ sub _cliQuery_done {
                                                $hash{'type'}   = 
$item->{'type'}  if defined $item->{'type'};
                                                                                
# search|text|textarea|audio|playlist|link|opml|replace|redirect|radio
                                                                                
# radio is a radio-button selection item, not an internet-radio station 
  -                                             my $nameOrTitle = $name || 
$item->{title} || '';
  +                                             my $nameOrTitle = 
getTitle($name, $item);
                                                my $touchToPlay = 
defined(touchToPlay($item)) + 0;
                                                
                                                # if showBriefly is 1, send the 
name as a showBriefly
  @@ -1951,5 +1951,17 @@ sub _defeatDestructiveTouchToPlay {
        return 1;
  }
  
  +# a name can be '0' (zero) - don't blank it
  +sub getTitle {
  +     my ($name, $item) = @_;
  +
  +     my $nameOrTitle = $name;
  +     $nameOrTitle    = $item->{title} if !defined $nameOrTitle || 
$nameOrTitle eq '';
  +     $nameOrTitle    = '' if !defined $nameOrTitle;
  +     
  +     return $nameOrTitle;
  +}
  +
  +
  1;
  
  diff --git a/Slim/Schema.pm b/Slim/Schema.pm
  index ce80fbd..622d2b0 100644
  --- a/Slim/Schema.pm
  +++ b/Slim/Schema.pm
  @@ -907,7 +907,7 @@ sub _createOrUpdateAlbum {
        }
        
        # If the album does not have a title, use the singleton "No Album" album
  -     if ( $create && !$title ) {
  +     if ( $create && (!defined $title || $title eq '') ) {
                # let the external scanner make an attempt to find any existing 
"No Album" in the 
                # database before we assume there are none from previous scans
                if ( !defined $_unknownAlbumId ) {
  diff --git a/Slim/Web/XMLBrowser.pm b/Slim/Web/XMLBrowser.pm
  index d0650b5..f4c466a 100644
  --- a/Slim/Web/XMLBrowser.pm
  +++ b/Slim/Web/XMLBrowser.pm
  @@ -286,7 +286,7 @@ sub handleFeed {
                        $superFeed->{offset} ||= 0;
                        main::DEBUGLOG && $log->is_debug && 
$log->debug("Considering $i=$in ($crumbText) from ", $stash->{'index'}, ' 
offset=', $superFeed->{'offset'});
                        
  -                     my $crumbName = $subFeed->{'name'} || 
$subFeed->{'title'};
  +                     my $crumbName = 
Slim::Control::XMLBrowser::getTitle($subFeed->{name}, $subFeed);
                        
                        # Add search query to crumb list
                        my $searchQuery;
  @@ -554,7 +554,7 @@ sub handleFeed {
                }
                $itemIndex .= '.';
                
  -             $stash->{'pagetitle'} = $subFeed->{'name'} || 
$subFeed->{'title'};
  +             $stash->{'pagetitle'} = 
Slim::Control::XMLBrowser::getTitle($subFeed->{'name'}, $subFeed);
                $stash->{'index'}     = $itemIndex;
                $stash->{'icon'}      = $subFeed->{'icon'};
                $stash->{'playUrl'}   = $subFeed->{'play'} 
  
--------------------



Michael

http://www.herger.net/slim-plugins - MusicArtistInfo, MusicInfoSCR
------------------------------------------------------------------------
mherger's Profile: http://forums.slimdevices.com/member.php?userid=50
View this thread: http://forums.slimdevices.com/showthread.php?t=106700

_______________________________________________
Squeezecenter mailing list
[email protected]
http://lists.slimdevices.com/mailman/listinfo/squeezecenter

Reply via email to