Skip to content

Commit

Permalink
Displaying playlistItemId for deleted videos
Browse files Browse the repository at this point in the history
  • Loading branch information
Lucas-C committed Aug 13, 2023
1 parent 3f1c3c4 commit 0be4991
Showing 1 changed file with 4 additions and 5 deletions.
9 changes: 4 additions & 5 deletions youtube_playlist_watcher.py
Original file line number Diff line number Diff line change
Expand Up @@ -160,11 +160,10 @@ def added(changeset, *_):
@staticmethod
def deleted(changeset, args):
for old_item in changeset:
video_name = retrieve_old_video_info_from_prev_dumps(get_video_id(old_item), args).video_name if is_video_deleted(old_item) else get_video_name(old_item)
yield ('DELETED: ' + video_name + ' ' + get_video_url(old_item)
# TODO: insert .playlistItemId (that IS accessible), like for private videos
+ ' ({}th video in the playlist)'.format(old_item['current_index'])
+ '\n -> find another video named like that: ' + get_search_url(video_name))
video_info = retrieve_old_video_info_from_prev_dumps(get_video_id(old_item), args) if is_video_deleted(old_item) else OldVideoInfo(get_video_name(old_item), old_item['playlistItemId'])
yield ('DELETED: ' + video_info.video_name + ' ' + get_video_url(old_item)
+ ' ({}th video in the playlist, with playlistItemId={})'.format(old_item['current_index'], video_info.playlist_item_id)
+ '\n -> find another video named like that: ' + get_search_url(video_info.video_name))
@staticmethod
def removed(changeset, *_):
for old_item in changeset:
Expand Down

0 comments on commit 0be4991

Please sign in to comment.