File indexing completed on 2024-05-19 04:50:22

0001 /****************************************************************************************
0002  * Copyright (c) 2007 Nikolaj Hald Nielsen <nhn@kde.org>                                *
0003  * Copyright (c) 2007,2008 Casey Link <unnamedrambler@gmail.com>                        *
0004  *                                                                                      *
0005  * This program is free software; you can redistribute it and/or modify it under        *
0006  * the terms of the GNU General Public License as published by the Free Software        *
0007  * Foundation; either version 2 of the License, or (at your option) any later           *
0008  * version.                                                                             *
0009  *                                                                                      *
0010  * This program is distributed in the hope that it will be useful, but WITHOUT ANY      *
0011  * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A      *
0012  * PARTICULAR PURPOSE. See the GNU General Public License for more details.             *
0013  *                                                                                      *
0014  * You should have received a copy of the GNU General Public License along with         *
0015  * this program.  If not, see <http://www.gnu.org/licenses/>.                           *
0016  ****************************************************************************************/
0017 
0018 #include "Mp3tunesMeta.h"
0019 
0020 #include "core/support/Amarok.h"
0021 
0022 #include <QAction>
0023 #include <QIcon>
0024 #include <QStandardPaths>
0025 
0026 #include <KLocalizedString>
0027 
0028 
0029 using namespace Meta;
0030 
0031 Mp3TunesTrack::Mp3TunesTrack( const QString& title )
0032     : ServiceTrack( title )
0033     , m_filetype()
0034 {
0035 }
0036 
0037 QString Mp3TunesTrack::type() const
0038 {
0039     return "mp3";
0040 }
0041 
0042 void  Mp3TunesTrack::setType( const QString &type )
0043 {
0044     m_filetype = type;
0045 }
0046 
0047 QString Mp3TunesTrack::sourceName() { return "MP3tunes.com"; }
0048 QString Mp3TunesTrack::sourceDescription() { return i18n( "Online music locker where you can safely store and access your music: http://mp3tunes.com" ); }
0049 QPixmap Mp3TunesTrack::emblem()  { return  QStandardPaths::locate( QStandardPaths::GenericDataLocation, "amarok/images/emblem-mp3tunes.png" );  }
0050 
0051 //// Mp3TunesAlbum ////
0052 
0053 Mp3TunesAlbum::Mp3TunesAlbum( const QString &name )
0054     : ServiceAlbumWithCover( name )
0055 {
0056 }
0057 
0058 Mp3TunesAlbum::Mp3TunesAlbum(const QStringList & resultRow)
0059     : ServiceAlbumWithCover( resultRow )
0060 {
0061 }
0062 
0063 Mp3TunesAlbum::~ Mp3TunesAlbum()
0064 {
0065 }
0066 
0067 void Mp3TunesAlbum::setCoverUrl( const QString &coverURL )
0068 {
0069     m_coverURL = coverURL;
0070 }
0071 
0072 QString Mp3TunesAlbum::coverUrl( ) const
0073 {
0074     return m_coverURL;
0075 }
0076