diff options
Diffstat (limited to '')
-rw-r--r-- | src/update.c | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/src/update.c b/src/update.c index 8560dde38..52e61167d 100644 --- a/src/update.c +++ b/src/update.c @@ -312,7 +312,7 @@ static struct directory * addDirectoryPathToDB(const char *utf8path) parent = parent_path(path_max_tmp, utf8path); if (strlen(parent) == 0) - parentDirectory = directory_get_root(); + parentDirectory = db_get_root(); else parentDirectory = addDirectoryPathToDB(parent); @@ -351,7 +351,7 @@ static struct directory * addParentPathToDB(const char *utf8path) parent = parent_path(path_max_tmp, utf8path); if (strlen(parent) == 0) - parentDirectory = directory_get_root(); + parentDirectory = db_get_root(); else parentDirectory = addDirectoryPathToDB(parent); @@ -373,7 +373,7 @@ static enum update_return updatePath(const char *utf8path) assert(utf8path); /* if path is in the DB try to update it, or else delete it */ - if ((directory = getDirectory(utf8path))) { + if ((directory = db_get_directory(utf8path))) { parentDirectory = directory->parent; /* if this update directory is successfull, we are done */ @@ -382,7 +382,7 @@ static enum update_return updatePath(const char *utf8path) return ret; } /* we don't want to delete the root directory */ - else if (directory == directory_get_root()) { + else if (directory == db_get_root()) { return UPDATE_RETURN_NOUPDATE; } /* if updateDirectory fails, means we should delete it */ @@ -392,7 +392,7 @@ static enum update_return updatePath(const char *utf8path) ret = UPDATE_RETURN_UPDATED; /* don't return, path maybe a song now */ } - } else if ((song = getSongFromDB(utf8path))) { + } else if ((song = db_get_song(utf8path))) { parentDirectory = song->parent; if (!parentDirectory->stat && statDirectory(parentDirectory) < 0) { @@ -448,10 +448,10 @@ static void * update_task(void *_path) ret = updatePath((char *)_path); free(_path); } else { - ret = updateDirectory(directory_get_root()); + ret = updateDirectory(db_get_root()); } - if (ret == UPDATE_RETURN_UPDATED && writeDirectoryDB() < 0) + if (ret == UPDATE_RETURN_UPDATED && db_save() < 0) ret = UPDATE_RETURN_ERROR; progress = UPDATE_PROGRESS_DONE; wakeup_main_task(); |