From 9cc6f5eae823d9ac51d9e8c9457ef4ce6356840c Mon Sep 17 00:00:00 2001 From: Laurent DEFERT Date: Tue, 10 Jan 2023 00:02:05 +0100 Subject: [PATCH] load youtube channels from www.youtube.com/{key} Some channel return a 404 with the /c/ prefix (ie. https://www.youtube.com/c/@relaxingmusicandvibes) --- tubesync/manage.py | 0 tubesync/sync/models.py | 4 ++-- 2 files changed, 2 insertions(+), 2 deletions(-) mode change 100755 => 100644 tubesync/manage.py diff --git a/tubesync/manage.py b/tubesync/manage.py old mode 100755 new mode 100644 diff --git a/tubesync/sync/models.py b/tubesync/sync/models.py index 59ce225..4d95010 100644 --- a/tubesync/sync/models.py +++ b/tubesync/sync/models.py @@ -114,13 +114,13 @@ class Source(models.Model): } # Format to use to display a URL for the source URLS = { - SOURCE_TYPE_YOUTUBE_CHANNEL: 'https://www.youtube.com/c/{key}', + SOURCE_TYPE_YOUTUBE_CHANNEL: 'https://www.youtube.com/{key}', SOURCE_TYPE_YOUTUBE_CHANNEL_ID: 'https://www.youtube.com/channel/{key}', SOURCE_TYPE_YOUTUBE_PLAYLIST: 'https://www.youtube.com/playlist?list={key}', } # Format used to create indexable URLs INDEX_URLS = { - SOURCE_TYPE_YOUTUBE_CHANNEL: 'https://www.youtube.com/c/{key}/videos', + SOURCE_TYPE_YOUTUBE_CHANNEL: 'https://www.youtube.com/{key}/videos', SOURCE_TYPE_YOUTUBE_CHANNEL_ID: 'https://www.youtube.com/channel/{key}/videos', SOURCE_TYPE_YOUTUBE_PLAYLIST: 'https://www.youtube.com/playlist?list={key}', }