MusicStorage: Add source
This commit is contained in:
@@ -46,6 +46,8 @@ class ConnectedDevice : public QObject, public virtual MusicStorage, public std:
|
||||
explicit ConnectedDevice(const QUrl &url, DeviceLister *lister, const QString &unique_id, DeviceManager *manager, Application *app, const int database_id, const bool first_time, QObject *parent = nullptr);
|
||||
~ConnectedDevice() override;
|
||||
|
||||
Song::Source source() const override { return Song::Source_Device; }
|
||||
|
||||
virtual bool Init() = 0;
|
||||
virtual bool IsLoading() { return false; }
|
||||
virtual void NewConnection() {}
|
||||
|
||||
@@ -39,7 +39,7 @@
|
||||
class DeviceLister;
|
||||
|
||||
FilesystemDevice::FilesystemDevice(const QUrl &url, DeviceLister *lister, const QString &unique_id, DeviceManager *manager, Application *app, const int database_id, const bool first_time, QObject *parent)
|
||||
: FilesystemMusicStorage(url.toLocalFile()),
|
||||
: FilesystemMusicStorage(Song::Source_Device, url.toLocalFile()),
|
||||
ConnectedDevice(url, lister, unique_id, manager, app, database_id, first_time, parent),
|
||||
watcher_(new CollectionWatcher(Song::Source_Device)),
|
||||
watcher_thread_(new QThread(this)) {
|
||||
|
||||
@@ -46,6 +46,8 @@ class FilesystemDevice : public ConnectedDevice, public virtual FilesystemMusicS
|
||||
Q_INVOKABLE FilesystemDevice(const QUrl &url, DeviceLister *lister, const QString &unique_id, DeviceManager *manager, Application *app, const int database_id, const bool first_time, QObject *parent = nullptr);
|
||||
~FilesystemDevice() override;
|
||||
|
||||
Song::Source source() const final { return Song::Source_Device; }
|
||||
|
||||
bool Init() override;
|
||||
void CloseAsync();
|
||||
|
||||
|
||||
Reference in New Issue
Block a user