Remove the /channel/ from the URL

This commit is contained in:
tcely 2025-01-22 20:42:18 -05:00 committed by GitHub
parent 5546c5dad2
commit 25892388a1
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -297,11 +297,11 @@ class ValidateSourceView(FormView):
'@' == self.key[0]
)
if use_channel_id:
source_type = self.source_type
self.source_type_str = 'youtube-channel-id'
self.source_type = self.source_types.get(self.source_type_str, None)
url = Source.create_index_url(self.source_type, self.key, 'videos')
self.key = youtube.get_channel_id(
Source.create_index_url(source_type, self.key, 'videos')
url.replace('/channel/', '/')
)
for field in fields_to_populate:
if field == 'source_type':