Skip to content

How to automatically delete playlists

croneter edited this page Dec 23, 2018 · 19 revisions

How to delete all playlists from both Plex and Kodi

If you've been testing PKC thoroughly, it's possible that you unintentionally put PKC in a state where it kept spawning playlists on both the Plex and Kodi side. Using Plex Web, you'll see potentially hundreds to thousands of playlists listed, all of them ending in a digit like _15.

Step-by-step guide

  1. Quit ALL Kodi instances that have PKC up and running
  2. On every Kodi instance, delete the Database folder in the Kodi userdata folder. Also do this for all the Kodi profiles in the profiles folder, if you're using different Kodi users
  3. Using Plex Web, navigate to a single movie or show's information page. Hit the three dots ... at the top right, then Show Information, then Show XML-file. A new browser window opens
  4. The URL of the new browser window will be something like this:
https://82-123-96-251.7923ljfse892382.plex.direct:34698/library/metadata/12345?checkFiles=1&includeExtras=1&includeBandwidths=1&X-Plex-Token=alkjb84klafj83

For the script below, you'll need to copy-paste the following information: a. PMS address: in the example above, https://82-123-96-251.7923ljfse892382.plex.direct b. PMS port: in the example above, 34698 c. X-Plex-Token: the string directly after the =, in the example above alkjb84klafj83

Here is a Python script that will automatically delete these playlists from the PMS.