Add title field to YoutubeCredentials model and update related templates and tasks
This commit is contained in:
parent
f36fe8ea84
commit
83404e2ed5
6 changed files with 22 additions and 6 deletions
|
@ -8,7 +8,6 @@ from . import models
|
|||
@shared_task
|
||||
def generate_playlist(creds, game_pk):
|
||||
game = models.MusikGame.objects.get(pk=game_pk)
|
||||
creds.pop("channel_title")
|
||||
credentials = google.oauth2.credentials.Credentials(**creds)
|
||||
yt_api = googleapiclient.discovery.build("youtube", "v3", credentials=credentials)
|
||||
pl_request = yt_api.playlists().insert(
|
||||
|
@ -48,7 +47,6 @@ def generate_playlist(creds, game_pk):
|
|||
|
||||
@shared_task
|
||||
def delete_playlist(creds, playlist_id):
|
||||
creds.pop("channel_title")
|
||||
credentials = google.oauth2.credentials.Credentials(**creds)
|
||||
|
||||
yt_api = googleapiclient.discovery.build("youtube", "v3", credentials=credentials)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue