Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

yml .plexmatch file misread as xml during showQueueRefresh (Warning in logs) #10509

Closed
simonc56 opened this issue Apr 19, 2022 · 3 comments
Closed

Comments

@simonc56
Copy link
Contributor

Describe the bug
During each show queue refresh, Medusa tries to parse the yml file .plexmatch as a xml file and raises a 'invalid XML' warning.

To Reproduce

  1. Enable Plex show metadata (feature addd in Added Plex metadata provider #10466) in Postprocessing > Metadata
  2. Add a new show
  3. Wait for a SHOWQUEUE-REFRESH or Force full update the show
  4. See Warning in logs

Expected behavior
No warning in log because this Plex metadata file is not a XML file.

Medusa :

  • OS: docker on LibreElec arm64
  • Branch: linuxserver container 0.5.29
  • Python version: 3.9.7
  • Database version: 44.19

Debug logs :

2022-04-19 11:17:59 DEBUG    SHOWQUEUE-UPDATE :: [] User-Agent: Medusa/0.5.29 (Linux; 3.14.29; dd2a7688-bfbc-11ec-8b0a-0242ac110002)
2022-04-19 11:17:59 DEBUG    SHOWQUEUE-UPDATE :: [] Configured language en override show language of en
2022-04-19 11:17:59 DEBUG    SHOWQUEUE-UPDATE :: [] Getting all series data for 84773
2022-04-19 11:17:59 DEBUG    SHOWQUEUE-UPDATE :: [] Getting all show data for 84773
2022-04-19 11:17:59 DEBUG    SHOWQUEUE-UPDATE :: [] GET URL: https://api.themoviedb.org/3/tv/84773?language=en&append_to_response=content_ratings%2Cexternal_ids&api_key=edc5f123313769de83a71e157758030b [Status: 200]
2022-04-19 11:17:59 DEBUG    SHOWQUEUE-UPDATE :: [] User-Agent: Medusa/0.5.29 (Linux; 3.14.29; dd2a7688-bfbc-11ec-8b0a-0242ac110002)
2022-04-19 11:17:59 DEBUG    SHOWQUEUE-UPDATE :: [] Getting all episodes of 84773
2022-04-19 11:17:59 DEBUG    SHOWQUEUE-UPDATE :: [] GET URL: https://api.themoviedb.org/3/tv/84773/season/1?language=en&api_key=edc5f123313769de83a71e157758030b [Status: 200]
2022-04-19 11:17:59 DEBUG    SHOWQUEUE-UPDATE :: [] User-Agent: Medusa/0.5.29 (Linux; 3.14.29; dd2a7688-bfbc-11ec-8b0a-0242ac110002)
2022-04-19 11:17:59 DEBUG    SHOWQUEUE-UPDATE :: [] Getting show banners for 84773
2022-04-19 11:17:59 DEBUG    SHOWQUEUE-UPDATE :: [] GET URL: https://api.themoviedb.org/3/tv/84773/images?params=include_image_language&api_key=edc5f123313769de83a71e157758030b [Status: 200]
2022-04-19 11:17:59 DEBUG    SHOWQUEUE-UPDATE :: [] User-Agent: Medusa/0.5.29 (Linux; 3.14.29; dd2a7688-bfbc-11ec-8b0a-0242ac110002)
2022-04-19 11:17:59 DEBUG    SHOWQUEUE-UPDATE :: [] Adding base url for image: /8UDCNbHrMNEqnNSybdbykp2Xtsi.jpg
...
2022-04-19 11:18:00 DEBUG    SHOWQUEUE-UPDATE :: [] Adding base url for image: /oBZ7pJ7hEpGHpNOutnjNJhwUCn2.jpg
2022-04-19 11:18:00 DEBUG    SHOWQUEUE-UPDATE :: [] No banners found for 84773
2022-04-19 11:18:00 DEBUG    SHOWQUEUE-UPDATE :: [] Found 9 fanarts at 300x169 (1) resolution for series 84773
...
2022-04-19 11:18:00 DEBUG    SHOWQUEUE-UPDATE :: [] Found 3 fanarts at 2560x1440 (5) resolution for series 84773
2022-04-19 11:18:00 DEBUG    SHOWQUEUE-UPDATE :: [] Found 36 total fanarts for series 84773
2022-04-19 11:18:00 DEBUG    SHOWQUEUE-UPDATE :: [] Fanart threshold set to 3.0924621740221365 votes
2022-04-19 11:18:00 DEBUG    SHOWQUEUE-UPDATE :: [] Weighted fanart results for series 84773:     Score     Rating  Votes      Resolution	URL     4.774      5.388      4       3840x2160	http://image.tmdb.org/t/p/original/uVukvj5r9jEMva78IfaGWMNwGe.jpg     4.660      4.982      4       3840x2160	http://image.tmdb.org/t/p/original/6sUZlK63ij3dHiwOiCVdr7f1Rek.jpg     3.591      5.312      1       2560x1440	http://image.tmdb.org/t/p/original/rQJzXxEburKVlNj30JdxYsr13JF.jpg     3.591      5.312      1       2560x1440	http://image.tmdb.org/t/p/original/zjcYRyYarEgNO6B1JyKmn5S2Pyd.jpg     3.591      5.312      1       2560x1440	http://image.tmdb.org/t/p/original/x9U4T42aCci3RWL5M9N3qTswC83.jpg     3.412      5.384      2       1920x1080	http://image.tmdb.org/t/p/original/vpc8qVhFvu0SM4USg72bHPRmOPL.jpg     3.385      5.246      2       1920x1080	http://image.tmdb.org/t/p/original/jN2Zmb5FlXELc9BWMiDb9t3ThuE.jpg     3.074      5.172      1       1920x1080	http://image.tmdb.org/t/p/original/9YeS5NQNN6X8CZoZAhcZOOaB3UP.jpg     2.585      0.000      0       1920x1080	http://image.tmdb.org/t/p/original/oBZ7pJ7hEpGHpNOutnjNJhwUCn2.jpg     2.085      0.000      0        1280x720	http://image.tmdb.org/t/p/w1280/oBZ7pJ7hEpGHpNOutnjNJhwUCn2.jpg     1.942      0.000      1        1280x720	http://image.tmdb.org/t/p/w1280/rQJzXxEburKVlNj30JdxYsr13JF.jpg     1.942      0.000      1        1280x720	http://image.tmdb.org/t/p/w1280/zjcYRyYarEgNO6B1JyKmn5S2Pyd.jpg     1.942      0.000      1        1280x720	http://image.tmdb.org/t/p/w1280/x9U4T42aCci3RWL5M9N3qTswC83.jpg     1.942      0.000      1        1280x720	http://image.tmdb.org/t/p/w1280/9YeS5NQNN6X8CZoZAhcZOOaB3UP.jpg     1.855      0.000      2        1280x720	http://image.tmdb.org/t/p/w1280/vpc8qVhFvu0SM4USg72bHPRmOPL.jpg     1.855      0.000      2        1280x720	http://image.tmdb.org/t/p/w1280/jN2Zmb5FlXELc9BWMiDb9t3ThuE.jpg     1.755      0.000      4        1280x720	http://image.tmdb.org/t/p/w1280/uVukvj5r9jEMva78IfaGWMNwGe.jpg     1.755      0.000      4        1280x720	http://image.tmdb.org/t/p/w1280/6sUZlK63ij3dHiwOiCVdr7f1Rek.jpg     1.585      0.000      0         780x439	http://image.tmdb.org/t/p/w780/oBZ7pJ7hEpGHpNOutnjNJhwUCn2.jpg     1.442      0.000      1         780x439	http://image.tmdb.org/t/p/w780/rQJzXxEburKVlNj30JdxYsr13JF.jpg     1.442      0.000      1         780x439	http://image.tmdb.org/t/p/w780/zjcYRyYarEgNO6B1JyKmn5S2Pyd.jpg     1.442      0.000      1         780x439	http://image.tmdb.org/t/p/w780/x9U4T42aCci3RWL5M9N3qTswC83.jpg     1.442      0.000      1         780x439	http://image.tmdb.org/t/p/w780/9YeS5NQNN6X8CZoZAhcZOOaB3UP.jpg     1.355      0.000      2         780x439	http://image.tmdb.org/t/p/w780/vpc8qVhFvu0SM4USg72bHPRmOPL.jpg     1.355      0.000      2         780x439	http://image.tmdb.org/t/p/w780/jN2Zmb5FlXELc9BWMiDb9t3ThuE.jpg     1.255      0.000      4         780x439	http://image.tmdb.org/t/p/w780/uVukvj5r9jEMva78IfaGWMNwGe.jpg     1.255      0.000      4         780x439	http://image.tmdb.org/t/p/w780/6sUZlK63ij3dHiwOiCVdr7f1Rek.jpg     1.085      0.000      0         300x169	http://image.tmdb.org/t/p/w300/oBZ7pJ7hEpGHpNOutnjNJhwUCn2.jpg     0.942      0.000      1         300x169	http://image.tmdb.org/t/p/w300/rQJzXxEburKVlNj30JdxYsr13JF.jpg     0.942      0.000      1         300x169	http://image.tmdb.org/t/p/w300/zjcYRyYarEgNO6B1JyKmn5S2Pyd.jpg     0.942      0.000      1         300x169	http://image.tmdb.org/t/p/w300/x9U4T42aCci3RWL5M9N3qTswC83.jpg     0.942      0.000      1         300x169	http://image.tmdb.org/t/p/w300/9YeS5NQNN6X8CZoZAhcZOOaB3UP.jpg     0.855      0.000      2         300x169	http://image.tmdb.org/t/p/w300/vpc8qVhFvu0SM4USg72bHPRmOPL.jpg     0.855      0.000      2         300x169	http://image.tmdb.org/t/p/w300/jN2Zmb5FlXELc9BWMiDb9t3ThuE.jpg     0.755      0.000      4         300x169	http://image.tmdb.org/t/p/w300/uVukvj5r9jEMva78IfaGWMNwGe.jpg     0.755      0.000      4         300x169	http://image.tmdb.org/t/p/w300/6sUZlK63ij3dHiwOiCVdr7f1Rek.jpg
2022-04-19 11:18:00 INFO     SHOWQUEUE-UPDATE :: [] Selected fanart for series 84773 (score=4.7743591227789235, score_bay=3.548718245557846, rating=5.388, votes=4, res=3840x2160): http://image.tmdb.org/t/p/original/uVukvj5r9jEMva78IfaGWMNwGe.jpg
2022-04-19 11:18:00 DEBUG    SHOWQUEUE-UPDATE :: [] Full info for best fanart for series 84773: {'bannerpath': '/uVukvj5r9jEMva78IfaGWMNwGe.jpg', '_bannerpath': 'http://image.tmdb.org/t/p/original/uVukvj5r9jEMva78IfaGWMNwGe.jpg', 'ratingcount': 4, 'rating': 5.388, 'width': 3840, 'height': 2160, 'aspect_ratio': 1.778, 'airs_time': '0:00AM', 'resolution': '3840x2160', 'res_index': 6, 'score_rated': 3.548718245557846, 'score_weighted': 4.7743591227789235}
2022-04-19 11:18:00 DEBUG    SHOWQUEUE-UPDATE :: [] Found 62 posters at 92x138 (2) resolution for series 84773
...
2022-04-19 11:18:00 DEBUG    SHOWQUEUE-UPDATE :: [] Found 1 posters at 2000x3000 (22) resolution for series 84773
2022-04-19 11:18:00 DEBUG    SHOWQUEUE-UPDATE :: [] Found 601 total posters for series 84773
2022-04-19 11:18:00 DEBUG    SHOWQUEUE-UPDATE :: [] Poster threshold set to 1.5069566809378443 votes
2022-04-19 11:18:00 INFO     SHOWQUEUE-UPDATE :: [] Selected poster for series 84773 (score=12.199598718721075, score_bay=4.399197437442151, rating=5.39, votes=6, res=1920x2880): http://image.tmdb.org/t/p/original/cLq3V06qZt3qC9iDiBmHcay10S0.jpg
2022-04-19 11:18:00 DEBUG    SHOWQUEUE-UPDATE :: [] Full info for best poster for series 84773: {'bannerpath': '/cLq3V06qZt3qC9iDiBmHcay10S0.jpg', '_bannerpath': 'http://image.tmdb.org/t/p/original/cLq3V06qZt3qC9iDiBmHcay10S0.jpg', 'ratingcount': 6, 'rating': 5.39, 'width': 1920, 'height': 2880, 'aspect_ratio': 0.667, 'airs_time': '0:00AM', 'resolution': '1920x2880', 'res_index': 20, 'score_rated': 4.399197437442151, 'score_weighted': 12.199598718721075}
2022-04-19 11:18:00 DEBUG    SHOWQUEUE-UPDATE :: [] Getting actors for 84773
2022-04-19 11:18:00 DEBUG    SHOWQUEUE-UPDATE :: [] GET URL: https://api.themoviedb.org/3/tv/84773/credits?language=en&api_key=edc5f123313769de83a71e157758030b [Status: 200]
2022-04-19 11:18:00 DEBUG    SHOWQUEUE-UPDATE :: [] User-Agent: Medusa/0.5.29 (Linux; 3.14.29; dd2a7688-bfbc-11ec-8b0a-0242ac110002)
2022-04-19 11:18:00 DEBUG    SHOWQUEUE-UPDATE :: [] Unable to retrieve image to save in /config/cache/images/tmdb/84773.banner.jpg, skipping
2022-04-19 11:18:00 DEBUG    SHOWQUEUE-UPDATE :: [] Searching for poster for series 84773
2022-04-19 11:18:00 DEBUG    SHOWQUEUE-UPDATE :: [] Fetching image from http://image.tmdb.org/t/p/original/cLq3V06qZt3qC9iDiBmHcay10S0.jpg
2022-04-19 11:18:00 DEBUG    SHOWQUEUE-UPDATE :: [] GET URL: http://image.tmdb.org/t/p/original/cLq3V06qZt3qC9iDiBmHcay10S0.jpg [Status: 200]
2022-04-19 11:18:00 DEBUG    SHOWQUEUE-UPDATE :: [] User-Agent: Medusa/0.5.29 (Linux; 3.14.29; dd2a7688-bfbc-11ec-8b0a-0242ac110002)
2022-04-19 11:18:00 DEBUG    SHOWQUEUE-UPDATE :: [] Searching for banner_thumb for series 84773
2022-04-19 11:18:00 DEBUG    SHOWQUEUE-UPDATE :: [] Unable to retrieve image to save in /config/cache/images/tmdb/thumbnails/84773.banner.jpg, skipping
2022-04-19 11:18:00 DEBUG    SHOWQUEUE-UPDATE :: [] Searching for poster_thumb for series 84773
2022-04-19 11:18:00 DEBUG    SHOWQUEUE-UPDATE :: [] Fetching image from http://image.tmdb.org/t/p/original/cLq3V06qZt3qC9iDiBmHcay10S0.jpg
2022-04-19 11:18:00 DEBUG    SHOWQUEUE-UPDATE :: [] GET URL: http://image.tmdb.org/t/p/original/cLq3V06qZt3qC9iDiBmHcay10S0.jpg [Status: 200]
2022-04-19 11:18:00 DEBUG    SHOWQUEUE-UPDATE :: [] User-Agent: Medusa/0.5.29 (Linux; 3.14.29; dd2a7688-bfbc-11ec-8b0a-0242ac110002)
2022-04-19 11:18:01 DEBUG    SHOWQUEUE-UPDATE :: [] Searching for fanart for series 84773
2022-04-19 11:18:01 DEBUG    SHOWQUEUE-UPDATE :: [] Fetching image from http://image.tmdb.org/t/p/original/uVukvj5r9jEMva78IfaGWMNwGe.jpg
2022-04-19 11:18:01 DEBUG    SHOWQUEUE-UPDATE :: [] GET URL: http://image.tmdb.org/t/p/original/uVukvj5r9jEMva78IfaGWMNwGe.jpg [Status: 200]
2022-04-19 11:18:01 DEBUG    SHOWQUEUE-UPDATE :: [] User-Agent: Medusa/0.5.29 (Linux; 3.14.29; dd2a7688-bfbc-11ec-8b0a-0242ac110002)
2022-04-19 11:18:01 INFO     SHOWQUEUE-UPDATE :: [] Cache check completed
2022-04-19 11:18:01 DEBUG    SHOWQUEUE-UPDATE :: [] 84773: Finished update of The Lord of the Rings: The Rings of Power
2022-04-19 11:18:01 DEBUG    SHOWQUEUE-UPDATE :: [] 84773: Queueing show refresh for The Lord of the Rings: The Rings of Power
2022-04-19 11:18:04 INFO     SHOWQUEUE-REFRESH :: [] 84773: Performing refresh on The Lord of the Rings: The Rings of Power
2022-04-19 11:18:04 DEBUG    SHOWQUEUE-REFRESH :: [] 84773: Loading all episodes from the show directory: /tv/series/The Lord of the Rings
2022-04-19 11:18:04 DEBUG    SHOWQUEUE-REFRESH :: [] 84773: Found files: []
2022-04-19 11:18:04 DEBUG    SHOWQUEUE-REFRESH :: [] 84773: Loading all episodes from 'The Lord of the Rings: The Rings of Power' with a location from the database
2022-04-19 11:18:04 INFO     SHOWQUEUE-REFRESH :: [] Trying to clean any empty folder under /tv/series/The Lord of the Rings
2022-04-19 11:18:04 INFO     SHOWQUEUE-REFRESH :: [] 84773: Updating NFOs for show with new indexer info
2022-04-19 11:18:04 DEBUG    SHOWQUEUE-REFRESH :: [] Checking if /tv/series/The Lord of the Rings/tvshow.nfo exists: True
2022-04-19 11:18:04 DEBUG    SHOWQUEUE-REFRESH :: [] Metadata provider KODI 12+ updating series indexer info metadata file for The Lord of the Rings: The Rings of Power
2022-04-19 11:18:04 DEBUG    SHOWQUEUE-REFRESH :: [] Checking if /tv/series/The Lord of the Rings/.plexmatch exists: True
2022-04-19 11:18:04 DEBUG    SHOWQUEUE-REFRESH :: [] Metadata provider Plex updating series indexer info metadata file for The Lord of the Rings: The Rings of Power
2022-04-19 11:18:04 WARNING  SHOWQUEUE-REFRESH :: [] Received an invalid XML for The Lord of the Rings: The Rings of Power, try again later. Error: syntax error: line 1, column 0
2022-04-19 11:18:04 DEBUG    SHOWQUEUE-REFRESH :: [] Checking if /tv/series/The Lord of the Rings/tvshow.nfo exists: True
2022-04-19 11:18:04 DEBUG    SHOWQUEUE-REFRESH :: [] Checking if /tv/series/The Lord of the Rings/.plexmatch exists: True
2022-04-19 11:18:04 DEBUG    SHOWQUEUE-REFRESH :: [] 84773: Writing NFOs for all episodes
2022-04-19 11:18:04 DEBUG    SHOWQUEUE-REFRESH :: [] 84773: Checking & filling cache for show The Lord of the Rings: The Rings of Power
2022-04-19 11:18:04 DEBUG    SHOWQUEUE-REFRESH :: [] Searching for images for series id 84773
2022-04-19 11:18:04 DEBUG    SHOWQUEUE-REFRESH :: [] Checking KODI metadata for banner
2022-04-19 11:18:04 DEBUG    SHOWQUEUE-REFRESH :: [] Checking KODI 12+ metadata for banner
2022-04-19 11:18:04 DEBUG    SHOWQUEUE-REFRESH :: [] Checking Mede8er metadata for banner
2022-04-19 11:18:04 DEBUG    SHOWQUEUE-REFRESH :: [] Checking MediaBrowser metadata for banner
2022-04-19 11:18:04 DEBUG    SHOWQUEUE-REFRESH :: [] Checking Plex metadata for banner
2022-04-19 11:18:04 DEBUG    SHOWQUEUE-REFRESH :: [] Checking Sony PS3 metadata for banner
2022-04-19 11:18:04 DEBUG    SHOWQUEUE-REFRESH :: [] Checking TIVO metadata for banner
2022-04-19 11:18:04 DEBUG    SHOWQUEUE-REFRESH :: [] Checking WDTV metadata for banner
2022-04-19 11:18:04 DEBUG    SHOWQUEUE-REFRESH :: [] Searching for banner for series 84773
2022-04-19 11:18:04 DEBUG    SHOWQUEUE-REFRESH :: [] Unable to retrieve image to save in /config/cache/images/tmdb/84773.banner.jpg, skipping
2022-04-19 11:18:04 DEBUG    SHOWQUEUE-REFRESH :: [] Searching for banner_thumb for series 84773
2022-04-19 11:18:04 DEBUG    SHOWQUEUE-REFRESH :: [] Unable to retrieve image to save in /config/cache/images/tmdb/thumbnails/84773.banner.jpg, skipping
2022-04-19 11:18:04 INFO     SHOWQUEUE-REFRESH :: [] Cache check completed
2022-04-19 11:18:04 DEBUG    SHOWQUEUE-REFRESH :: [] Looking up XEM scene mapping for show ID 84773 on tmdb
2022-04-19 11:18:04 DEBUG    SHOWQUEUE-REFRESH :: [] TMDB is an unsupported indexer in XEM
@p0psicles
Copy link
Contributor

Yes it should not try to parse it at all.
I'll take a look at it

@simonc56
Copy link
Contributor Author

simonc56 commented Apr 19, 2022

Also there is a typo imho in medusa/metadata/plex.py :
flexmatch instead of plexmatch in variables names.

# Parse existing .flexmatch data
flexmatch_file_path = self.get_show_file_path(ep_obj.series)
flexmatch_file_dir = os.path.dirname(flexmatch_file_path)
with open(flexmatch_file_path) as f:
current_content = f.readlines()

@p0psicles
Copy link
Contributor

fixed in develop

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants