File indexing completed on 2024-05-19 04:50:10
0001 /**************************************************************************************** 0002 * Copyright (c) 2007 Casey Link <unnamedrambler@gmail.com> * 0003 * * 0004 * This program is free software; you can redistribute it and/or modify it under * 0005 * the terms of the GNU General Public License as published by the Free Software * 0006 * Foundation; either version 2 of the License, or (at your option) any later * 0007 * version. * 0008 * * 0009 * This program is distributed in the hope that it will be useful, but WITHOUT ANY * 0010 * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A * 0011 * PARTICULAR PURPOSE. See the GNU General Public License for more details. * 0012 * * 0013 * You should have received a copy of the GNU General Public License along with * 0014 * this program. If not, see <http://www.gnu.org/licenses/>. * 0015 ****************************************************************************************/ 0016 0017 #include "AmpacheMeta.h" 0018 #include "core/support/Debug.h" 0019 0020 using namespace Meta; 0021 0022 //// AmpacheAlbum //// 0023 0024 AmpacheAlbum::AmpacheAlbum( const QString &name ) 0025 : ServiceAlbumWithCover( name ) 0026 {} 0027 0028 AmpacheAlbum::AmpacheAlbum(const QStringList & resultRow) 0029 : ServiceAlbumWithCover( resultRow ) 0030 {} 0031 0032 AmpacheAlbum::~ AmpacheAlbum() 0033 {} 0034 0035 void AmpacheAlbum::setCoverUrl( const QString &coverURL ) 0036 { 0037 m_coverURL = coverURL; 0038 } 0039 0040 QString AmpacheAlbum::coverUrl( ) const 0041 { 0042 return m_coverURL; 0043 } 0044 0045 void 0046 AmpacheAlbum::addInfo( const AmpacheAlbum::AmpacheAlbumInfo &info ) 0047 { 0048 m_ampacheAlbums.insert( info.id, info ); 0049 } 0050 0051 AmpacheAlbum::AmpacheAlbumInfo 0052 AmpacheAlbum::getInfo( int id ) const 0053 { 0054 if( !m_ampacheAlbums.contains( id ) ) 0055 { 0056 AmpacheAlbumInfo info; 0057 info.id = -1; 0058 info.discNumber = -1; 0059 info.year = -1; 0060 return info; 0061 } 0062 return m_ampacheAlbums.value( id ); 0063 } 0064 0065 QString 0066 AmpacheTrack::notPlayableReason() const 0067 { 0068 return networkNotPlayableReason(); 0069 }