mirror of
https://github.com/clementine-player/Clementine
synced 2025-01-23 07:50:13 +01:00
Fix formatting
This commit is contained in:
parent
fd35f20d26
commit
ca18a5584d
@ -119,7 +119,7 @@ LibraryWatcher::ScanTransaction::~ScanTransaction() {
|
|||||||
|
|
||||||
watcher_->task_manager_->SetTaskFinished(task_id_);
|
watcher_->task_manager_->SetTaskFinished(task_id_);
|
||||||
|
|
||||||
for (const Subdirectory &subdir : deleted_subdirs) {
|
for (const Subdirectory& subdir : deleted_subdirs) {
|
||||||
if (watcher_->watched_dirs_.contains(dir_)) {
|
if (watcher_->watched_dirs_.contains(dir_)) {
|
||||||
watcher_->RemoveWatch(watcher_->watched_dirs_[dir_], subdir);
|
watcher_->RemoveWatch(watcher_->watched_dirs_[dir_], subdir);
|
||||||
}
|
}
|
||||||
@ -417,7 +417,8 @@ void LibraryWatcher::ScanSubdirectory(const QString& path,
|
|||||||
else
|
else
|
||||||
t->touched_subdirs << updated_subdir;
|
t->touched_subdirs << updated_subdir;
|
||||||
|
|
||||||
if (updated_subdir.mtime == 0) { // Subdirectory deleted, mark it for removal from the watcher.
|
if (updated_subdir.mtime ==
|
||||||
|
0) { // Subdirectory deleted, mark it for removal from the watcher.
|
||||||
t->deleted_subdirs << updated_subdir;
|
t->deleted_subdirs << updated_subdir;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -595,15 +596,14 @@ void LibraryWatcher::AddWatch(const Directory& dir, const QString& path) {
|
|||||||
subdir_mapping_[path] = dir;
|
subdir_mapping_[path] = dir;
|
||||||
}
|
}
|
||||||
|
|
||||||
void LibraryWatcher::RemoveWatch(const Directory &dir, const Subdirectory &subdir) {
|
void LibraryWatcher::RemoveWatch(const Directory& dir,
|
||||||
|
const Subdirectory& subdir) {
|
||||||
for (const QString &subdir_path : subdir_mapping_.keys(dir)) {
|
for (const QString& subdir_path : subdir_mapping_.keys(dir)) {
|
||||||
if (subdir_path != subdir.path) continue;
|
if (subdir_path != subdir.path) continue;
|
||||||
fs_watcher_->RemovePath(subdir_path);
|
fs_watcher_->RemovePath(subdir_path);
|
||||||
subdir_mapping_.remove(subdir_path);
|
subdir_mapping_.remove(subdir_path);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void LibraryWatcher::RemoveDirectory(const Directory& dir) {
|
void LibraryWatcher::RemoveDirectory(const Directory& dir) {
|
||||||
|
@ -156,7 +156,7 @@ signals:
|
|||||||
QString ImageForSong(const QString& path,
|
QString ImageForSong(const QString& path,
|
||||||
QMap<QString, QStringList>& album_art);
|
QMap<QString, QStringList>& album_art);
|
||||||
void AddWatch(const Directory& dir, const QString& path);
|
void AddWatch(const Directory& dir, const QString& path);
|
||||||
void RemoveWatch(const Directory &dir, const Subdirectory &subdir);
|
void RemoveWatch(const Directory& dir, const Subdirectory& subdir);
|
||||||
uint GetMtimeForCue(const QString& cue_path);
|
uint GetMtimeForCue(const QString& cue_path);
|
||||||
void PerformScan(bool incremental, bool ignore_mtimes);
|
void PerformScan(bool incremental, bool ignore_mtimes);
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user