2018-02-27 18:06:05 +01:00
|
|
|
/*
|
|
|
|
* Strawberry Music Player
|
|
|
|
* This file was part of Clementine.
|
|
|
|
* Copyright 2010, David Sansome <me@davidsansome.com>
|
2021-03-20 21:14:47 +01:00
|
|
|
* Copyright 2018-2021, Jonas Kvinge <jonas@jkvinge.net>
|
2018-02-27 18:06:05 +01:00
|
|
|
*
|
|
|
|
* Strawberry 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 3 of the License, or
|
|
|
|
* (at your option) any later version.
|
|
|
|
*
|
|
|
|
* Strawberry 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 Strawberry. If not, see <http://www.gnu.org/licenses/>.
|
2018-08-09 18:10:03 +02:00
|
|
|
*
|
2018-02-27 18:06:05 +01:00
|
|
|
*/
|
|
|
|
|
|
|
|
#include "config.h"
|
|
|
|
|
2021-03-20 19:00:42 +01:00
|
|
|
#include <memory>
|
|
|
|
|
2018-05-01 00:41:33 +02:00
|
|
|
#include <glib.h>
|
2018-02-27 18:06:05 +01:00
|
|
|
#include <gpod/itdb.h>
|
|
|
|
|
2018-05-01 00:41:33 +02:00
|
|
|
#include <QtGlobal>
|
|
|
|
#include <QThread>
|
|
|
|
#include <QMutex>
|
|
|
|
#include <QByteArray>
|
2018-02-27 18:06:05 +01:00
|
|
|
#include <QDir>
|
|
|
|
#include <QFile>
|
2018-05-01 00:41:33 +02:00
|
|
|
#include <QList>
|
|
|
|
#include <QString>
|
|
|
|
#include <QUrl>
|
2020-02-09 02:29:35 +01:00
|
|
|
#include <QImage>
|
2020-08-31 18:38:54 +02:00
|
|
|
#include <QTemporaryFile>
|
2021-03-20 19:00:42 +01:00
|
|
|
#include <QStandardPaths>
|
2018-02-27 18:06:05 +01:00
|
|
|
|
|
|
|
#include "core/logging.h"
|
2023-07-21 05:55:24 +02:00
|
|
|
#include "core/shared_ptr.h"
|
2018-02-27 18:06:05 +01:00
|
|
|
#include "core/application.h"
|
|
|
|
#include "collection/collectionbackend.h"
|
|
|
|
#include "collection/collectionmodel.h"
|
2018-05-01 00:41:33 +02:00
|
|
|
#include "connecteddevice.h"
|
|
|
|
#include "gpoddevice.h"
|
|
|
|
#include "gpodloader.h"
|
|
|
|
|
|
|
|
class DeviceLister;
|
|
|
|
class DeviceManager;
|
2018-02-27 18:06:05 +01:00
|
|
|
|
2023-07-21 05:55:24 +02:00
|
|
|
using std::make_shared;
|
|
|
|
|
|
|
|
GPodDevice::GPodDevice(const QUrl &url, DeviceLister *lister, const QString &unique_id, SharedPtr<DeviceManager> manager, Application *app, const int database_id, const bool first_time, QObject *parent)
|
2021-07-11 07:40:57 +02:00
|
|
|
: ConnectedDevice(url, lister, unique_id, manager, app, database_id, first_time, parent),
|
2018-02-27 18:06:05 +01:00
|
|
|
loader_(nullptr),
|
2019-09-07 23:30:35 +02:00
|
|
|
loader_thread_(nullptr),
|
|
|
|
db_(nullptr),
|
|
|
|
closing_(false) {}
|
2018-02-27 18:06:05 +01:00
|
|
|
|
2018-12-29 02:57:22 +01:00
|
|
|
bool GPodDevice::Init() {
|
2018-02-27 18:06:05 +01:00
|
|
|
|
|
|
|
InitBackendDirectory(url_.path(), first_time_);
|
|
|
|
model_->Init();
|
|
|
|
|
|
|
|
loader_ = new GPodLoader(url_.path(), app_->task_manager(), backend_, shared_from_this());
|
2019-09-07 23:30:35 +02:00
|
|
|
loader_thread_ = new QThread();
|
2018-02-27 18:06:05 +01:00
|
|
|
loader_->moveToThread(loader_thread_);
|
|
|
|
|
2021-01-26 16:48:04 +01:00
|
|
|
QObject::connect(loader_, &GPodLoader::Error, this, &GPodDevice::LoaderError);
|
|
|
|
QObject::connect(loader_, &GPodLoader::TaskStarted, this, &GPodDevice::TaskStarted);
|
|
|
|
QObject::connect(loader_, &GPodLoader::LoadFinished, this, &GPodDevice::LoadFinished);
|
|
|
|
QObject::connect(loader_thread_, &QThread::started, loader_, &GPodLoader::LoadDatabase);
|
2018-02-27 18:06:05 +01:00
|
|
|
|
2018-12-29 02:57:22 +01:00
|
|
|
return true;
|
|
|
|
|
2018-02-27 18:06:05 +01:00
|
|
|
}
|
|
|
|
|
2019-07-19 19:56:37 +02:00
|
|
|
GPodDevice::~GPodDevice() {
|
2020-05-29 17:36:01 +02:00
|
|
|
|
2019-07-19 19:56:37 +02:00
|
|
|
if (loader_) {
|
|
|
|
loader_thread_->exit();
|
|
|
|
loader_->deleteLater();
|
|
|
|
loader_thread_->deleteLater();
|
2020-05-29 17:36:01 +02:00
|
|
|
loader_ = nullptr;
|
|
|
|
loader_thread_ = nullptr;
|
2019-07-19 19:56:37 +02:00
|
|
|
}
|
2020-05-29 17:36:01 +02:00
|
|
|
|
2019-07-19 19:56:37 +02:00
|
|
|
}
|
2018-02-27 18:06:05 +01:00
|
|
|
|
2019-01-21 18:58:54 +01:00
|
|
|
void GPodDevice::ConnectAsync() {
|
|
|
|
|
|
|
|
loader_thread_->start();
|
|
|
|
|
|
|
|
}
|
|
|
|
|
2019-09-07 23:30:35 +02:00
|
|
|
void GPodDevice::Close() {
|
|
|
|
|
|
|
|
closing_ = true;
|
|
|
|
|
|
|
|
if (IsLoading()) {
|
|
|
|
loader_->Abort();
|
|
|
|
}
|
|
|
|
else {
|
|
|
|
ConnectedDevice::Close();
|
|
|
|
}
|
|
|
|
|
|
|
|
}
|
|
|
|
|
2021-06-12 20:53:23 +02:00
|
|
|
void GPodDevice::LoadFinished(Itdb_iTunesDB *db, const bool success) {
|
2018-02-27 18:06:05 +01:00
|
|
|
|
|
|
|
QMutexLocker l(&db_mutex_);
|
|
|
|
db_ = db;
|
|
|
|
db_wait_cond_.wakeAll();
|
|
|
|
|
2019-01-05 23:11:16 +01:00
|
|
|
if (loader_thread_) {
|
|
|
|
loader_thread_->quit();
|
|
|
|
loader_thread_->wait(1000);
|
|
|
|
loader_thread_->deleteLater();
|
|
|
|
loader_thread_ = nullptr;
|
|
|
|
}
|
|
|
|
|
2018-02-27 18:06:05 +01:00
|
|
|
loader_->deleteLater();
|
|
|
|
loader_ = nullptr;
|
|
|
|
|
2019-09-07 23:30:35 +02:00
|
|
|
if (closing_) {
|
|
|
|
ConnectedDevice::Close();
|
|
|
|
}
|
|
|
|
else {
|
2021-01-26 16:48:04 +01:00
|
|
|
emit DeviceConnectFinished(unique_id_, success);
|
2019-09-07 23:30:35 +02:00
|
|
|
}
|
2019-01-21 18:58:54 +01:00
|
|
|
|
2018-02-27 18:06:05 +01:00
|
|
|
}
|
|
|
|
|
2019-01-21 18:58:54 +01:00
|
|
|
void GPodDevice::LoaderError(const QString &message) { app_->AddError(message); }
|
|
|
|
|
2021-03-20 19:00:42 +01:00
|
|
|
void GPodDevice::Start() {
|
2018-02-27 18:06:05 +01:00
|
|
|
|
|
|
|
{
|
|
|
|
// Wait for the database to be loaded
|
|
|
|
QMutexLocker l(&db_mutex_);
|
|
|
|
if (!db_) db_wait_cond_.wait(&db_mutex_);
|
|
|
|
}
|
|
|
|
|
2020-08-04 21:18:14 +02:00
|
|
|
// Ensure only one "organize files" can be active at any one time
|
2018-02-27 18:06:05 +01:00
|
|
|
db_busy_.lock();
|
|
|
|
|
2021-03-20 19:00:42 +01:00
|
|
|
}
|
|
|
|
|
|
|
|
bool GPodDevice::StartCopy(QList<Song::FileType> *supported_filetypes) {
|
|
|
|
|
|
|
|
Start();
|
|
|
|
|
2018-02-27 18:06:05 +01:00
|
|
|
if (supported_filetypes) GetSupportedFiletypes(supported_filetypes);
|
2021-03-20 19:00:42 +01:00
|
|
|
|
2018-02-27 18:06:05 +01:00
|
|
|
return true;
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
Itdb_Track *GPodDevice::AddTrackToITunesDb(const Song &metadata) {
|
|
|
|
|
|
|
|
// Create the track
|
|
|
|
Itdb_Track *track = itdb_track_new();
|
|
|
|
metadata.ToItdb(track);
|
|
|
|
|
|
|
|
// Add it to the DB and the master playlist
|
|
|
|
// The DB takes ownership of the track
|
|
|
|
itdb_track_add(db_, track, -1);
|
|
|
|
Itdb_Playlist *mpl = itdb_playlist_mpl(db_);
|
|
|
|
itdb_playlist_add_track(mpl, track, -1);
|
|
|
|
|
|
|
|
return track;
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
void GPodDevice::AddTrackToModel(Itdb_Track *track, const QString &prefix) {
|
|
|
|
|
|
|
|
// Add it to our CollectionModel
|
|
|
|
Song metadata_on_device;
|
|
|
|
metadata_on_device.InitFromItdb(track, prefix);
|
|
|
|
metadata_on_device.set_directory_id(1);
|
|
|
|
songs_to_add_ << metadata_on_device;
|
|
|
|
|
|
|
|
}
|
|
|
|
|
2024-01-24 19:27:30 +01:00
|
|
|
bool GPodDevice::CopyToStorage(const CopyJob &job, QString &error_text) {
|
2018-02-27 18:06:05 +01:00
|
|
|
|
|
|
|
Q_ASSERT(db_);
|
|
|
|
|
|
|
|
Itdb_Track *track = AddTrackToITunesDb(job.metadata_);
|
|
|
|
|
2019-01-26 17:18:26 +01:00
|
|
|
if (job.albumcover_) {
|
|
|
|
bool result = false;
|
2022-10-19 18:37:49 +02:00
|
|
|
if (!job.cover_image_.isNull()) {
|
2021-03-20 19:00:42 +01:00
|
|
|
#ifdef Q_OS_LINUX
|
2024-04-11 02:56:01 +02:00
|
|
|
QString temp_path = QStandardPaths::writableLocation(QStandardPaths::CacheLocation) + QStringLiteral("/organize");
|
2021-03-20 19:00:42 +01:00
|
|
|
#else
|
|
|
|
QString temp_path = QStandardPaths::writableLocation(QStandardPaths::TempLocation);
|
|
|
|
#endif
|
|
|
|
if (!QDir(temp_path).exists()) QDir().mkpath(temp_path);
|
2024-04-11 02:56:01 +02:00
|
|
|
SharedPtr<QTemporaryFile> cover_file = make_shared<QTemporaryFile>(temp_path + QStringLiteral("/track-albumcover-XXXXXX.jpg"));
|
2021-03-20 19:00:42 +01:00
|
|
|
cover_file->setAutoRemove(true);
|
|
|
|
if (cover_file->open()) {
|
2021-03-20 19:23:33 +01:00
|
|
|
cover_file->close();
|
2022-10-19 18:37:49 +02:00
|
|
|
const QImage &image = job.cover_image_;
|
2021-03-20 19:00:42 +01:00
|
|
|
if (image.save(cover_file->fileName(), "JPG")) {
|
2022-09-12 22:39:08 +02:00
|
|
|
const QByteArray filename = QFile::encodeName(cover_file->fileName());
|
|
|
|
result = itdb_track_set_thumbnails(track, filename.constData());
|
2021-03-20 19:00:42 +01:00
|
|
|
if (result) {
|
|
|
|
cover_files_ << cover_file;
|
|
|
|
track->has_artwork = 1;
|
|
|
|
}
|
2020-08-31 18:38:54 +02:00
|
|
|
}
|
2021-08-09 23:32:26 +02:00
|
|
|
else {
|
|
|
|
qLog(Error) << "Failed to save" << cover_file->fileName() << cover_file->errorString();
|
|
|
|
}
|
|
|
|
}
|
|
|
|
else {
|
|
|
|
qLog(Error) << "Failed to open" << cover_file->fileName() << cover_file->errorString();
|
2020-08-31 18:38:54 +02:00
|
|
|
}
|
2019-01-26 17:18:26 +01:00
|
|
|
}
|
|
|
|
else if (!job.cover_source_.isEmpty()) {
|
2022-09-12 22:39:08 +02:00
|
|
|
const QByteArray filename = QFile::encodeName(job.cover_source_);
|
|
|
|
result = itdb_track_set_thumbnails(track, filename.constData());
|
2020-08-31 18:38:54 +02:00
|
|
|
if (result) track->has_artwork = 1;
|
2019-01-26 17:18:26 +01:00
|
|
|
}
|
|
|
|
else {
|
|
|
|
result = true;
|
|
|
|
}
|
|
|
|
if (!result) {
|
2021-03-20 19:11:05 +01:00
|
|
|
qLog(Error) << "Failed to set album cover image";
|
2019-01-26 17:18:26 +01:00
|
|
|
}
|
2019-01-24 19:13:57 +01:00
|
|
|
}
|
|
|
|
|
2018-02-27 18:06:05 +01:00
|
|
|
// Copy the file
|
|
|
|
GError *error = nullptr;
|
|
|
|
itdb_cp_track_to_ipod(track, QDir::toNativeSeparators(job.source_).toLocal8Bit().constData(), &error);
|
|
|
|
if (error) {
|
2024-01-24 19:52:24 +01:00
|
|
|
error_text = tr("Could not copy %1 to %2: %3").arg(job.metadata_.url().toLocalFile(), url_.path(), QString::fromUtf8(error->message));
|
2018-02-27 18:06:05 +01:00
|
|
|
g_error_free(error);
|
2024-01-24 19:27:30 +01:00
|
|
|
qLog(Error) << error_text;
|
|
|
|
app_->AddError(error_text);
|
2018-02-27 18:06:05 +01:00
|
|
|
|
|
|
|
// Need to remove the track from the db again
|
|
|
|
itdb_track_remove(track);
|
|
|
|
return false;
|
|
|
|
}
|
|
|
|
|
2019-08-07 17:13:40 +02:00
|
|
|
// Put the track in the playlist, if one is specified
|
|
|
|
if (!job.playlist_.isEmpty()) {
|
|
|
|
// Does the playlist already exist?
|
2022-09-12 22:39:08 +02:00
|
|
|
QByteArray playlist_name = job.playlist_.toUtf8();
|
|
|
|
Itdb_Playlist *playlist = itdb_playlist_by_name(db_, playlist_name.data());
|
|
|
|
if (!playlist) {
|
2019-08-07 17:13:40 +02:00
|
|
|
// Create the playlist
|
2022-09-12 22:39:08 +02:00
|
|
|
playlist = itdb_playlist_new(playlist_name.data(), false);
|
|
|
|
itdb_playlist_add(db_, playlist, -1);
|
2019-08-07 17:13:40 +02:00
|
|
|
}
|
|
|
|
// Playlist should exist so add the track to the playlist
|
2022-09-12 22:39:08 +02:00
|
|
|
itdb_playlist_add_track(playlist, track, -1);
|
2019-08-07 17:13:40 +02:00
|
|
|
}
|
|
|
|
|
2018-02-27 18:06:05 +01:00
|
|
|
AddTrackToModel(track, url_.path());
|
|
|
|
|
|
|
|
// Remove the original if it was requested
|
|
|
|
if (job.remove_original_) {
|
|
|
|
QFile::remove(job.source_);
|
|
|
|
}
|
|
|
|
|
|
|
|
return true;
|
|
|
|
|
|
|
|
}
|
|
|
|
|
2024-01-24 19:27:30 +01:00
|
|
|
bool GPodDevice::WriteDatabase(QString &error_text) {
|
2018-02-27 18:06:05 +01:00
|
|
|
|
2021-03-20 19:00:42 +01:00
|
|
|
// Write the itunes database
|
|
|
|
GError *error = nullptr;
|
2024-01-24 19:27:30 +01:00
|
|
|
const bool success = itdb_write(db_, &error);
|
2021-03-20 19:00:42 +01:00
|
|
|
cover_files_.clear();
|
2024-01-24 19:27:30 +01:00
|
|
|
if (!success) {
|
|
|
|
if (error) {
|
2024-04-11 02:56:01 +02:00
|
|
|
error_text = tr("Writing database failed: %1").arg(QString::fromUtf8(error->message));
|
2024-01-24 19:27:30 +01:00
|
|
|
g_error_free(error);
|
|
|
|
}
|
|
|
|
else {
|
|
|
|
error_text = tr("Writing database failed.");
|
|
|
|
}
|
|
|
|
app_->AddError(error_text);
|
2021-03-20 19:00:42 +01:00
|
|
|
}
|
2024-01-24 19:27:30 +01:00
|
|
|
|
|
|
|
return success;
|
2018-02-27 18:06:05 +01:00
|
|
|
|
2021-03-20 19:00:42 +01:00
|
|
|
}
|
|
|
|
|
|
|
|
void GPodDevice::Finish(const bool success) {
|
|
|
|
|
|
|
|
// Update the collection model
|
|
|
|
if (success) {
|
|
|
|
if (!songs_to_add_.isEmpty()) backend_->AddOrUpdateSongs(songs_to_add_);
|
|
|
|
if (!songs_to_remove_.isEmpty()) backend_->DeleteSongs(songs_to_remove_);
|
2018-02-27 18:06:05 +01:00
|
|
|
}
|
|
|
|
|
2020-08-04 21:18:14 +02:00
|
|
|
// This is done in the organize thread so close the unique DB connection.
|
2019-07-25 17:56:28 +02:00
|
|
|
backend_->Close();
|
|
|
|
|
2018-02-27 18:06:05 +01:00
|
|
|
songs_to_add_.clear();
|
|
|
|
songs_to_remove_.clear();
|
2021-03-20 19:00:42 +01:00
|
|
|
cover_files_.clear();
|
|
|
|
|
2018-02-27 18:06:05 +01:00
|
|
|
db_busy_.unlock();
|
|
|
|
|
|
|
|
}
|
|
|
|
|
2024-01-24 19:27:30 +01:00
|
|
|
bool GPodDevice::FinishCopy(bool success, QString &error_text) {
|
2021-03-20 19:00:42 +01:00
|
|
|
|
2024-01-24 19:27:30 +01:00
|
|
|
if (success) success = WriteDatabase(error_text);
|
2021-03-20 19:00:42 +01:00
|
|
|
Finish(success);
|
2024-01-24 19:27:30 +01:00
|
|
|
return ConnectedDevice::FinishCopy(success, error_text);
|
2021-03-20 19:00:42 +01:00
|
|
|
|
2018-02-27 18:06:05 +01:00
|
|
|
}
|
|
|
|
|
2021-03-20 19:00:42 +01:00
|
|
|
void GPodDevice::StartDelete() { Start(); }
|
2018-02-27 18:06:05 +01:00
|
|
|
|
|
|
|
bool GPodDevice::RemoveTrackFromITunesDb(const QString &path, const QString &relative_to) {
|
|
|
|
|
|
|
|
QString ipod_filename = path;
|
2021-08-23 21:21:08 +02:00
|
|
|
if (!relative_to.isEmpty() && path.startsWith(relative_to)) {
|
2024-04-11 02:56:01 +02:00
|
|
|
ipod_filename.remove(0, relative_to.length() + (relative_to.endsWith(QLatin1Char('/')) ? -1 : 0));
|
2021-08-23 21:21:08 +02:00
|
|
|
}
|
2018-02-27 18:06:05 +01:00
|
|
|
|
2024-04-11 02:56:01 +02:00
|
|
|
ipod_filename.replace(QLatin1Char('/'), QLatin1Char(':'));
|
2018-02-27 18:06:05 +01:00
|
|
|
|
|
|
|
// Find the track in the itdb, identify it by its filename
|
|
|
|
Itdb_Track *track = nullptr;
|
|
|
|
for (GList *tracks = db_->tracks; tracks != nullptr; tracks = tracks->next) {
|
|
|
|
Itdb_Track *t = static_cast<Itdb_Track*>(tracks->data);
|
|
|
|
|
2024-04-11 02:56:01 +02:00
|
|
|
if (QString::fromUtf8(t->ipod_path) == ipod_filename) {
|
2018-02-27 18:06:05 +01:00
|
|
|
track = t;
|
|
|
|
break;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
if (track == nullptr) {
|
|
|
|
qLog(Warning) << "Couldn't find song" << path << "in iTunesDB";
|
|
|
|
return false;
|
|
|
|
}
|
|
|
|
|
|
|
|
// Remove the track from all playlists
|
2021-08-23 21:21:08 +02:00
|
|
|
for (GList *playlists = db_->playlists; playlists != nullptr; playlists = playlists->next) {
|
2018-02-27 18:06:05 +01:00
|
|
|
Itdb_Playlist *playlist = static_cast<Itdb_Playlist*>(playlists->data);
|
|
|
|
|
|
|
|
if (itdb_playlist_contains_track(playlist, track)) {
|
|
|
|
itdb_playlist_remove_track(playlist, track);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
// Remove the track from the database, this frees the struct too
|
|
|
|
itdb_track_remove(track);
|
|
|
|
|
|
|
|
return true;
|
2018-10-02 00:38:52 +02:00
|
|
|
|
2018-02-27 18:06:05 +01:00
|
|
|
}
|
|
|
|
|
|
|
|
bool GPodDevice::DeleteFromStorage(const DeleteJob &job) {
|
|
|
|
|
|
|
|
Q_ASSERT(db_);
|
|
|
|
|
2021-08-23 21:21:08 +02:00
|
|
|
if (!RemoveTrackFromITunesDb(job.metadata_.url().toLocalFile(), url_.path())) {
|
2018-02-27 18:06:05 +01:00
|
|
|
return false;
|
2021-08-23 21:21:08 +02:00
|
|
|
}
|
2018-02-27 18:06:05 +01:00
|
|
|
|
|
|
|
// Remove the file
|
2021-08-23 21:21:08 +02:00
|
|
|
if (!QFile::remove(job.metadata_.url().toLocalFile())) {
|
|
|
|
return false;
|
|
|
|
}
|
2018-02-27 18:06:05 +01:00
|
|
|
|
|
|
|
// Remove it from our collection model
|
|
|
|
songs_to_remove_ << job.metadata_;
|
|
|
|
|
|
|
|
return true;
|
|
|
|
|
|
|
|
}
|
|
|
|
|
2024-01-24 19:27:30 +01:00
|
|
|
bool GPodDevice::FinishDelete(bool success, QString &error_text) {
|
2021-03-20 19:00:42 +01:00
|
|
|
|
2024-01-24 19:27:30 +01:00
|
|
|
if (success) success = WriteDatabase(error_text);
|
2021-03-20 19:00:42 +01:00
|
|
|
Finish(success);
|
2024-01-24 19:27:30 +01:00
|
|
|
return ConnectedDevice::FinishDelete(success, error_text);
|
2021-03-20 19:00:42 +01:00
|
|
|
|
2018-02-27 18:06:05 +01:00
|
|
|
}
|
|
|
|
|
|
|
|
bool GPodDevice::GetSupportedFiletypes(QList<Song::FileType> *ret) {
|
2023-02-18 14:09:27 +01:00
|
|
|
*ret << Song::FileType::MP4;
|
|
|
|
*ret << Song::FileType::MPEG;
|
2018-02-27 18:06:05 +01:00
|
|
|
return true;
|
|
|
|
}
|