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
from plexapi.server import PlexServer | |
def duplicate_guids(library, libtype=None): | |
for item in library.all(libtype): | |
guid_map = { | |
'imdb': [], | |
'tmdb': [], | |
'tvdb': [], | |
} |
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: Saves poster images from Plex to same folder as the media files. | |
Author: /u/SwiftPanda16 | |
Requires: plexapi, tqdm (optional) | |
Usage: | |
* Save posters for an entire library: | |
python save_posters.py --library "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: Selects the default TMDB poster if no poster is selected | |
or the current poster is from Gracenote. | |
Author: /u/SwiftPanda16 | |
Requires: plexapi | |
Usage: | |
* Change the posters for an entire library: |
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: Creates a Plex smart playlist with random episodes from multiple TV shows | |
while keeping the episodes in order for each show. | |
Author: /u/SwiftPanda16 | |
Requires: plexapi | |
''' |
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: Downloads all photo thumbnails recursively for a photo album in Plex. | |
Author: /u/SwiftPanda16 | |
Requires: plexapi | |
''' | |
import os |
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: Creates a Plex playlist with random episodes from multiple TV shows | |
while keeping the episodes in order for each show. | |
Author: /u/SwiftPanda16 | |
Requires: plexapi | |
''' |
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
import json | |
import requests | |
from plexapi.server import PlexServer | |
PLEX_URL = 'http://localhost:32400' | |
PLEX_TOKEN = 'XXXXXXXXXXXXXXXXXXXX' | |
TVSHOW_LIBRARY = 'TV Shows' | |
TMDB_TOKEN = '' |
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
import argparse | |
import os | |
from plexapi.server import PlexServer | |
PLEX_URL = os.getenv('PLEX_URL') | |
PLEX_TOKEN = os.getenv('PLEX_TOKEN') | |
if __name__ == "__main__": | |
parser = argparse.ArgumentParser() | |
parser.add_argument('--rating_key', required=True, type=int) |
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
from plexapi.server import PlexServer | |
plex = PlexServer('http://localhost:32400', token='XXXXXXXXXXXXXXXXXXXX') | |
tvshows = plex.library.section('TV Shows') | |
show = tvshows.get('Dragon Ball') | |
# Get season 2 | |
season = show.season(2) | |
# Lock all the season 2 episode metadata |
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
// ==UserScript== | |
// @name Open Plex Serach Page on Enter | |
// @namespace https://app.plex.tv | |
// @version 1.1 | |
// @description Open the Plex search page when pressing enter in the search box. | |
// @author JonnyWong16 | |
// @homepage https://gist.github.com/JonnyWong16/1ebd38a5f5872408e5b840ed28006dec | |
// @downloadURL https://gist.github.com/JonnyWong16/1ebd38a5f5872408e5b840ed28006dec/raw/openPlexSearch.user.js | |
// @updateURL https://gist.github.com/JonnyWong16/1ebd38a5f5872408e5b840ed28006dec/raw/openPlexSearch.user.js | |
// @match https://app.plex.tv/* |
NewerOlder