Skip to content

Conversation

jmwebslave
Copy link

This PR provides support for filtering of videos being added from either Channel IDs or Playlist IDs similarly to what is requested in issue #69.

This is achieved by adding a new supported format for the Channel/Playlist/Keyword cell:
F:<title filter>|<channel or playlist id>

From the notes in issue #69 there was initially the suggestion to use getVideoIds() to achieve this using YouTube.Search.List at a cost of 100 API credits per 50 videos (due to maxResults 50) and provide the filter as part of that call. I have opted not to do so for the following reasons:

  1. Try as I might I couldn't reliably get YouTube to return expected videos when making this call (new live streams prefixed in the title with the filter string were not returned, but older live streams containing the filter string would be).
  2. I found that a much cheaper solution exists.

My code (for Channel IDs):

  • Calls YouTube.Channels.List to obtain the relatedPlaylistID for uploads (1 credit)
  • Calls YouTube.PlaylistItems.List to obtain the 50 newest videos (1 credit)

My code (for Playlist IDs):

  • Calls YouTube.PlaylistItems.List to obtain the 50 newest videos (1 credit)

I have updated README.MD in this PR to explain the filtering feature.

Happy to take any questions or criticism. Thanks for your work on the script!

@jmwebslave jmwebslave mentioned this pull request Mar 20, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant