@iamtraction/play-dl
    Preparing search index...

    Class YouTubePlayList

    YouTube Playlist Class containing vital informations about playlist.

    Index
    channel?: YouTubeChannel

    YouTube Playlist channel data

    id?: string

    YouTube Playlist ID

    lastUpdate?: string

    Time when playlist was last updated

    link?: string

    YouTube Playlist url with starting video url.

    thumbnail?: YouTubeThumbnail

    YouTube Playlist thumbnail Data

    title?: string

    YouTube Playlist Name

    type: "video" | "playlist" | "channel"

    YouTube Class type. == "playlist"

    url?: string

    YouTube Playlist url

    videoCount?: number

    Total no of videos in that playlist

    views?: number

    Total views of that playlist

    • get total_videos(): number

      This tells total number of videos that have been fetched so far.

      This can be equal to videosCount if all videos in playlist have been fetched and they are not hidden.

      Returns number

    • Fetches remaining data from playlist

      For fetching and getting all songs data, see total_pages property.

      Parameters

      • max: number = Infinity

        Max no of videos to fetch

        Default = Infinity

      Returns Promise<YouTubePlayList>

    • Parses next segment of videos from playlist and returns parsed data.

      Parameters

      • limit: number = Infinity

        Total no of videos to parse.

        Default = Infinity

      Returns Promise<YouTubeVideo[]>

      Array of YouTube Video Class

    • YouTube Playlists are divided into pages.

      For example, if you want to get 101 - 200 songs

      const playlist = await play.playlist_info('playlist url')

      await playlist.fetch()

      const result = playlist.page(2)

      Parameters

      • number: number

        Page number

      Returns YouTubeVideo[]

      Array of YouTube Video Class