KoljaWindeler / ytube_music_player

YouTube music player for homeassistant
345 stars 53 forks source link

When searching playlists, podcast playlists are included #285

Open pathofleastresistor opened 11 months ago

pathofleastresistor commented 11 months ago

Example of an unsupported result:

{
    "category": "Community playlists",
    "resultType": "playlist",
    "title": "Non Stop Christmas Songs Medley 2024",
    "itemCount": "Relax",
    "author": None,
    "browseId": "MPSPPLrbMWQIjTsR11HBTZRhpHkFXybdy7jcDn",
    "thumbnails": [
        {
            "url": "https://i.ytimg.com/pl_c/PLrbMWQIjTsR11HBTZRhpHkFXybdy7jcDn/studio_square_thumbnail.jpg?sqp=COS0rKwG-oaymwEICDwQPCAASFo&rs=AMzJL3m1dBotRDq8Js_r2Ia2tAbmSfqZ9A",
            "width": 60,
            "height": 60,
        },
        {
            "url": "https://i.ytimg.com/pl_c/PLrbMWQIjTsR11HBTZRhpHkFXybdy7jcDn/studio_square_thumbnail.jpg?sqp=COS0rKwG-oaymwEICHgQeCAASFo&rs=AMzJL3m9pKL9sT32cMJJftCDEpniKnh8RA",
            "width": 120,
            "height": 120,
        },
        {
            "url": "https://i.ytimg.com/pl_c/PLrbMWQIjTsR11HBTZRhpHkFXybdy7jcDn/studio_square_thumbnail.jpg?sqp=COS0rKwG-oaymwEKCOIBEOIBIABIWg&rs=AMzJL3llAXl6QP3mh6MzZTGnSvv_uoGxow",
            "width": 226,
            "height": 226,
        },
        {
            "url": "https://i.ytimg.com/pl_c/PLrbMWQIjTsR11HBTZRhpHkFXybdy7jcDn/studio_square_thumbnail.jpg?sqp=COS0rKwG-oaymwEKCKAEEKAEIABIWg&rs=AMzJL3kN5XoV2ljC7q_ekIc2b56bxmfn4Q",
            "width": 544,
            "height": 544,
        },
    ],
}

Example of supported result:

{
    "category": "Community playlists",
    "resultType": "playlist",
    "title": "Christmas Music - More than 100 Top Best Hits Songs - Entire playlist suitable for mobile phones, video game consoles or TV Radio set-top boxes - 2023",
    "itemCount": "144M",
    "author": "Christmas Music Videos",
    "browseId": "VLPLR7sPawuzFmKc1Q0dFwbawJASpUo8Kggp",
    "thumbnails": [
        {
            "url": "https://yt3.googleusercontent.com/AGZavY_OvxaQuKDvIKeRGrtSIp0rne_dp6g1AZaeUeNz26IpdwiAxQmhAUFvezGiJlZ5dQuHn9HQ=s192",
            "width": 192,
            "height": 192,
        },
        {
            "url": "https://yt3.googleusercontent.com/AGZavY_OvxaQuKDvIKeRGrtSIp0rne_dp6g1AZaeUeNz26IpdwiAxQmhAUFvezGiJlZ5dQuHn9HQ=s576",
            "width": 576,
            "height": 576,
        },
        {
            "url": "https://yt3.googleusercontent.com/AGZavY_OvxaQuKDvIKeRGrtSIp0rne_dp6g1AZaeUeNz26IpdwiAxQmhAUFvezGiJlZ5dQuHn9HQ=s1200",
            "width": 1200,
            "height": 1200,
        },
    ],
}

It appear that users can create community playlists that are a collection of podcast episodes. Right now it looks YTM will prepend these lists with MPSP as opposed to VL. YTMusic API doesn't know how to handle podcast playlists so makes sense to also filter out.

KoljaWindeler commented 10 months ago

so basically remove all lists that start with MPSP from the playlists?