mza921 / Plex-Auto-Collections

Python 3 script to automatically update Plex collections based off a configuration file
312 stars 29 forks source link

plex_search and tmdb_actor not working #172

Open mza921 opened 3 years ago

mza921 commented 3 years ago

Not sure if this is related to the same issue or should be in it's own thread, but I'm also having issues with TV shows for tmdb_actor and plex_search. Here are examples:

tmdb_actor says it only works for movies, adds nothing to collection

 Updating collection: Anthony Bourdain...
| Sync Mode: append
| Config Error: tmdb_actor attribute only works for movie libraries
|
| poster not found at: B:\Plex TV Shows Metadata\Anthony Bourdain.*
| poster not found at: B:\Plex Collections Metadata\Anthony Bourdain\poster.*
| background not found at: B:\Plex Collections Metadata\Anthony Bourdain\background.*

plex_search for actor says it only works for movies, adds ALL TV shows to the collection.

Updating collection: Anthony Bourdain...
| Sync Mode: append
| Config Error: actor plex search attribute only works for movie libraries

| Anthony Bourdain Collection | + | 30 for 30
| Anthony Bourdain Collection | + | 30 Rock
| Anthony Bourdain Collection | + | 90 Day Fiancé
| Anthony Bourdain Collection | + | 90 Day Fiancé: Happily Ever After?
| Anthony Bourdain Collection | + | Aaahh!!! Real Monsters
| Anthony Bourdain Collection | + | The Addams Family
| Anthony Bourdain Collection | + | The Adventures of Rocky and Bullwinkle
| Anthony Bourdain Collection | + | All in the Family
| Anthony Bourdain Collection | + | American Crime Story
| Anthony Bourdain Collection | + | American Horror Story
| Anthony Bourdain Collection | + | The Americans (2013)
| Anthony Bourdain Collection | + | The Angry Beavers
| Anthony Bourdain Collection | = | Anthony Bourdain: No Reservations
| Anthony Bourdain Collection | = | Anthony Bourdain: Parts Unknown
| Anthony Bourdain Collection | + | Archie Bunker's Place
| Anthony Bourdain Collection | + | Arrested Development
| Anthony Bourdain Collection | + | Arrow
| Anthony Bourdain Collection | + | Atlanta
| Anthony Bourdain Collection | + | Autopsy: The Last Hours Of...
| Anthony Bourdain Collection | + | Awkwafina Is Nora From Queens
| Anthony Bourdain Collection | + | Band of Brothers
| Anthony Bourdain Collection | + | Barry
| Anthony Bourdain Collection | + | Baskets
| Anthony Bourdain Collection | + | Beavis and Butt-Head
| Anthony Bourdain Collection | + | Beetlejuice
| Anthony Bourdain Collection | + | Better Call Saul
| Anthony Bourdain Collection | + | Better Things
| Anthony Bourdain Collection | + | Bewitched
| Anthony Bourdain Collection | + | Big Little Lies
| Anthony Bourdain Collection | + | Billions
| Anthony Bourdain Collection | + | Black Lightning
| Anthony Bourdain Collection | + | Black Mirror
| Anthony Bourdain Collection | + | Boardwalk Empire
| Anthony Bourdain Collection | + | Bob's Burgers
| Anthony Bourdain Collection | + | Bobby's World
| Anthony Bourdain Collection | + | BoJack Horseman
| Anthony Bourdain Collection | + | Breaking Bad
| Anthony Bourdain Collection | + | Bridgerton
| Anthony Bourdain Collection | + | Broad City
| Anthony Bourdain Collection | + | The Case Against Adnan Syed
| Anthony Bourdain Collection | + | CatDog
| Anthony Bourdain Collection | + | Central Park
| Anthony Bourdain Collection | + | Chernobyl
| Anthony Bourdain Collection | + | Clarissa Explains It All
| Anthony Bourdain Collection | + | The Cleveland Show
| Anthony Bourdain Collection | + | Cobra Kai
| Anthony Bourdain Collection | + | Columbo
| Anthony Bourdain Collection | + | Comedians in Cars Getting Coffee
| Anthony Bourdain Collection | + | The Comey Rule
| Anthony Bourdain Collection | = | A Cook's Tour
| Anthony Bourdain Collection | + | Crashing (2017)
| Anthony Bourdain Collection | + | Crazy Ex-Girlfriend
| Anthony Bourdain Collection | + | Curb Your Enthusiasm
| Anthony Bourdain Collection | + | The Curse of Oak Island
| Anthony Bourdain Collection | + | Da Ali G Show
| Anthony Bourdain Collection | + | Dead to Me
| Anthony Bourdain Collection | + | The Defiant Ones
| Anthony Bourdain Collection | + | The Deuce
| Anthony Bourdain Collection | + | Dexter
| Anthony Bourdain Collection | + | Dispatches from Elsewhere
| Anthony Bourdain Collection | + | Divorce (2016)
| Anthony Bourdain Collection | + | Doug
| Anthony Bourdain Collection | + | Dragon Ball Super
| Anthony Bourdain Collection | + | Eastbound & Down
| Anthony Bourdain Collection | + | Emily in Paris
| Anthony Bourdain Collection | + | Enslaved
| Anthony Bourdain Collection | + | Entourage
| Anthony Bourdain Collection | + | Escape at Dannemora
| Anthony Bourdain Collection | + | Family Guy
| Anthony Bourdain Collection | + | Family Matters
| Anthony Bourdain Collection | + | Fargo
| Anthony Bourdain Collection | + | Fear the Walking Dead
| Anthony Bourdain Collection | + | Fernando
| Anthony Bourdain Collection | + | The Flash (2014)
| Anthony Bourdain Collection | + | The Flight Attendant
| Anthony Bourdain Collection | + | The Flintstones
| Anthony Bourdain Collection | + | Formula 1: Drive to Survive
| Anthony Bourdain Collection | + | Freaks and Geeks
| Anthony Bourdain Collection | + | The Fresh Prince of Bel-Air
| Anthony Bourdain Collection | + | Friends
| Anthony Bourdain Collection | + | Full House
| Anthony Bourdain Collection | + | Futurama
| Anthony Bourdain Collection | + | Game of Thrones
| Anthony Bourdain Collection | + | Genius (2017)
| Anthony Bourdain Collection | + | Gotham
| Anthony Bourdain Collection | + | Grace and Frankie
| Anthony Bourdain Collection | + | The Grand Tour (2016)
| Anthony Bourdain Collection | + | Great News
| Anthony Bourdain Collection | + | The Great North
| Anthony Bourdain Collection | + | The Handmaid's Tale
| Anthony Bourdain Collection | + | Happy Days
| Anthony Bourdain Collection | + | The Haunting
| Anthony Bourdain Collection | + | Heroes
| Anthony Bourdain Collection | + | Hey Arnold!
| Anthony Bourdain Collection | + | Hey Dude
| Anthony Bourdain Collection | + | Home Improvement
| Anthony Bourdain Collection | + | Homeland
| Anthony Bourdain Collection | + | The Honeymooners
| Anthony Bourdain Collection | + | Horace and Pete
| Anthony Bourdain Collection | + | House of Cards (US)
| Anthony Bourdain Collection | + | Hunters (2020)
| Anthony Bourdain Collection | + | I Dream of Jeannie
| Anthony Bourdain Collection | + | I Love Lucy
| Anthony Bourdain Collection | + | Inspector Gadget
| Anthony Bourdain Collection | + | It's Always Sunny in Philadelphia
| Anthony Bourdain Collection | + | Jane the Virgin
| Anthony Bourdain Collection | + | The Jeffersons
| Anthony Bourdain Collection | + | The Jetsons
| Anthony Bourdain Collection | + | The Jinx: The Life and Deaths of Robert Durst
| Anthony Bourdain Collection | + | Kidding
| Anthony Bourdain Collection | + | Killing Eve
| Anthony Bourdain Collection | + | The Larry Sanders Show
| Anthony Bourdain Collection | + | The Last Dance
| Anthony Bourdain Collection | + | The Last O.G.
| Anthony Bourdain Collection | + | Last Week Tonight with John Oliver
| Anthony Bourdain Collection | + | Laverne & Shirley
| Anthony Bourdain Collection | + | Law & Order
| Anthony Bourdain Collection | + | Law & Order: Special Victims Unit
| Anthony Bourdain Collection | + | Law & Order: True Crime
| Anthony Bourdain Collection | = | The Layover
| Anthony Bourdain Collection | + | The Leftovers
| Anthony Bourdain Collection | + | Looney Tunes
| Anthony Bourdain Collection | + | Looney Tunes Cartoons
| Anthony Bourdain Collection | + | The Looney Tunes Show
| Anthony Bourdain Collection | + | The Loudest Voice
| Anthony Bourdain Collection | + | Louie (2010)
| Anthony Bourdain Collection | + | Love & Hip Hop New York
| Anthony Bourdain Collection | + | Lovecraft Country
| Anthony Bourdain Collection | + | Lucifer
| Anthony Bourdain Collection | + | Lucky Louie
| Anthony Bourdain Collection | + | Mad Men
| Anthony Bourdain Collection | + | Making a Murderer
| Anthony Bourdain Collection | + | Making It
| Anthony Bourdain Collection | + | The Man in the High Castle
| Anthony Bourdain Collection | + | The Mandalorian
| Anthony Bourdain Collection | + | Maniac (2018)
| Anthony Bourdain Collection | + | Marvel's Agents of S.H.I.E.L.D.
| Anthony Bourdain Collection | + | Marvel's Cloak & Dagger
| Anthony Bourdain Collection | + | Marvel's Daredevil
| Anthony Bourdain Collection | + | Marvel's Jessica Jones
| Anthony Bourdain Collection | + | Marvel's Runaways
| Anthony Bourdain Collection | + | The Marvelous Mrs. Maisel
| Anthony Bourdain Collection | + | The Mary Tyler Moore Show
| Anthony Bourdain Collection | + | Master of None
| Anthony Bourdain Collection | + | Max Verstappen: Whatever It Takes
| Anthony Bourdain Collection | + | MINDHUNTER
| Anthony Bourdain Collection | + | Mister Rogers' Neighborhood
| Anthony Bourdain Collection | + | Mork & Mindy
| Anthony Bourdain Collection | + | The Morning Show
| Anthony Bourdain Collection | + | Mr. Robot
| Anthony Bourdain Collection | + | The Munsters
| Anthony Bourdain Collection | + | The Murder of Laci Peterson
| Anthony Bourdain Collection | + | Mythic Quest: Raven's Banquet
| Anthony Bourdain Collection | + | Narcos
| Anthony Bourdain Collection | + | The New Yankee Workshop
| Anthony Bourdain Collection | + | The Newsroom (2012)
| Anthony Bourdain Collection | + | The Night Of
| Anthony Bourdain Collection | + | The Office
| Anthony Bourdain Collection | + | The Office (US)
| Anthony Bourdain Collection | + | One Strange Rock
| Anthony Bourdain Collection | + | Orange Is the New Black
| Anthony Bourdain Collection | + | Oz
| Anthony Bourdain Collection | + | Ozark
| Anthony Bourdain Collection | + | Parks and Recreation
| Anthony Bourdain Collection | + | The Pink Panther
| Anthony Bourdain Collection | + | Popeye
| Anthony Bourdain Collection | + | The Queen's Gambit
| Anthony Bourdain Collection | + | Ramy
| Anthony Bourdain Collection | + | Ratched
| Anthony Bourdain Collection | + | The Real Ghostbusters
| Anthony Bourdain Collection | + | The Ren and Stimpy Show
| Anthony Bourdain Collection | + | The Richard Pryor Show
| Anthony Bourdain Collection | + | Rick and Morty
| Anthony Bourdain Collection | + | The Righteous Gemstones
| Anthony Bourdain Collection | + | Riverdale
| Anthony Bourdain Collection | + | Rocko's Modern Life
| Anthony Bourdain Collection | + | The Rocky and Bullwinkle Show
| Anthony Bourdain Collection | + | Rugrats
| Anthony Bourdain Collection | + | Salute Your Shorts
| Anthony Bourdain Collection | + | Santa Clarita Diet
| Anthony Bourdain Collection | + | Schitt's Creek
| Anthony Bourdain Collection | + | The Scooby-Doo Show
| Anthony Bourdain Collection | + | Scooby-Doo, Where Are You!
| Anthony Bourdain Collection | + | See
| Anthony Bourdain Collection | + | Seinfeld
| Anthony Bourdain Collection | + | Shameless (US)
| Anthony Bourdain Collection | + | Shark Tank
| Anthony Bourdain Collection | + | Sharp Objects
| Anthony Bourdain Collection | + | The Shield
| Anthony Bourdain Collection | + | Silicon Valley
| Anthony Bourdain Collection | + | The Simpsons
| Anthony Bourdain Collection | + | The Sinner
| Anthony Bourdain Collection | + | Sons of Anarchy
| Anthony Bourdain Collection | + | The Sopranos
| Anthony Bourdain Collection | + | South Park
| Anthony Bourdain Collection | + | SpongeBob SquarePants
| Anthony Bourdain Collection | + | Stranger Things
| Anthony Bourdain Collection | + | Succession
| Anthony Bourdain Collection | + | Supergirl
| Anthony Bourdain Collection | + | Surviving R. Kelly
| Anthony Bourdain Collection | + | Tales from the Crypt
| Anthony Bourdain Collection | + | Taxi
| Anthony Bourdain Collection | + | Ted Lasso
| Anthony Bourdain Collection | + | Teenage Mutant Ninja Turtles
| Anthony Bourdain Collection | + | This Old House
| Anthony Bourdain Collection | + | The Three Stooges
| Anthony Bourdain Collection | + | Tom and Jerry
| Anthony Bourdain Collection | + | True Blood
| Anthony Bourdain Collection | + | True Detective
| Anthony Bourdain Collection | + | The Twilight Zone
| Anthony Bourdain Collection | + | The Twilight Zone (2019)
| Anthony Bourdain Collection | + | Twin Peaks
| Anthony Bourdain Collection | + | Unbreakable Kimmy Schmidt
| Anthony Bourdain Collection | + | Undeclared
| Anthony Bourdain Collection | + | Veep
| Anthony Bourdain Collection | + | Vice Principals
| Anthony Bourdain Collection | + | The Walking Dead
| Anthony Bourdain Collection | + | Watchmen
| Anthony Bourdain Collection | + | Weeds
| Anthony Bourdain Collection | + | The West Wing
| Anthony Bourdain Collection | + | Westworld
| Anthony Bourdain Collection | + | The Wire
| Anthony Bourdain Collection | + | Workaholics
| Anthony Bourdain Collection | + | Yellowstone (2018)
| Anthony Bourdain Collection | + | Your Honor (US)
| Anthony Bourdain Collection | + | The Zen Diaries of Garry Shandling
| Processed 226 Shows
|
| poster not found at: B:\Plex TV Shows Metadata\Anthony Bourdain.*
| poster not found at: B:\Plex Collections Metadata\Anthony Bourdain\poster.*
| background not found at: B:\Plex Collections Metadata\Anthony Bourdain\background.*

Originally posted by @ramair02 in https://github.com/mza921/Plex-Auto-Collections/issues/170#issuecomment-756947902

ramair02 commented 3 years ago

Here is the config. Thanks!

config.yml.ramair02.yml.zip

mza921 commented 3 years ago

Can you paste the markdown? Surround your text with three backticks ``` before and after.

ramair02 commented 3 years ago

Yep, no problem. Here you go:

collections:
  IMDb Top 250:
    trakt_list: https://trakt.tv/users/justin/lists/imdb-top-rated-tv-shows?sort=rank,asc
    sync_mode: sync
    collection_mode: show_items
    sort_title: "*001"
  Most Popular TV (30 days):
    sync_mode: sync
    collection_mode: show_items
    tautulli:
      list_type: popular
      list_days: 30
      list_size: 10
    sort_title: "*002"
  Marvel Cinematic Universe:
    trakt_list: https://trakt.tv/users/donxy/lists/marvel-cinematic-universe?sort=rank,asc
    sort_title: "*040"
    file_poster: B:\Plex TV Shows Metadata\Marvel Television.png
  DC Extended Universe:
    trakt_list: https://trakt.tv/users/donxy/lists/dc-extended-universe?sort=rank,asc
    sort_title: "*045"
  Documentaries:
    tmdb_discover:
      with_genres: 99
    all: true
    filters:
      genre: Documentary
    collection_order: alpha
    sort_title: "*050"
  ABC:
    tmdb_network: 2
    sort_title: "*100"
  Amazon:
    tmdb_network: 1024
    sort_title: "*110"
  AMC:
    tmdb_network: 174
    sort_title: "*120"
  Apple TV+:
    tmdb_network: 2552
    sort_title: "*130"
  CBS:
    tmdb_network: 16, 1709
    sort_title: "*140"
  Comedy Central:
    tmdb_network: 47
    sort_title: "*150"
  The CW:
    tmdb_network: 71
    sort_title: "*160"
  Disney+:
    tmdb_network: 2739
    sort_title: "*170"
  FOX:
    tmdb_network: 19
    sort_title: "*180"
  FX:
    tmdb_network: 88
    sort_title: "*190"
  HBO:
    tmdb_network: 49, 3186
    sort_title: "*200"
  Hulu:
    tmdb_network: 453
    sort_title: "*210"
  NBC:
    tmdb_network: 6
    sort_title: "*220"
  Netflix:
    tmdb_network: 213
    sort_title: "*230"
  Nick:
    tmdb_network: 13, 224, 35
    sort_title: "*240"
  Showtime:
    tmdb_network: 67
    sort_title: "*250"
  Kids Cartoons:
    trakt_list:
      - https://trakt.tv/users/kylesheila/lists/kids-cartoons?sort=title,asc
      - https://trakt.tv/users/ondrisel/lists/classic-cartoons?sort=rank,asc
    collection_order: alpha
  Anthony Bourdain:
    all: true
    filters:
      actor: Anthony Bourdain
    tmdb_biography: 1223677
plex:
  library: TV Shows
  library_type: show
  token: xxx
  url: http://10.0.0.25:32400
  sync_mode: append
sonarr:
  url: http://10.0.0.25:38082
  token: xxx
  quality_profile_id: 6
  root_folder_path: K:\TV Shows
  search_movie: false
  version: v3
  add_to_radarr: false
  add_movie: false
tmdb:
  apikey: xxx
  language: en
tautulli:
  url: http://10.0.0.25:8181
  apikey: xxx
trakt:
  client_id: xxx
  client_secret: xxx
  auto_refresh_token: false
  # Below is filled in automatically when the script is run
  authorization:
    access_token: xxx
    token_type: Bearer
    expires_in: 7889237
    refresh_token: xxx
    scope: public
    created_at: 1607374600
image_server:
  poster_directory: B:\Plex TV Shows Metadata
  background_directory: ../config/backgrounds
  image_directory: B:\Plex Collections Metadata
ramair02 commented 3 years ago

Sorry, just realized I had made some changes to get it to work (using filters). The issues I had were with the Anthony Bourdain Collection and it was structured as:

collections:
  Anthony Bourdain:
    tmdb_actor: 1223677

and

collections:
  Anthony Bourdain:
    plex_search:
      actor: Anthony Bourdain

and

collections:
  Anthony Bourdain:
    actor: Anthony Bourdain

per the Wiki

mza921 commented 3 years ago

These all won't work with a TV library. I'll have to update the README since, while the table shows it's not supported, there's a section that incorrectly says it is supported. I'll also have to look into why it proceeds to add every TV show instead of just failing for plex_search.

ramair02 commented 3 years ago

These all won't work with a TV library. I'll have to update the README since, while the table shows it's not supported, there's a section that incorrectly says it is supported. I'll also have to look into why it proceeds to add every TV show instead of just failing for plex_search.

Understood and thank you.