Save_resources.py error - solved, and why you should use this script

Hi @swiftpanda16,

I just found your script today (Save Posters, Backgrounds and Logos as Local Assets - #3 by SwiftPanda16) and it appears there is a bug with the squareart. Not sure if Plex made a change recently to PMS that caused this:

PS C:\Users\xxxxxxxxx\Media-Scripts\save_resources> python save_resources.py --rating_key 583323 --poster --art --logo --squareArt
The Killer That Stalked New York (1950)
└─ Downloading x:\Movies\The Killer That Stalked New York (1950)\poster.jpg
poster.jpg: 100%|███████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████| 1.57M/1.57M [00:00<00:00, 31.3MB/s]
└─ Downloading x:\Movies\The Killer That Stalked New York (1950)\art.jpg
art.jpg: 100%|████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████| 439k/439k [00:00<00:00, 6.54MB/s]
└─ No logo set. Skipping.
Traceback (most recent call last):
File "C:\Users\xxxxxxxxx\Media-Scripts\save_resources\save_resources.py", line 159, in
save_item(
File "C:\Users\xxxxxxxxx\Media-Scripts\save_resources\save_resources.py", line 113, in save_item
download_resource('squareArt', item.squareArtUrl, save_path, 'squareArt.jpg', overwrite=overwrite)
^^^^^^^^^^^^^^^^^
File "C:\Users\xxxxxxxxx\AppData\Local\Programs\Python\Python311\Lib\site-packages\plexapi\base.py", line 617, in getattribute
value = super(PlexPartialObject, self).getattribute(attr)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
AttributeError: 'Movie' object has no attribute 'squareArtUrl'

Nevermind, I needed an update:

python.exe -m pip install --upgrade pip

Let me just add, this is the script everyone needs to use if they are tired of Plex overwriting their long efforts in picking just the right images (and themes). Very simple to run:

Here is how I’m running it (and will probably schedule it to run every week or two to catch my future changes – add your other libraries as needed, I might add my Music libraries later):

Save/Overwrite ALL Movies assets

python save_resources.py --library “Movies” --poster --art --logo --squareArt --overwrite

Save/Overwrite ALL 4K Movies assets

python save_resources.py --library “4K Movies” --poster --art --logo --squareArt --overwrite

Save/Overwrite ALL TV Shows assets (root folder)

python save_resources.py --library “TV Shows” --poster --art --logo --squareArt --overwrite

Save/Overwrite POSTER TV Shows assets (Season folders)

python save_resources.py --library “TV Shows” --libtype season --poster --overwrite