From af3bcbdcbee893a19078b6ccf988593b61fccec1 Mon Sep 17 00:00:00 2001 From: Ivailo Monev Date: Sat, 31 Jan 2015 00:47:05 +0000 Subject: [PATCH] amarok: remove fastforward imported for amarok 1.4 --- amarok/src/importers/CMakeLists.txt | 1 - amarok/src/importers/fastforward/CMakeLists.txt | 26 --- .../fastforward/FastForwardConfigWidget.cpp | 111 ------------ .../fastforward/FastForwardConfigWidget.h | 59 ------- .../fastforward/FastForwardConfigWidget.ui | 194 --------------------- .../importers/fastforward/FastForwardManager.cpp | 28 --- .../importers/fastforward/FastForwardProvider.cpp | 122 ------------- .../importers/fastforward/FastForwardProvider.h | 46 ----- .../src/importers/fastforward/FastForwardTrack.cpp | 192 -------------------- .../src/importers/fastforward/FastForwardTrack.h | 45 ----- .../amarok_importer-fastforward.desktop | 84 --------- 11 files changed, 908 deletions(-) delete mode 100644 amarok/src/importers/fastforward/CMakeLists.txt delete mode 100644 amarok/src/importers/fastforward/FastForwardConfigWidget.cpp delete mode 100644 amarok/src/importers/fastforward/FastForwardConfigWidget.h delete mode 100644 amarok/src/importers/fastforward/FastForwardConfigWidget.ui delete mode 100644 amarok/src/importers/fastforward/FastForwardManager.cpp delete mode 100644 amarok/src/importers/fastforward/FastForwardProvider.cpp delete mode 100644 amarok/src/importers/fastforward/FastForwardProvider.h delete mode 100644 amarok/src/importers/fastforward/FastForwardTrack.cpp delete mode 100644 amarok/src/importers/fastforward/FastForwardTrack.h delete mode 100644 amarok/src/importers/fastforward/amarok_importer-fastforward.desktop diff --git a/amarok/src/importers/CMakeLists.txt b/amarok/src/importers/CMakeLists.txt index c5ea3948..979722a5 100644 --- a/amarok/src/importers/CMakeLists.txt +++ b/amarok/src/importers/CMakeLists.txt @@ -1,6 +1,5 @@ add_subdirectory( amarok ) add_subdirectory( banshee ) add_subdirectory( clementine ) -add_subdirectory( fastforward ) add_subdirectory( itunes ) add_subdirectory( rhythmbox ) diff --git a/amarok/src/importers/fastforward/CMakeLists.txt b/amarok/src/importers/fastforward/CMakeLists.txt deleted file mode 100644 index a5cc743d..00000000 --- a/amarok/src/importers/fastforward/CMakeLists.txt +++ /dev/null @@ -1,26 +0,0 @@ -include_directories( - ${KDE4_INCLUDE_DIR} - ${QT_INCLUDES} -) - -set( amarok_importer-fastforward_PART_SRCS - FastForwardConfigWidget.cpp - FastForwardManager.cpp - FastForwardProvider.cpp - FastForwardTrack.cpp -) - -kde4_add_ui_files( amarok_importer-fastforward_PART_SRCS FastForwardConfigWidget.ui ) - -kde4_add_plugin( amarok_importer-fastforward ${amarok_importer-fastforward_PART_SRCS} ) - -target_link_libraries( amarok_importer-fastforward - amarokcore - amaroklib - ${KDE4_KIO_LIBS} - ${QT_QTSQL_LIBRARY} -) - -install( TARGETS amarok_importer-fastforward DESTINATION ${PLUGIN_INSTALL_DIR} ) - -install( FILES amarok_importer-fastforward.desktop DESTINATION ${SERVICES_INSTALL_DIR} ) diff --git a/amarok/src/importers/fastforward/FastForwardConfigWidget.cpp b/amarok/src/importers/fastforward/FastForwardConfigWidget.cpp deleted file mode 100644 index 6e27681e..00000000 --- a/amarok/src/importers/fastforward/FastForwardConfigWidget.cpp +++ /dev/null @@ -1,111 +0,0 @@ -/**************************************************************************************** - * Copyright (c) 2013 Konrad Zemek * - * * - * This program is free software; you can redistribute it and/or modify it under * - * the terms of the GNU General Public License as published by the Free Software * - * Foundation; either version 2 of the License, or (at your option) any later * - * version. * - * * - * This program is distributed in the hope that it will be useful, but WITHOUT ANY * - * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A * - * PARTICULAR PURPOSE. See the GNU General Public License for more details. * - * * - * You should have received a copy of the GNU General Public License along with * - * this program. If not, see . * - ****************************************************************************************/ - -#include "FastForwardConfigWidget.h" - -#include -#include -#include - -using namespace StatSyncing; - -FastForwardConfigWidget::FastForwardConfigWidget( const QVariantMap &config, - QWidget *parent, Qt::WindowFlags f ) - : ProviderConfigWidget( parent, f ) - , m_config( config ) -{ - setupUi( this ); - - m_embeddedDbSettings << m_databaseLocation << m_databaseLocationLabel; - m_externalDbSettings << m_databaseName << m_databaseNameLabel << m_hostname - << m_hostnameLabel << m_password << m_passwordLabel - << m_port << m_portLabel << m_username << m_usernameLabel; - - connect( m_connectionType, SIGNAL(currentIndexChanged(int)), - SLOT(connectionTypeChanged(int)) ); - populateFields(); -} - -FastForwardConfigWidget::~FastForwardConfigWidget() -{ -} - -QVariantMap -FastForwardConfigWidget::config() const -{ - QVariantMap cfg = m_config; - - const int enumId = metaObject()->indexOfEnumerator( "Driver" ); - QMetaEnum driverEnum = metaObject()->enumerator( enumId ); - - cfg.insert( "name", m_targetName->text() ); - cfg.insert( "dbDriver", driverEnum.valueToKey( - Driver( m_connectionType->currentIndex() ) ) ); - - cfg.insert( "dbPath", m_databaseLocation->text() ); - cfg.insert( "dbName", m_databaseName->text() ); - cfg.insert( "dbHost", m_hostname->text() ); - cfg.insert( "dbUser", m_username->text() ); - cfg.insert( "dbPass", m_password->text() ); - cfg.insert( "dbPort", m_port->value() ); - - return cfg; -} - -void -FastForwardConfigWidget::connectionTypeChanged( const int index ) -{ - const bool embedded = ( index == QSQLITE ); - const QList &hide = embedded ? m_externalDbSettings : m_embeddedDbSettings; - const QList &show = embedded ? m_embeddedDbSettings : m_externalDbSettings; - - foreach( QWidget *widget, hide ) - widget->hide(); - foreach( QWidget *widget, show ) - widget->show(); -} - -void -FastForwardConfigWidget::populateFields() -{ - m_targetName->setText( m_config.value( "name", "Amarok 1.4" ).toString() ); - - const int enumId = metaObject()->indexOfEnumerator( "Driver" ); - QMetaEnum driverEnum = metaObject()->enumerator( enumId ); - - m_connectionType->insertItem( QMYSQL, "MySQL" ); - m_connectionType->insertItem( QPSQL, "PostgreSQL" ); - m_connectionType->insertItem( QSQLITE, "SQLite" ); - - const QByteArray dbDriver = m_config.value( "dbDriver", - driverEnum.valueToKey( QSQLITE ) ).toByteArray(); - - int index = driverEnum.keyToValue( dbDriver.constData() ); - if( index == -1 ) - index = QSQLITE; - - m_connectionType->setCurrentIndex( index ); - - const QString defaultPath = QDir::toNativeSeparators( - QDir::homePath() + "/.kde/share/apps/amarok/collection.db" ); - - m_databaseLocation->setText( m_config.value( "dbPath", defaultPath ).toString() ); - m_databaseName->setText( m_config.value( "dbName", "amarokdb" ).toString() ); - m_hostname->setText( m_config.value( "dbHost", "localhost" ).toString() ); - m_username->setText( m_config.value( "dbUser", "amarokuser" ).toString() ); - m_password->setText( m_config.value( "dbPass", "" ).toString() ); - m_port->setValue( m_config.value( "dbPort", 3306 ).toInt() ); -} diff --git a/amarok/src/importers/fastforward/FastForwardConfigWidget.h b/amarok/src/importers/fastforward/FastForwardConfigWidget.h deleted file mode 100644 index 0a964528..00000000 --- a/amarok/src/importers/fastforward/FastForwardConfigWidget.h +++ /dev/null @@ -1,59 +0,0 @@ -/**************************************************************************************** - * Copyright (c) 2013 Konrad Zemek * - * * - * This program is free software; you can redistribute it and/or modify it under * - * the terms of the GNU General Public License as published by the Free Software * - * Foundation; either version 2 of the License, or (at your option) any later * - * version. * - * * - * This program is distributed in the hope that it will be useful, but WITHOUT ANY * - * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A * - * PARTICULAR PURPOSE. See the GNU General Public License for more details. * - * * - * You should have received a copy of the GNU General Public License along with * - * this program. If not, see . * - ****************************************************************************************/ - -#ifndef STATSYNCING_FAST_FORWARD_CONFIG_WIDGET_H -#define STATSYNCING_FAST_FORWARD_CONFIG_WIDGET_H - -#include "statsyncing/Provider.h" -#include "ui_FastForwardConfigWidget.h" - -namespace StatSyncing -{ - -class FastForwardConfigWidget : public ProviderConfigWidget, - public Ui::FastForwardConfigWidget -{ - Q_OBJECT - Q_ENUMS( Driver ) - -public: - explicit FastForwardConfigWidget( const QVariantMap &config, QWidget *parent = 0, - Qt::WindowFlags f = 0 ); - ~FastForwardConfigWidget(); - - QVariantMap config() const; - - enum Driver - { - QMYSQL, - QPSQL, - QSQLITE - }; - -private: - void populateFields(); - - const QVariantMap m_config; - QList m_externalDbSettings; - QList m_embeddedDbSettings; - -private slots: - void connectionTypeChanged( const int index ); -}; - -} // namespace StatSyncing - -#endif // STATSYNCING_FAST_FORWARD_CONFIG_WIDGET_H diff --git a/amarok/src/importers/fastforward/FastForwardConfigWidget.ui b/amarok/src/importers/fastforward/FastForwardConfigWidget.ui deleted file mode 100644 index 4514d9fe..00000000 --- a/amarok/src/importers/fastforward/FastForwardConfigWidget.ui +++ /dev/null @@ -1,194 +0,0 @@ - - - FastForwardConfigWidget - - - - 0 - 0 - 366 - 262 - - - - - - - Username - - - m_username - - - - - - - - - - Qt::Vertical - - - QSizePolicy::Fixed - - - - 20 - 10 - - - - - - - - Password - - - m_password - - - - - - - - - - QLineEdit::Password - - - - - - - Connection type - - - m_connectionType - - - - - - - - - - Database location - - - m_databaseLocation - - - - - - - 1 - - - 65535 - - - - - - - Target name - - - m_targetName - - - - - - - - - - Hostname - - - m_hostname - - - - - - - - - - Port - - - m_port - - - - - - - Database name - - - m_databaseName - - - - - - - - - - collection.db - - - KFile::ExistingOnly|KFile::File - - - - - - - Qt::Vertical - - - - 20 - 0 - - - - - - - - - KComboBox - QComboBox -
kcombobox.h
-
- - KLineEdit - QLineEdit -
klineedit.h
-
- - KIntSpinBox - QSpinBox -
knuminput.h
-
- - KUrlRequester - QFrame -
kurlrequester.h
-
-
- - -
diff --git a/amarok/src/importers/fastforward/FastForwardManager.cpp b/amarok/src/importers/fastforward/FastForwardManager.cpp deleted file mode 100644 index 3bdba4d4..00000000 --- a/amarok/src/importers/fastforward/FastForwardManager.cpp +++ /dev/null @@ -1,28 +0,0 @@ -/**************************************************************************************** - * Copyright (c) 2013 Konrad Zemek * - * * - * This program is free software; you can redistribute it and/or modify it under * - * the terms of the GNU General Public License as published by the Free Software * - * Foundation; either version 2 of the License, or (at your option) any later * - * version. * - * * - * This program is distributed in the hope that it will be useful, but WITHOUT ANY * - * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A * - * PARTICULAR PURPOSE. See the GNU General Public License for more details. * - * * - * You should have received a copy of the GNU General Public License along with * - * this program. If not, see . * - ****************************************************************************************/ - -#include "importers/SimpleImporterManager.h" - -#include "FastForwardConfigWidget.h" -#include "FastForwardProvider.h" - -AMAROK_EXPORT_SIMPLE_IMPORTER_PLUGIN( fastforward, - "FastForwardImporter", - i18n( "Amarok 1.4 (FastForward)" ), - i18n( "Amarok 1.4 Statistics Importer" ), - KIcon( "amarok" ), - StatSyncing::FastForwardConfigWidget, - StatSyncing::FastForwardProvider ) diff --git a/amarok/src/importers/fastforward/FastForwardProvider.cpp b/amarok/src/importers/fastforward/FastForwardProvider.cpp deleted file mode 100644 index edcf1a10..00000000 --- a/amarok/src/importers/fastforward/FastForwardProvider.cpp +++ /dev/null @@ -1,122 +0,0 @@ -/**************************************************************************************** - * Copyright (c) 2013 Konrad Zemek * - * * - * This program is free software; you can redistribute it and/or modify it under * - * the terms of the GNU General Public License as published by the Free Software * - * Foundation; either version 2 of the License, or (at your option) any later * - * version. * - * * - * This program is distributed in the hope that it will be useful, but WITHOUT ANY * - * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A * - * PARTICULAR PURPOSE. See the GNU General Public License for more details. * - * * - * You should have received a copy of the GNU General Public License along with * - * this program. If not, see . * - ****************************************************************************************/ - -#include "FastForwardProvider.h" - -#include "FastForwardTrack.h" -#include "core/support/Debug.h" -#include "importers/ImporterManager.h" -#include "importers/ImporterSqlConnection.h" - -using namespace StatSyncing; - -FastForwardProvider::FastForwardProvider( const QVariantMap &config, - ImporterManager *importer ) - : ImporterProvider( config, importer ) -{ - if( config.value( "dbDriver" ).toString() == "QSQLITE" ) - { - m_connection = ImporterSqlConnectionPtr( - new ImporterSqlConnection( config.value( "dbPath" ).toString() ) ); - } - else - { - m_connection = ImporterSqlConnectionPtr( new ImporterSqlConnection( - m_config.value( "dbDriver" ).toString(), - m_config.value( "dbHost" ).toString(), - m_config.value( "dbPort" ).toUInt(), - m_config.value( "dbName" ).toString(), - m_config.value( "dbUser" ).toString(), - m_config.value( "dbPass" ).toString() - ) ); - } -} - -FastForwardProvider::~FastForwardProvider() -{ -} - -qint64 -FastForwardProvider::reliableTrackMetaData() const -{ - return Meta::valTitle | Meta::valArtist | Meta::valAlbum | Meta::valComposer - | Meta::valYear | Meta::valTrackNr | Meta::valDiscNr; -} - -qint64 -FastForwardProvider::writableTrackStatsData() const -{ - return Meta::valRating | Meta::valFirstPlayed | Meta::valLastPlayed - | Meta::valPlaycount | Meta::valLabel; -} - -QSet -FastForwardProvider::artists() -{ - QSet result; - foreach( const QVariantList &row, m_connection->query( "SELECT name FROM artist" ) ) - result.insert( row[0].toString() ); - - return result; -} - -TrackList -FastForwardProvider::artistTracks( const QString &artistName ) -{ - const QString query = "SELECT t.url, t.title, al.name, ar.name, c.name, y.name, " - "t.track, t.discnumber, s.rating, s.createdate, s.accessdate, s.playcounter " - "FROM tags t " - "INNER JOIN artist ar ON ar.id = t.artist " - "LEFT JOIN album al ON al.id = t.album " - "LEFT JOIN composer c ON c.id = t.composer " - "LEFT JOIN year y ON y.id = t.year " - "LEFT JOIN statistics s ON s.url = t.url " - "WHERE ar.name = :artist"; - - QVariantMap bindValues; - bindValues.insert( ":artist", artistName ); - - const QList fields = QList() << Meta::valTitle << Meta::valAlbum - << Meta::valArtist << Meta::valComposer << Meta::valYear - << Meta::valTrackNr << Meta::valDiscNr << Meta::valRating - << Meta::valFirstPlayed << Meta::valLastPlayed << Meta::valPlaycount; - - TrackList result; - foreach( const QVariantList &row, m_connection->query( query, bindValues ) ) - { - const QString trackUrl = row[0].toString(); - - Meta::FieldHash metadata; - for( int i = 0; i < fields.size(); ++i ) - metadata.insert( fields[i], row[i + 1] ); - - const QString lblQuery = "SELECT l.name FROM labels l " - "INNER JOIN tags_labels tl ON tl.labelid = l.id " - "WHERE tl.url = :url"; - - QVariantMap lblBindValues; - lblBindValues.insert( ":url", trackUrl ); - - QSet labels; - foreach( const QVariantList &row, m_connection->query( lblQuery, lblBindValues ) ) - labels.insert( row[0].toString() ); - - result << TrackPtr( new FastForwardTrack( trackUrl, m_connection, metadata, - labels ) ); - } - - return result; -} diff --git a/amarok/src/importers/fastforward/FastForwardProvider.h b/amarok/src/importers/fastforward/FastForwardProvider.h deleted file mode 100644 index 473a0f4a..00000000 --- a/amarok/src/importers/fastforward/FastForwardProvider.h +++ /dev/null @@ -1,46 +0,0 @@ -/**************************************************************************************** - * Copyright (c) 2013 Konrad Zemek * - * * - * This program is free software; you can redistribute it and/or modify it under * - * the terms of the GNU General Public License as published by the Free Software * - * Foundation; either version 2 of the License, or (at your option) any later * - * version. * - * * - * This program is distributed in the hope that it will be useful, but WITHOUT ANY * - * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A * - * PARTICULAR PURPOSE. See the GNU General Public License for more details. * - * * - * You should have received a copy of the GNU General Public License along with * - * this program. If not, see . * - ****************************************************************************************/ - -#ifndef STATSYNCING_FAST_FORWARD_PROVIDER_H -#define STATSYNCING_FAST_FORWARD_PROVIDER_H - -#include "importers/ImporterProvider.h" - -namespace StatSyncing -{ - -class ImporterSqlConnection; -typedef QSharedPointer ImporterSqlConnectionPtr; - -class FastForwardProvider : public ImporterProvider -{ -public: - FastForwardProvider( const QVariantMap &config, ImporterManager *importer ); - ~FastForwardProvider(); - - qint64 reliableTrackMetaData() const; - qint64 writableTrackStatsData() const; - - QSet artists(); - TrackList artistTracks( const QString &artistName ); - -private: - ImporterSqlConnectionPtr m_connection; -}; - -} // namespace StatSyncing - -#endif // STATSYNCING_FAST_FORWARD_PROVIDER_H diff --git a/amarok/src/importers/fastforward/FastForwardTrack.cpp b/amarok/src/importers/fastforward/FastForwardTrack.cpp deleted file mode 100644 index 51e6264d..00000000 --- a/amarok/src/importers/fastforward/FastForwardTrack.cpp +++ /dev/null @@ -1,192 +0,0 @@ -/**************************************************************************************** - * Copyright (c) 2013 Konrad Zemek * - * * - * This program is free software; you can redistribute it and/or modify it under * - * the terms of the GNU General Public License as published by the Free Software * - * Foundation; either version 2 of the License, or (at your option) any later * - * version. * - * * - * This program is distributed in the hope that it will be useful, but WITHOUT ANY * - * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A * - * PARTICULAR PURPOSE. See the GNU General Public License for more details. * - * * - * You should have received a copy of the GNU General Public License along with * - * this program. If not, see . * - ****************************************************************************************/ - -#include "FastForwardTrack.h" - -#include "core/support/Debug.h" -#include "importers/ImporterSqlConnection.h" - -using namespace StatSyncing; - -FastForwardTrack::FastForwardTrack( const QString &trackUrl, - const ImporterSqlConnectionPtr &connection, - const Meta::FieldHash &metadata, - const QSet labels ) - : SimpleWritableTrack( metadata, labels ) - , m_connection( connection ) - , m_trackUrl( trackUrl ) -{ -} - -FastForwardTrack::~FastForwardTrack() -{ -} - -void -StatSyncing::FastForwardTrack::doCommit( const qint64 fields ) -{ - m_connection->transaction(); - bool ok = true; - - const QString query = "SELECT deviceid, uniqueid FROM uniqueid WHERE url = :url"; - QVariantMap bindValues; - bindValues.insert( ":url", m_trackUrl ); - - const QList result = m_connection->query( query, bindValues, &ok ); - if( !ok ) - { - m_connection->rollback(); - return; - } - - const int deviceId = result.front()[0].toInt(); - const QString uniqueId = result.front()[1].toString(); - - QStringList updates; - QVariantMap uBindValues; - - if( fields & Meta::valFirstPlayed ) - { - updates << "createdate = :createdate"; - uBindValues.insert( ":createdate", m_statistics.value( Meta::valFirstPlayed ) ); - } - if( fields & Meta::valLastPlayed ) - { - updates << "accessdate = :accessdate"; - uBindValues.insert( ":accessdate", m_statistics.value( Meta::valLastPlayed ) ); - } - if( fields & Meta::valRating ) - { - updates << "rating = :rating"; - uBindValues.insert( ":rating", m_statistics.value( Meta::valRating ) ); - } - if( fields & Meta::valPlaycount ) - { - updates << "playcounter = :playcount"; - uBindValues.insert( ":playcount", m_statistics.value( Meta::valPlaycount ) ); - } - - if( !updates.isEmpty() ) - { - const QString query = "SELECT COUNT(*) FROM statistics WHERE url = :url"; - QVariantMap bindValues; - bindValues.insert( ":url", m_trackUrl ); - - const QList result = m_connection->query( query, bindValues, &ok ); - if( !ok ) - { - m_connection->rollback(); - return; - } - - // Statistic row doesn't exist - if( !result.front()[0].toInt() ) - { - const QString query = "INSERT INTO statistics (url, deviceid, uniqueid) " - "VALUES ( :url, :devid, :uniqid )"; - QVariantMap bindValues; - bindValues.insert( ":url", m_trackUrl ); - bindValues.insert( ":devid", deviceId ); - bindValues.insert( ":url", uniqueId ); - - m_connection->query( query, bindValues, &ok ); - if( !ok ) - { - m_connection->rollback(); - return; - } - } - - // Update statistics - const QString uQuery = "UPDATE statistics SET " + updates.join(", ") + - " WHERE url = :url"; - - uBindValues.insert( ":url", m_trackUrl ); - m_connection->query( uQuery, uBindValues, &ok ); - if( !ok ) - { - m_connection->rollback(); - return; - } - } - - if( fields & Meta::valLabel ) - { - // Drop old label associations - const QString query = "DELETE FROM tags_labels WHERE url = :url"; - QVariantMap bindValues; - bindValues.insert( ":url", m_trackUrl ); - m_connection->query( query, bindValues, &ok ); - if( !ok ) - { - m_connection->rollback(); - return; - } - - foreach( const QString &label, m_labels ) - { - { - // Check if the label exists - const QString query = "SELECT COUNT(*) FROM labels WHERE name = :name"; - QVariantMap bindValues; - bindValues.insert( ":name", label ); - - const QList result = m_connection->query( query, bindValues, - &ok ); - if( !ok ) - { - m_connection->rollback(); - return; - } - - // Insert label if it doesn't - if( !result.front()[0].toInt() ) - { - const QString query = "INSERT INTO labels (name, type) " - "VALUES (:name, 1)"; - QVariantMap bindValues; - bindValues.insert( ":name", label ); - - m_connection->query( query, bindValues, &ok ); - if( !ok ) - { - m_connection->rollback(); - return; - } - } - } - - // Insert track <-> label association - const QString query = "INSERT INTO tags_labels (deviceid, url, uniqueid, " - "labelid) VALUES ( :devid, :url, :uniqid, " - "(SELECT id FROM labels WHERE name = :name) )"; - QVariantMap bindValues; - bindValues.insert( ":devid", deviceId ); - bindValues.insert( ":url", m_trackUrl ); - bindValues.insert( ":uniqid", uniqueId ); - bindValues.insert( ":name", label ); - - m_connection->query( query, bindValues, &ok ); - if( !ok ) - { - m_connection->rollback(); - return; - } - } - } - - m_connection->commit(); -} diff --git a/amarok/src/importers/fastforward/FastForwardTrack.h b/amarok/src/importers/fastforward/FastForwardTrack.h deleted file mode 100644 index 44a37178..00000000 --- a/amarok/src/importers/fastforward/FastForwardTrack.h +++ /dev/null @@ -1,45 +0,0 @@ -/**************************************************************************************** - * Copyright (c) 2013 Konrad Zemek * - * * - * This program is free software; you can redistribute it and/or modify it under * - * the terms of the GNU General Public License as published by the Free Software * - * Foundation; either version 2 of the License, or (at your option) any later * - * version. * - * * - * This program is distributed in the hope that it will be useful, but WITHOUT ANY * - * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A * - * PARTICULAR PURPOSE. See the GNU General Public License for more details. * - * * - * You should have received a copy of the GNU General Public License along with * - * this program. If not, see . * - ****************************************************************************************/ - -#ifndef STATSYNCING_FAST_FORWARD_TRACK_H -#define STATSYNCING_FAST_FORWARD_TRACK_H - -#include "statsyncing/SimpleWritableTrack.h" - -namespace StatSyncing -{ - -class ImporterSqlConnection; -typedef QSharedPointer ImporterSqlConnectionPtr; - -class FastForwardTrack : public SimpleWritableTrack -{ -public: - FastForwardTrack( const QString &trackUrl, const ImporterSqlConnectionPtr &connection, - const Meta::FieldHash &metadata, const QSet labels ); - ~FastForwardTrack(); - -protected: - void doCommit( const qint64 fields ); - -private: - const ImporterSqlConnectionPtr m_connection; - const QString m_trackUrl; -}; - -} // namespace StatSyncing - -#endif // STATSYNCING_FAST_FORWARD_TRACK_H diff --git a/amarok/src/importers/fastforward/amarok_importer-fastforward.desktop b/amarok/src/importers/fastforward/amarok_importer-fastforward.desktop deleted file mode 100644 index 2f8ed3b9..00000000 --- a/amarok/src/importers/fastforward/amarok_importer-fastforward.desktop +++ /dev/null @@ -1,84 +0,0 @@ -[Desktop Entry] -Type=Service -Icon=amarok -Name=Amarok 1.4 (FastForward) Importer -Name[ca]=Importador de l'Amarok 1.4 (FastForward) -Name[ca@valencia]=Importador de l'Amarok 1.4 (FastForward) -Name[cs]=Import Amarok 1.4 (FastForward) -Name[da]=Amarok 1.4 (FastForward)-importør -Name[de]=Amarok 1.4 (FastForward) Import -Name[el]=Amarok 1.4 (FastForward) εισαγωγέας -Name[en_GB]=Amarok 1.4 (FastForward) Importer -Name[es]=Importador de Amarok 1.4 (FastForward) -Name[fi]=Amarok 1.4 (Fast Forward) -tuonti -Name[fr]=Importateur d'Amarok 1.4 (FastForward) -Name[hu]=Amarok 1.4 (FastForward) importáló -Name[id]=Pengimpor Amarok 1.4 (FastForward) -Name[it]=Importatore di Amarok 1.4 (FastForward) -Name[nl]=Programma voor importeren van Amarok 1.4 (snel vooruit) -Name[pl]=Importowanie z Amaroka 1.4 (FastForward) -Name[pt]=Importação do Amarok 1.4 (FastForward) -Name[pt_BR]=Importação do Amarok 1.4 (FastForward) -Name[ro]=Importator Amarok 1.4 (FastForward) -Name[ru]=Импорт из Amarok 1.4 -Name[sk]=Importér Amarok 1.4 (FastForward) -Name[sl]=Uvoznik iz Amarok 1.4 (FastForward) -Name[sr]=Увозник из Амарока 1.4 (FastForward) -Name[sr@ijekavian]=Увозник из Амарока 1.4 (FastForward) -Name[sr@ijekavianlatin]=Uvoznik iz Amaroka 1.4 (FastForward) -Name[sr@latin]=Uvoznik iz Amaroka 1.4 (FastForward) -Name[sv]=Amarok 1.4 (FastForward)-importverktyg -Name[tr]=Amarok 1.4 (FastForward) İçe Aktarıcı -Name[uk]=Засіб імпортування даних Amarok 1.4 (FastForward) -Name[x-test]=xxAmarok 1.4 (FastForward) Importerxx -Name[zh_TW]=Amarok 1.4 (快轉)匯入器 -Comment=Import statistics from Amarok 1.4 database -Comment[ca]=Importa estadístiques des de base de dades de l'Amarok 1.4 -Comment[ca@valencia]=Importa estadístiques des de base de dades de l'Amarok 1.4 -Comment[cs]=Importovat statistiky z databáze Amarok 1.4 -Comment[da]=Importér statistik fra Amarok 1.4-database -Comment[de]=Importiert die Statistik von Datenbanken von Amarok 1.4 -Comment[el]=Εισάγει στατιστικά από τη βάση δεδομένων του Amarok 1.4 -Comment[en_GB]=Import statistics from Amarok 1.4 database -Comment[es]=Importa estadísticas de la base de datos de Amarok 1.4 -Comment[fi]=Tuo tilastot Amarok 1.4:n tietokannasta -Comment[fr]=Importe les statistiques de la base de données d'Amarok 1.4 -Comment[hu]=Statisztikák importálása az Amarok 1.4 adatbázisából -Comment[id]=Impor statistik dari database Amarok 1.4 -Comment[it]=Importa le statistiche dal database di Amarok 1.4 -Comment[nl]=Statistieken uit de Amarok 1.4 database importeren -Comment[pl]=Importowanie statystyk z bazy danych Amaroka 1.4 -Comment[pt]=Importa as estatísticas da base de dados do Amarok 1.4 -Comment[pt_BR]=Importa as estatísticas do banco de dados do Amarok 1.4 -Comment[ro]=Importă statistici din bază de date Amarok 1.4 -Comment[ru]=Импорт статистики из базы данных Amarok 1.4 -Comment[sk]=Importovať štatistiky z databázy Amarok 1.4 -Comment[sl]=Uvozite statistiko iz podatkovne zbirke Amarok 1.4 -Comment[sr]=Увозник статистике из базе Амарока 1.4 -Comment[sr@ijekavian]=Увозник статистике из базе Амарока 1.4 -Comment[sr@ijekavianlatin]=Uvoznik statistike iz baze Amaroka 1.4 -Comment[sr@latin]=Uvoznik statistike iz baze Amaroka 1.4 -Comment[sv]=Importera statistik från Amarok 1.4-databas -Comment[tr]=İstatistikleri Amarok 1.4 veritabanından al -Comment[uk]=Імпортування статистичних даних з бази даних Amarok 1.4 -Comment[x-test]=xxImport statistics from Amarok 1.4 databasexx -Comment[zh_TW]=從 Amarok 1.4 資料庫中匯入統計資料 - -ServiceTypes=Amarok/Plugin - -X-KDE-Amarok-authors=Konrad Zemek -X-KDE-Amarok-email=konrad.zemek@gmail.com -X-KDE-Amarok-framework-version=72 -X-KDE-Amarok-name=FastForwardImporter -X-KDE-Amarok-plugintype=importer -X-KDE-Amarok-rank=100 -X-KDE-Amarok-version=1 - -X-KDE-PluginInfo-Author=Konrad Zemek -X-KDE-PluginInfo-Email=konrad.zemek@gmail.com -X-KDE-PluginInfo-Version=1.0 -X-KDE-PluginInfo-Category=Importer -X-KDE-PluginInfo-License=GPL -X-KDE-PluginInfo-EnabledByDefault=true -X-KDE-PluginInfo-Name=amarok_importer-fastforward -X-KDE-Library=amarok_importer-fastforward -- 2.11.0