[Streams] Set YouTube channel name when added by ID (#2047)

* [Streams] Set YouTube channel name when added by ID

Signed-off-by: Toby Harradine <tobyharradine@gmail.com>

* Move unset token raise to correct place

Signed-off-by: Toby Harradine <tobyharradine@gmail.com>

* Correct logic in get_stream

Signed-off-by: Toby Harradine <tobyharradine@gmail.com>

* Fetch name explicitly instead

Signed-off-by: Toby Harradine <tobyharradine@gmail.com>
This commit is contained in:
Toby Harradine
2018-08-26 23:53:47 +10:00
committed by GitHub
parent 0cf54ec9c2
commit 93138b04cb
2 changed files with 22 additions and 3 deletions

View File

@@ -472,7 +472,7 @@ class Streams:
return stream
elif not self.check_name_or_id(name) and stream.id == name:
return stream
if stream.type == _class.__name__ and stream.name.lower() == name.lower():
elif stream.type == _class.__name__ and stream.name.lower() == name.lower():
return stream
def get_community(self, _class, name):