Browse Source

Revert the workaround for Youtube playlist bug now the bug is fixed by Youtube (see #47)

pull/51/head
LecygneNoir 3 years ago
parent
commit
dab44244f3
2 changed files with 7 additions and 8 deletions
  1. +1
    -0
      CHANGELOG.md
  2. +6
    -8
      prismedia/yt_upload.py

+ 1
- 0
CHANGELOG.md View File

@ -6,6 +6,7 @@
- Fix a typo in log (missing space when displaying thumbnail) (see #47)
- Add pagination when searching playlist in Peertube as default pagination show only 14 playlists (see #41)
- Add a check to avoid uploading video on Peertube with more than 5 tags (see #48)
- Revert the workaround for Youtube playlist bug now the bug is fixed by Youtube (see #47)
## v0.10.1

+ 6
- 8
prismedia/yt_upload.py View File

@ -253,14 +253,12 @@ def set_playlist(youtube, playlist_id, video_id):
part='snippet'
).execute()
except Exception as e:
# Workaround while youtube API is broken, see issue #47 for details
if e.resp.status != 404 and "Video not found" not in str(e):
if hasattr(e, 'message'):
logger.critical("Youtube: " + str(e.message))
exit(1)
else:
logger.critical("Youtube: " + str(e))
exit(1)
if hasattr(e, 'message'):
logger.critical("Youtube: " + str(e.message))
exit(1)
else:
logger.critical("Youtube: " + str(e))
exit(1)
logger.info('Youtube: Video is correctly added to the playlist.')

Loading…
Cancel
Save