JBOPS/utility/remove_movie_collections.py
2019-10-27 15:59:14 -07:00

23 lines
501 B
Python

#!/usr/bin/env python
# -*- coding: utf-8 -*-
#
# Description: Removes ALL collections from ALL movies.
# Author: /u/SwiftPanda16
# Requires: plexapi
from plexapi.server import PlexServer
### EDIT SETTINGS ###
PLEX_URL = "http://localhost:32400"
PLEX_TOKEN = "xxxxxxxxxx"
MOVIE_LIBRARY_NAME = "Movies"
## CODE BELOW ##
plex = PlexServer(PLEX_URL, PLEX_TOKEN)
for movie in plex.library.section(MOVIE_LIBRARY_NAME).all():
movie.removeCollection([c.tag for c in movie.collections])