Author Topic: "SpotToBee" Python Tool  (Read 1241 times)

Brendan Stupik

  • Newbie
  • *
  • Posts: 7
How do you make those 'This Is' playlists? Do you have a script which generates them based on popularity, genre, rating, etc.? Or is it just manual?
Wondering because it could be a cool algorithm you might have cooked up.

I am also interested in this, @Brendan Stupik.
Hi, you can use my python tool "SpotToBee" ("pip install SpotToBee," or see the GitHub page: https://github.com/BrendanStupik/SpotToBee) to download playlists from Spotify with their covers. Basically, it constructs a smart playlist to match each song in a given Spotify playlist by artist and title filters, with some regex to remove things like "- Remastered 2015."

If you have a large collection of music, it can be quite fun to copy their radio stations, "This Is" playlists, etc. over to MusicBee. I hope this is helpful!
Last Edit: December 01, 2024, 10:00:43 PM by phred

Brendan Stupik

  • Newbie
  • *
  • Posts: 7
Hello,
Here is my configuration for several years. No extra tabs, everything is on this page. But I may have to add an Artist tab as I'm starting to have too many albums.


How do you make those 'This Is' playlists? Do you have a script which generates them based on popularity, genre, rating, etc.? Or is it just manual?
Wondering because it could be a cool algorithm you might have cooked up.

Hi! It looks like you quoted the wrong post, which is why I'm just now replying to this. I linked my tool SpotToBee in the post above this reply, so hopefully that explains how I made the playlists.

Otherwise, I actually did experiment with creating my own "This Is" algorithm, but Spotify seemed to be the only API with easily accessible audio analysis features. If you have any ideas as to where else I might be able to find that data, I’d definitely be open to working on an alternative!

I’m currently developing a tool that can pull those audio analysis features from Spotify—values like "danceability," energy, and key—and tag local audio files with them. This could theoretically be used to create smart playlists in MusicBee, but I'm limited by the number of custom tags (there are too many to actually use them all in MusicBee unless they're merged into one tag and then split with virtual tags), and I’m trying to figure out how to implement this at the moment.

As of now, I can generate smart playlists based on energy, valence, etc., but it’s a bit subjective and challenging to translate those values into moods or anything worthwhile for the average listener. For example, <50 energy and >70 "acousticness" might create a "relaxing" playlist, but this process is highly prone to error. I know Spotify has a "popularity" tag, but honestly, I figured generated playlists based on that value would be very similar to their curated playlists anyway.
Last Edit: November 04, 2024, 09:19:09 PM by Brendan Stupik

The Incredible Boom Boom

  • Sr. Member
  • ****
  • Posts: 1419
Hi, you can use my python tool "SpotToBee" ("pip install SpotToBee," or see the GitHub page: https://github.com/BrendanStupik/SpotToBee) to download playlists from Spotify with their covers. Basically, it constructs a smart playlist to match each song in a given Spotify playlist by artist and title filters, with some regex to remove things like "- Remastered 2015."

If you have a large collection of music, it can be quite fun to copy their radio stations, "This Is" playlists, etc. over to MusicBee. I hope this is helpful!

Many thanks!

ewan

  • Newbie
  • *
  • Posts: 10
How do you make those 'This Is' playlists? Do you have a script which generates them based on popularity, genre, rating, etc.? Or is it just manual?
Wondering because it could be a cool algorithm you might have cooked up.

I am also interested in this, @Brendan Stupik.
Hi, you can use my python tool "SpotToBee" ("pip install SpotToBee," or see the GitHub page: https://github.com/BrendanStupik/SpotToBee) to download playlists from Spotify with their covers. Basically, it constructs a smart playlist to match each song in a given Spotify playlist by artist and title filters, with some regex to remove things like "- Remastered 2015."

If you have a large collection of music, it can be quite fun to copy their radio stations, "This Is" playlists, etc. over to MusicBee. I hope this is helpful!
I have a question about the script, but it seems there is no topic for discussion here. I often use Picard for tags, but sometimes the title tag may not be specific, such as missing (live...) or the album tag may be unmarked (deluxe). Is it possible to match songs by isrc and upc (barcode) tags? I don't risk using the script yet because of a bad experience with the last.fm playlist plugin, when due to differences in the artist tag, the plugin could not match songs with feat.

hiccup

  • Hero Member
  • *****
  • Posts: 9107
I have a question about the script, but it seems there is no topic for discussion here.
This may be interesting to other users too, so it probably deserves a dedicated topic on this forum.
You could create one yourself if you so desire?
But I don't think it is something that is on-topic for this particular thread?

sveakul

  • Hero Member
  • *****
  • Posts: 3262
I have a question about the script, but it seems there is no topic for discussion here. I often use Picard for tags, but sometimes the title tag may not be specific, such as missing (live...) or the album tag may be unmarked (deluxe). Is it possible to match songs by isrc and upc (barcode) tags? I don't risk using the script yet because of a bad experience with the last.fm playlist plugin, when due to differences in the artist tag, the plugin could not match songs with feat.
Try checking here:  https://getmusicbee.com/forum/index.php?topic=16538.0

Brendan Stupik

  • Newbie
  • *
  • Posts: 7
Quote
I have a question about the script, but it seems there is no topic for discussion here. I often use Picard for tags, but sometimes the title tag may not be specific, such as missing (live...) or the album tag may be unmarked (deluxe). Is it possible to match songs by isrc and upc (barcode) tags? I don't risk using the script yet because of a bad experience with the last.fm playlist plugin, when due to differences in the artist tag, the plugin could not match songs with feat.

Hi! I think ISRC matching is an excellent idea. I am rather certain the Spotify API returns ISRC information in playlist GET requests, so I’ll look into it.

If, in the meantime, you’re simply hoping to reduce spammy tracks in your playlists (live tracks instead of studio versions, etc.) the tool offers the ability to filter by release type. For example, you could filter out the ‘live’ or 'compilation' release types from Picard.  I’m not a Picard expert, but I believe it saves this info to the 'release type' tag by default, though it could be a plugin. You have to have to integrate this data into MusicBee as a custom tag for it to be used as a smart playlist filter, but SpotToBee’s config.ini allows you to specify it by tag name.

Regarding artist tags, you'll have to forgive me for this oversight, but the tool will have to be updated to handle instances with multiple track artists. I have an idea in mind, though, so I'll try to update the tool soon. This will probably be the #1 priority in terms of updating the tool, and I'll work on ISRC later down the road, as it will require some investigating Spotipy. If anyone would like to help, the tool is open source!
Last Edit: December 15, 2024, 11:30:03 PM by Brendan Stupik

Brendan Stupik

  • Newbie
  • *
  • Posts: 7
Thank you guys for making a dedicated SpotToBee thread. I'm glad to see some people enjoying this little project of mine. I wanted to very quickly update future readers and inform you all that Spotify has made a most-unfortunate decision to disable API requests for all Spotify-owned playlists. This decision, essentially, disallows SpotToBee access to their radios, ‘This Is...’ curations, charts,  blends, and more. I find this remarkably disappointing. That said, SpotToBee still works with private (human created, even if they aren't yours) playlists. I hope it can still be of some use to all of you!
Last Edit: December 15, 2024, 11:33:57 PM by Brendan Stupik

ZicMan

  • Newbie
  • *
  • Posts: 4
Awesome little script that works on the fly, flawlessly. Thanks, Brendan !