[gnome-photos/wip/rishi/share-point-google-parametrize-provider-type: 2/2] share-point-google: Don't hard code the GOA provider type
- From: Debarshi Ray <debarshir src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-photos/wip/rishi/share-point-google-parametrize-provider-type: 2/2] share-point-google: Don't hard code the GOA provider type
- Date: Sat, 20 Mar 2021 15:19:38 +0000 (UTC)
commit 368b339ca89bff2da5798c8117be498b82154119
Author: Debarshi Ray <debarshir gnome org>
Date: Sat Mar 20 16:19:11 2021 +0100
share-point-google: Don't hard code the GOA provider type
src/photos-share-point-google.c | 13 ++++++++-----
1 file changed, 8 insertions(+), 5 deletions(-)
---
diff --git a/src/photos-share-point-google.c b/src/photos-share-point-google.c
index 2b579639..aa216f2a 100644
--- a/src/photos-share-point-google.c
+++ b/src/photos-share-point-google.c
@@ -141,23 +141,26 @@ photos_share_point_google_share_metadata_add_shared_second (PhotosSharePointGoog
PhotosSharePointGoogleShareData *data;
const gchar *account_id;
const gchar *file_entry_id;
+ const gchar *provider_type;
cancellable = g_task_get_cancellable (task);
data = (PhotosSharePointGoogleShareData *) g_task_get_task_data (task);
app = g_application_get_default ();
- miner = photos_application_get_miner (PHOTOS_APPLICATION (app), "google");
+
+ source = photos_share_point_online_get_source (PHOTOS_SHARE_POINT_ONLINE (self));
+ object = photos_source_get_goa_object (source);
+ account = goa_object_peek_account (object);
+ provider_type = goa_account_get_provider_type (account);
+
+ miner = photos_application_get_miner (PHOTOS_APPLICATION (app), provider_type);
if (miner == NULL)
{
g_task_return_new_error (task, PHOTOS_ERROR, 0, "Unable to find the google miner");
goto out;
}
- source = photos_share_point_online_get_source (PHOTOS_SHARE_POINT_ONLINE (self));
- object = photos_source_get_goa_object (source);
- account = goa_object_peek_account (object);
account_id = goa_account_get_id (account);
-
file_entry_id = gdata_entry_get_id (GDATA_ENTRY (data->file_entry));
gom_miner_call_insert_shared_content (miner,
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]