An extension geared towards Spotify users with larger libraries; view all your playlists that contain a specific song with the click of a button. Designed for Spicetify (https://github.com/khanhas/spicetify-cli)

Overview

ViewPlaylistsWithSong

An extension developed for Spicetify that allows you to view all the playlists in your library that contain a certain song. Ideal for Spotify enthusiasts with several dozen playlists.

Demo Gif

What it does

This extension adds a new button "View Playlists with Song" that appears whenever you click on any track in Spotify. This can be in context of a playlist, album, friend activity, or even the song that's currently playing. When you click this button, you will be redirected to a page that displays the song information on top and any playlists it appears in on bottom. Only playlists in your library that are owned by you will appear in the results. If you select a song that does not appear in any of your playlists, no playlists will be displayed.

How to install it

Make sure you have a functioning, updated install of Spicetify (v1.2.1). Download the file in this repository called ViewPlaylistsWithSong.js and place this file inside your .spicetify/Extensions folder. If this is your first time downloading an extension, you may want to reference this document. Once you have placed the file in the Extensions directory, you need to open the file called config.ini (should be in the parent directory) and edit the Extensions value under AdditionalOptions. If you have no other extensions, set it equal to the filename (ViewPlaylistsWithSong.js). If you have other extensions installed, proceed the filename with a pipe character (|) as mentioned in the documentation.

What if it doesn't work

If you encounter any bugs or unexpected behavior, please file an issue explaining your problem and how to replicate it. Including screenshots is always helpful, and bonus points if you mention any errors appearing in the DevTools console.

Bonus: How it works

This is for developers that want to get a bit of an insight into how the code works. If you reference the file, you should find it to be reasonably well-commented. I did a lot of reverse-engineering by logging events in the console and trying to determine what causes what. There are very few documentations of the Spotify Desktop API out there, and the ones that exist are heavily outdated. I definitely recommend looking at spicetifyWrapper.js inside the jsHelper folder in the spicetify-cli repository. This helped me get a fundamental understanding of what was going on. Run a github search for "spicetify" and see what repos come up. Look at other people's extensions and see if you can make sense of their code. Some of the framework laid down by Khanhas' extensions were a solid help for me.

As for what's actually going on inside of my code - in the background, a BridgeAPI call is being placed on an interval to get the most current reading of the user's library. This is then sorted through and only playlists that meet certain criteria (public & owned by the user) are stored in a local variable. Whenver the user clicks the ContextMenu button, the song uri is passed to a handler that iterates through every playlist and searchs for the specific song, keeping track of the playlists that contain it. After this is done, I simulate a call to the desktop app's source code telling it to load a page called SongPage. Once that page has rendered, I inject my own HTML and override some of the pre-placed DOM in order to display the playlists that were collected previously. This was the hardest part for me, since frontend development isn't my forte (especially when there is no documentation!).

Conclusion

Thank you for using my extension.

If you would like to contribute, please feel free to create a pull request or contact me on Discord: Ollog10#2051

God bless!

Comments
  • [Bug] Extension not working

    [Bug] Extension not working

    Hello, this is the only extension I have that is not working properly/ at all with my Spotify. I installed it the same way as the rest. What info can I share that could help solve this problem?

    bug 
    opened by e-caliva 3
  • Specify Spicetify version in README & check for version in code

    Specify Spicetify version in README & check for version in code

    Certain features rely on certain Spicetify versions. Include which version(s) are supported by this extension in the README and perform a check when the extension is initializing to ensure it is being used with a compatible Spicetify version.

    enhancement 
    opened by elijaholmos 2
  • [Bug] Doesn't work after installation

    [Bug] Doesn't work after installation

    Hello,

    I tried installing the extension how you said, and did spicetify apply, tried reinstalling several time but the button doesn't show up and it is as if I didn't install it.

    I also have BetterLeftSidebar, copyPlaylistInfo, genre, hidePodcasts installed and here is my config-xpui.ini:

    [Setting]
    spotify_path            = /opt/spotify
    prefs_path              = /home/kaiser/.config/spotify/prefs
    replace_colors          = 1
    overwrite_assets        = 0
    spotify_launch_flags    = 
    check_spicetify_upgrade = 0
    current_theme           = Sleek
    color_scheme            = 
    inject_css              = 1
    
    [Preprocesses]
    expose_apis           = 1
    disable_upgrade_check = 1
    disable_sentry        = 1
    disable_ui_logging    = 1
    remove_rtl_rule       = 1
    
    [AdditionalOptions]
    home_config           = 1
    experimental_features = 1
    extensions            = hidePodcasts.js|BetterLeftSidebar.js|genre.js|ViewPlaylistsWithSong.js|bookmark.js|keyboardShortcut.js|popupLyrics.js|shuffle+.js|copyPlaylistInfo.js
    custom_apps           = 
    sidebar_config        = 1
    
    [Patch]
    
    ; DO NOT CHANGE!
    [Backup]
    version = 1.1.84.716.gc5f8b819
    with    = 2.11.1
    

    If you need more information to help me, please let me know. I hope we find a solution because your extension is exactely what I need since ages to help sorting my songs and it will be very helpful!

    bug 
    opened by kaizokuroo 1
  • Is it still maintained?

    Is it still maintained?

    I just tried the extension, I have searched for something like this forever, but I can't get it to work, the button just won't show up. Are you still working on it/planning on updating it to the latest Spicetify release? I read that you only develop for the Legacy Version, but maybe you changed your mind in the last year. Doesn't hurt to ask :)

    Thank you @elijaholmos !

    question 
    opened by MissTyne 1
  • [Bug] View Playlists with Song button not working under certain conditions

    [Bug] View Playlists with Song button not working under certain conditions

    When I click the VPWS button to view a song, then bring up any other page except a new Song Page, then click on the VPWS button again for the same song, I am not redirected to the Song Page and nothing happens. This is due to a check on line 263 that leads the code to believe it is currently displaying the SongPage for the song you last viewed, and to avoid rendering issues, does not attempt to reopen that page.

    bug 
    opened by elijaholmos 0
  • [Bug] Loading notification can create an illusion of successful initialization

    [Bug] Loading notification can create an illusion of successful initialization

    Not necessarily a bug per se, but each blue loading notification that appears while VPWS is initializing only lasts for 2-3 seconds before it fades away. Given how the percents are calculated and when the notifications are fired, this may mean that a notification appears with a status, say 78%, then fades away with no notification to follow it for several seconds. As a user, this can be confusing.

    Requirements: -Make each notification displayed during the setup process last until the next notification is ready to be displayed

    Solution Brainstorm: -When a new notification is displayed, create a setTimeout to keep displaying that notification with the exact same text that loops every 2-3 seconds. When the next notification is ready to be displayed, cancel the previous setTimeout and create a new timeout for the next notification. Repeat this process until 100% is achieved.

    BONUS: Add a way to display initialization errors to the user, in the event that one is encountered. Example of an error could include an incompatible version of Spicetify; see #5

    bug 
    opened by elijaholmos 0
  • New feature - implement disabled status on button

    New feature - implement disabled status on button

    In the next version of Spicetify there will be an option to toggle the enabled/disabled status of ContextMenu Items. See https://github.com/khanhas/spicetify-cli/issues/520

    Once this is released, implement a feature where the VPWS button appears during the setup phase but cannot be clicked until the setup phase is complete and the user's entire library has been documented.

    enhancement 
    opened by elijaholmos 0
  • Include the ability to view playlists with a certain artist

    Include the ability to view playlists with a certain artist

    As a user, I would like the ability to right-click on an artist and select a button that says "View Playlists with Artist". I would then be redirected to a page that displays the artist info and the number of playlists that contain this artist, a grid of playlists containing the artist, and the number of times the artist appears in each playlist

    enhancement 
    opened by elijaholmos 0
Releases(v1.1.0)
  • v1.1.0(May 15, 2021)

    Now that Spicetify v2 is stable, I will be reworking this extension to ensure compatibility with the new Spotify UI. The next release for this extension will be v2.x.x, and this current release is the last one that will be compatible with Spicetify 1.2.1.

    There is only one major front-facing change that comes with this release:

    Bug fix:

    • A semi-rare condition with the VPWS button would not do anything when it was clicked

    Estimated timeframe for v2 of this extension: I'd say roughly a month. I have other projects I'm working on, but in a week or two I will take some time to sit down and look at the new code for Spicetify v2 and begin updating this extension

    Edit: add "maybe" to the title reasoning - a lot of people are still opting to use Legacy Spotify/Spicetify over the xpui and spicetify v2. I personally prefer the older spotify UI and, since the majority seem to be sticking with legacy spotify, I may continue to release updates for the legacy version of this extension. leave your thoughts if you have an opinion.

    Source code(tar.gz)
    Source code(zip)
  • v1.0.0(Apr 21, 2021)

Owner
Unofficial Spotify utilities
null
A CLI to add and remove local development environments and create HTTPS certificates for them.

A CLI used to create a local https dev environment with the green lock. Setup takes less than 5 minutes and all of your projects will be running locally over HTTPS with custom domain names in no time!

Entrostat (Pty) Ltd 5 Sep 19, 2022
LinkFree CLI is a command line tool that helps you to create your LinkFree profile through CLI.

LinkFree CLI LinkFree CLI is a command line tool that helps you to create your LinkFree profile through CLI. Demo Using the CLI (Commands) Note First

Pradumna Saraf 32 Dec 26, 2022
Truncate a string to a specific width in the terminal

cli-truncate Truncate a string to a specific width in the terminal Gracefully handles ANSI escapes. Like a string styled with chalk. It also supports

Sindre Sorhus 78 Oct 10, 2022
Pretty diff to html javascript cli (diff2html-cli)

diff2html-cli Diff to Html generates pretty HTML diffs from unified and git diff output in your terminal Table of Contents Features Online Example Dis

Rodrigo Fernandes 404 Dec 19, 2022
This action sets up Supabase CLI on GitHub's hosted Actions runners.

⚙️ Supabase CLI Action About This action sets up the Supabase CLI, supabase, on GitHub's hosted Actions runners. This action can be run on ubuntu-late

Supabase 26 Jan 5, 2023
Test your internet connection speed and ping using speedtest.net from the CLI

speed-test Test your internet connection speed and ping using speedtest.net from the CLI Install Ensure you have Node.js version 8+ installed. Then ru

Sindre Sorhus 3.8k Jan 7, 2023
HMSC (How Much Stuffs CLI) analyst for your files and folders

HMSC ?? About HMSC (How Much Stuffs CLI) analyst for your files and folders ?? Screenshot ?? Requirements Node.js NPM ?? Installation $ npm i -g hmsc

Abdullah Veliyev 26 Jan 10, 2022
A C++ based command-line (CLI) program that lets you manage your tasks

COMMAND LINE INTERFACE TODO APP a command-line (CLI) program that lets you manage your tasks. The specification for this project is written down as te

Rahul Prabhakar 1 Dec 25, 2021
DataENV is a cli tool that allows you to save data temporarily using your terminal.

DataEnv CLI Instllation npm install -g dataenv Usage Table of Contents LocalStorage npx dataenv save Parameters npx dataenv show Parameters npx dataen

PGamerX 2 Feb 5, 2022
Fresko - A configurable cli that keeps your project deps fresh

?? Fresko (fresh in Basque) A configurable cli that keeps your project deps fresh Why? Have you ever pulled someone else's code into your local enviro

Quentin Hello 9 Nov 21, 2022
Google Chrome extension which randomly generates a customisable 3D bamboo forest in your new tab

Bamboo-New-Tab bamboo-new-tab-demo.mp4 bamboo-new-tab-options-demo.mp4 Try it out Hosted version: https://conwayjw97.github.io/Bamboo-New-Tab/ To run

James 15 Nov 16, 2021
Infinite Red's cutting edge React Native project boilerplate, along with a CLI, component/model generators, and more!

Ignite - the hottest React Native boilerplate Battle-tested React Native boilerplate The culmination of five years of constant React Native developmen

Infinite Red, Inc. 14.7k Dec 29, 2022
CLI tool for running Yeoman generators

yo What's Yeoman? Yeoman helps you to kickstart new projects, prescribing best practices and tools to help you stay productive. To do so, we provide a

Yeoman 3.6k Dec 30, 2022
Distributed, realtime CLI for live Node apps.

Vantage = CLI + SSH + REPL for your live node app. In one line: require("vantage")().listen(4000); What just happened? That's voodoo magic: show me th

dc 3.5k Dec 30, 2022
download torrents with node from the CLI

torrent Download torrents from the command line usage torrent <magnet link OR path to .torrent file> Download a torrent from a magnet link to torre

Max Ogden 619 Dec 26, 2022
:white_square_button: WhatsApp chat from commandline/console/cli using GoogleChrome puppeteer

Whatspup Use Whatsapp from commandline/console/cli using GoogleChrome puppeteer! ?? Features ✅ Send and receive messages ✅ Read Receipts ✅ Switch betw

Sarfraz Ahmed 343 Dec 1, 2022
:notes: Control iTunes via CLI

itunes-remote Control iTunes via your terminal ?? Using JXA via osascript via Node.js. Requirements Node.js (v0.12.7 or greater) Mac OS X (Yosemite 10

Michael Kühnel 422 Nov 19, 2022
Add stdin support to any CLI app that accepts file input

tmpin Add stdin support to any CLI app that accepts file input It pipes stdin to a temp file and spawns the chosen app with the temp file path as the

Sindre Sorhus 121 Oct 3, 2022