Plex-Auto-Collections icon indicating copy to clipboard operation
Plex-Auto-Collections copied to clipboard

video_resolution filter for 4K (2160p) movies only accepts '4k' as a value

Open alexanderkladov opened this issue 5 years ago • 1 comments

TLDR at the end.

I just spent hours trying to figure out why the script wasn't picking up any of my 4K movies. It turned out that the only acceptable video_resolution value for 4K is 4k (notice the lowercase "k"). The script won't accept any of these: 2160 or 2160p, 4 or uppercase 4K. Which is super confusing, considering that Full HD & HD resolutions are marked by 1080 and 720 respectively.

Here was my config that didn't work:

collections:
  4K Movies:
    summary: A collection of 4K movies.
    all: true
    filters:
      video_resolution:
        - '2160'
        - '2160p'
        - '4K'
        - '4'

I also tried simply using video_resolution: 2160 (and all other variants like 2160p, 4 or 4K individually), but it didn't work either.

All I was getting after running the scan was:

|===================================================================================================|
|
| Updating collection: 4K Movies...
| Sync Mode: sync
| 
| Collection Filter video_resolution: ['2160', '2160p', '4', '4K']
| 
| Processing all: 
| Processed 817 Movies                                                           
| 
| Detail: summary updated to A collection of 4K movies
| Detail: collection_order updated to alpha
| 
|===================================================================================================|

Seems like a bug to me. At the very least, it should accept uppercase 4K & 2160.

TLDR: if you need to filter out 4K movies, you MUST use all: true && video_resolution: 4k (letter "k" MUST be lowercase). So something like this would work:

collections:
  4K Movies:
    summary: A collection of 4K movies.
    all: true
    filters:
      video_resolution: 4k

alexanderkladov avatar Jan 05 '21 16:01 alexanderkladov

This is kind of at the mercy of how Plex stores its metadata. If you look at the XML for any of your 4K movies, you'll see something like videoResolution="4k" (the script does modify the search key to video_resolution, but does nothing with the value).

mza921 avatar Jan 08 '21 03:01 mza921