From 847e3eefad3360d224feece96a456f58785ca5a7 Mon Sep 17 00:00:00 2001 From: Chocobozzz Date: Thu, 1 Oct 2015 21:04:45 +0200 Subject: [PATCH] Fix byte range requests with seafile (server >= 4.4.1) --- Changelog | 2 +- src/internet/seafile/seafileservice.cpp | 4 +++- src/internet/seafile/seafilesettingspage.cpp | 2 +- 3 files changed, 5 insertions(+), 3 deletions(-) diff --git a/Changelog b/Changelog index 9d799139a..16fd7877d 100644 --- a/Changelog +++ b/Changelog @@ -1,7 +1,7 @@ Next release: Major features: * Vk.com support - * Seafile support + * Seafile support (server >= 4.4.1) * Amazon Cloud Drive support * Add Ampache compatibility (through Subsonic service) * Add new analyzer "Rainbow Dash" diff --git a/src/internet/seafile/seafileservice.cpp b/src/internet/seafile/seafileservice.cpp index 336eeb62f..9bb4451a5 100644 --- a/src/internet/seafile/seafileservice.cpp +++ b/src/internet/seafile/seafileservice.cpp @@ -250,7 +250,7 @@ void SeafileService::UpdateLibrariesInProgress( library_updated_ = library_to_update; - if (library_to_update == "none") { + if (library_to_update.isEmpty() || library_to_update == "none") { app_->task_manager()->SetTaskFinished(indexing_task_id_); indexing_task_id_ = -1; UpdatingLibrariesFinishedSignal(); @@ -475,6 +475,8 @@ QNetworkReply* SeafileService::PrepareFetchContentUrlForFile( const QString& library, const QString& filepath) { QUrl content_url(server_ + QString(kFileUrl).arg(library)); content_url.addQueryItem("p", filepath); + // See https://github.com/haiwen/seahub/issues/677 + content_url.addQueryItem("reuse", "1"); QNetworkRequest request(content_url); AddAuthorizationHeader(&request); diff --git a/src/internet/seafile/seafilesettingspage.cpp b/src/internet/seafile/seafilesettingspage.cpp index dc8c71d4f..d87026606 100644 --- a/src/internet/seafile/seafilesettingspage.cpp +++ b/src/internet/seafile/seafilesettingspage.cpp @@ -134,7 +134,7 @@ void SeafileSettingsPage::Login() { } void SeafileSettingsPage::Logout() { - // Forget the songs added + // Forget the added songs by changing the library to "none" service_->ChangeLibrary("none"); service_->ForgetCredentials();