<div class="library-body">
    <div class="view-header clear-fix">
        <img ng-if="header.middle_cover_id" ng-src="/file/{{ header.middle_cover_id }}" class="artwork-blurred">
        <div class="artwork-section left">
            <div class="cover-background">
                <img ng-if="header.middle_cover_id" ng-src="/file/{{ header.middle_cover_id }}">
            </div>
        </div>
        <div class="description-section">
            <div class="album-artist">
                <div class="inner"></div>
            </div>
            <div class="album-title">
                <div class="inner" ng-bind="header.genre | normalizeGenre"></div>
            </div>
            <div class="album-info">
                <table>
                    <thead>
                    <tr>
                        <th>Albums</th>
                        <th>Tracks</th>
                        <th>Duration</th>
                    </tr>
                    </thead>
                    <tbody>
                    <tr>
                        <td>
                            <span class="album-year" ng-bind="header.albums_count"></span>
                        </td>
                        <td>
                            <span class="tracks-count" ng-bind="header.tracks_count"></span>
                        </td>
                        <td>
                            <span class="album-length" ng-bind="(header.tracks_duration / 1000) | normalizeTime"></span>
                        </td>
                    </tr>
                    </tbody>
                </table>
            </div>
        </div>
    </div>
    <div class="library-container" multiselect-list="selected" multiselect-destination="tracks_selected"
         infinite-scroll="load()" infinite-scroll-disabled="busy" infinite-scroll-distance="1">
        <div class="album-wrapper clear-fix" ng-repeat="album in albums">
            <div class="left cover">
                <div class="cover-background">
                    <img ng-if="album.items[0].middle_cover_id" ng-src="/file/{{ album.items[0].middle_cover_id }}">
                    <div class="artwork-chooser">
                        <div class="ml-button" change-artwork="album.items"><i class="fa fa-picture-o"></i> Change</div>
                    </div>
                </div>
            </div>
            <div class="content">
                <div class="album-title">
                    <div class="right" ng-bind="album.items[0].track_year"></div>
                    <div class="album-sub">
                        <div class="inline name">
                            <a ng-bind="album.title | normalizeAlbum" ng-href="{{ album.items[0].album_url }}"></a>
                        </div>
                        <div class="inline band">on <a ng-href="{{ album.items[0].artist_url }}" ng-bind="album.items[0].album_artist | normalizeArtist"></a></div>
                    </div>
                </div>
                <div class="album-tracks">
                    <div class="track" multiselect-item="track" ng-repeat="track in album.items" action-play="track"
                         action-context="tracks" action-resolver="fetch" ml-context-menu="selectedTracksMenu(tracks_selected)">
                        <div class="duration right">
                            <div class="ellipsis" ng-bind="(track.length / 1000) | normalizeTime"></div>
                        </div>
                        <div class="rating right">
                            <div class="ellipsis" track-rating="track"></div>
                        </div>
                        <div class="plays right" ng-show="track.times_played" title="Times played">
                            <div class="ellipsis">
                                <span class="times-played" ng-bind="track.times_played"></span>
                                <i class="fa fa-headphones"></i>
                            </div>
                        </div>
                        <div class="position left">
                            <div class="ellipsis">
                                <div ng-hide="player.playlist.track == track" ng-bind="track | normalizeTrackNumber"></div>
                                <div ng-show="player.playlist.track == track">
                                    <i class="fa" ng-class="{'fa-volume-up': !player.isBuffering, 'fa-refresh rotate': player.isBuffering}"></i>
                                </div>
                            </div>
                        </div>
                        <div class="track-title">
                            <div class="first ellipsis" ng-bind="track | normalizeTrackTitle"></div>
                            <div class="second ellipsis" ng-if="album.various_artists" ng-bind="track.track_artist | normalizeArtist"></div>
                        </div>
                    </div>

                </div>
            </div>
        </div>
        <div class="empty-placeholder" ng-show="end == true && tracks.length == 0">Nothing to show</div>
    </div>
</div>