After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 723091 - Youtube support for Google provider
Youtube support for Google provider
Status: RESOLVED OBSOLETE
Product: gnome-online-accounts
Classification: Core
Component: general
unspecified
Other All
: Normal enhancement
: ---
Assigned To: Sindhu S
GNOME Online Accounts maintainer(s)
Depends on:
Blocks: 723093
 
 
Reported: 2014-01-27 11:36 UTC by Sindhu S
Modified: 2021-07-05 10:59 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
Add Youtube permissions (1.23 KB, patch)
2014-01-29 11:25 UTC, Sindhu S
reviewed Details | Review
Add Youtube permissions (4.05 KB, patch)
2014-01-29 18:20 UTC, Sindhu S
needs-work Details | Review
Add Video permissions (4.87 KB, patch)
2014-02-04 10:12 UTC, Sindhu S
none Details | Review

Description Sindhu S 2014-01-27 11:36:32 UTC
Hi! I am using gnome-online-accounts in GNOME Shell 3.10.2.1.

In purview of "Share to youtube" feature for Cheese, I'd like to add youtube permissions to the existing Google account authentication in g-o-a.

Please excuse if I am not using the right technical terms.
I'd like some help in implementing this, for groundwork, I am building g-o-a from git master and looking at the codebase.
Comment 1 Debarshi Ray 2014-01-27 11:51:10 UTC
Look at get_scope in src/goabackend/goagoogleprovider.c

Where is the corresponding cheese bug? Are you coordinating with totem? I think Bastien is working on a "access my Youtube account" in totem.
Comment 2 Bastien Nocera 2014-01-27 12:01:46 UTC
(In reply to comment #1)
> Look at get_scope in src/goabackend/goagoogleprovider.c
> 
> Where is the corresponding cheese bug? Are you coordinating with totem? I think
> Bastien is working on a "access my Youtube account" in totem.

I'm not planning it in the short-term, though there's bug 722422 for Grilo.
Comment 3 Sindhu S 2014-01-29 11:25:03 UTC
Created attachment 267497 [details] [review]
Add Youtube permissions

Please review, thanks.
Comment 4 Bastien Nocera 2014-01-29 11:32:42 UTC
Review of attachment 267497 [details] [review]:

::: src/goabackend/goagoogleprovider.c
@@ +148,3 @@
+
+         /* Google Youtube access */
+         "https://www.googleapis.com/auth/youtube.upload";

There needs to be a new capability to go with that.
Comment 5 Sindhu S 2014-01-29 11:37:55 UTC
(In reply to comment #4)
> Review of attachment 267497 [details] [review]:
> 
> ::: src/goabackend/goagoogleprovider.c
> @@ +148,3 @@
> +
> +         /* Google Youtube access */
> +         "https://www.googleapis.com/auth/youtube.upload";
> 
> There needs to be a new capability to go with that.

Oh! I am not sure how to go about this, can you give me the general plan here?

By "capability" do you mean that I have to create the code and UI that switches ON/OFF for youtube in gnome-online-acounts module? Please excuse for my lack of proper technical terms.
Comment 6 Bastien Nocera 2014-01-29 11:40:51 UTC
(In reply to comment #5)
> (In reply to comment #4)
> > Review of attachment 267497 [details] [review] [details]:
> > 
> > ::: src/goabackend/goagoogleprovider.c
> > @@ +148,3 @@
> > +
> > +         /* Google Youtube access */
> > +         "https://www.googleapis.com/auth/youtube.upload";
> > 
> > There needs to be a new capability to go with that.
> 
> Oh! I am not sure how to go about this, can you give me the general plan here?
> 
> By "capability" do you mean that I have to create the code and UI that switches
> ON/OFF for youtube in gnome-online-acounts module? Please excuse for my lack of
> proper technical terms.

Exactly. Look at the patch that added "Pocket" support, which shows you how to add your new capability (likely named "Video").
Comment 7 Sindhu S 2014-01-29 18:20:14 UTC
Created attachment 267548 [details] [review]
Add Youtube permissions

Please review, thanks. 

Tested, working.
Comment 8 Debarshi Ray 2014-01-31 15:48:15 UTC
Review of attachment 267548 [details] [review]:

I can't see the changes to data/dbus-interfaces.xml.

You need to add a new interface for videos, and a property to disable it. Something like:
<property name="VideosDisabled" type="b" access="readwrite"/>
... and ...
<interface name="org.gnome.OnlineAccounts.Videos">
</interface>

There are lots of examples in that file.

::: src/goabackend/goagoogleprovider.c
@@ +145,3 @@
+         "https://www.googleapis.com/auth/googletalk "
+
+         /* Google Youtube access */

Drop the "access", bump the credentials generation, and a new _VIDEOS feature to the list of provider features.

@@ +329,3 @@
   gboolean chat_enabled;
   gboolean documents_enabled;
+  gboolean youtube_enabled;

This should be "video", not "youtube".

@@ +472,3 @@
       goa_account_set_chat_disabled (account, !chat_enabled);
       goa_account_set_documents_disabled (account, !documents_enabled);
+      goa_account_set_youtube_disabled (account, !youtube_enabled);

Same - "video", not "youtube".

@@ +500,1 @@
     }

Same - "video", not "youtube".

@@ +569,1 @@
 }

Same - "video", not "youtube".

@@ +580,3 @@
   g_variant_builder_add (builder, "{ss}", "ChatEnabled", "true");
   g_variant_builder_add (builder, "{ss}", "DocumentsEnabled", "true");
+  g_variant_builder_add (builder, "{ss}", "YoutubeEnabled", "true");

Same - "video", not "youtube".
Comment 9 Sindhu S 2014-02-04 10:12:35 UTC
Created attachment 268047 [details] [review]
Add Video permissions

(In reply to comment #8)
> I can't see the changes to data/dbus-interfaces.xml.
> You need to add a new interface for videos, and a property to disable it.
> Something like:
> <property name="VideosDisabled" type="b" access="readwrite"/>
> ... and ...
> <interface name="org.gnome.OnlineAccounts.Videos">
> </interface>
 
 
> ::: src/goabackend/goagoogleprovider.c
> @@ +145,3 @@
> +         "https://www.googleapis.com/auth/googletalk "
> +
> +         /* Google Youtube access */
> 
> Drop the "access", 

Done.

> bump the credentials generation, 
> and a new _VIDEOS feature to the list of provider features.

I don't know what you mean by these instructions. Could you please explain?
 
> @@ +329,3 @@
>    gboolean chat_enabled;
>    gboolean documents_enabled;
> +  gboolean youtube_enabled;
> 
> This should be "video", not "youtube".

All instances of "youtube" changed to "video".
Comment 10 GNOME Infrastructure Team 2021-07-05 10:59:21 UTC
GNOME is going to shut down bugzilla.gnome.org in favor of gitlab.gnome.org.
As part of that, we are mass-closing older open tickets in bugzilla.gnome.org
which have not seen updates for a longer time (resources are unfortunately
quite limited so not every ticket can get handled).

If you can still reproduce the situation described in this ticket in a recent
and supported software version, then please follow
  https://wiki.gnome.org/GettingInTouch/BugReportingGuidelines
and create a new ticket at
  https://gitlab.gnome.org/GNOME/gnome-online-accounts/-/issues/

Thank you for your understanding and your help.