Browse Source

Fix playlist matching

Existing playlists don't match because title isn't utf-8 encoded.
Manoj Patel 9 years ago
parent
commit
b72c19827e
1 changed files with 1 additions and 1 deletions
  1. 1 1
      youtube_upload/playlists.py

+ 1 - 1
youtube_upload/playlists.py

@@ -8,7 +8,7 @@ def get_playlist(youtube, title):
         results = request.execute()
         for item in results["items"]:
             existing_playlist_title = item.get("snippet", {}).get("title")
-            if existing_playlist_title.encode("utf8") == title:
+            if existing_playlist_title.encode("utf8") == title.encode("utf-8"):
                 return item.get("id")
         request = playlists.list_next(request, results)