Last active
October 20, 2023 22:34
-
-
Save JonnyWong16/34878448ab45dfffffa930f5cf8c252a to your computer and use it in GitHub Desktop.
Removes ALL collections from ALL movies.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/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]) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment