Is it possible to disable using Square Art for mobile backgrounds?

Server Version#: 1.43.0.10467
Player Version#: 4.156.0

As of yesterday’s PMS update, there’s a new metadata option called Square Art, which is used as a movie’s/show’s background (after refreshing its metadata) in the mobile app instead of the standard background.

While I understand this can provide more flexibility, I’ve carefully chosen all of my backgrounds to also work on mobile, so this undoes that work and creates another image for me to manage. Is it possible to disable this and only use the standard background image like before? Thanks

Are these backgrounds local assets (images located within the media’s directory) or images that you picked from the available options?

Only ones that I’ve selected from the UI, I don’t use any local assets

IIRC from another thread, these picked backgrounds are still being used on clients that use them (Web, Desktop, TV)?

So you would like to reuse your current background art for your square art, is that accurate?

If this is the goal and they don’t have local assets then using the plex api and deleteSquareArt() function will work. I tested it myself a while ago. It removes the square art, which then forces the new mobile client to fall back to the background artwork. Here is a simple pyton script to delete the square art from all movie and tv libraries.

from plexapi.server import PlexServer

def delete_squareArt(library, libtype=None):
    for item in library.all(libtype):
        print(f'{item.title} ({item.year})')
        item.deleteSquareArt()

if __name__ == '__main__':
    plex = PlexServer('your plex server')

    for library in plex.library.sections():
        if library.type == 'movie':
            delete_squareArt(library)

        elif library.type == 'show':
            delete_squareArt(library)

However, this bug Is it possible to disable using Square Art for mobile backgrounds? then kicks in as upon a metadata refresh it comes back, even if lockSquareArt() is used to try and force it, at least that’s what happened the last time I tested it.

Correct, and I did confirm that the selected background are still used on tvOS, but not in iOS

This was for clear logos specifically. Logo - unselect image does not stick and returns upon a metadata refresh :backhand_index_pointing_left: should be fixed in the next Beta 1.43.1.

Clear logo are being treated differently because we allow for them to be unselected in the webUI and they have a built in fallback of the title. Posters, backgrounds, and square art would all behave the same. Where if they are DELETEd via API calls something else will be picked on a refresh. This is because these art assets should have something.

If you’re willing to use a script to fix this, one could be made to use the currently selected background art for the square art and then lock them.

I see, I guess that makes sense. Would have been nice to lock as empty :slight_smile:

For me I have local assets for everything. If I move to the new clients (I’ve currently no plans to) I planned to just do a copy of my current background to squareart, fixup major issues as I find them.

However, your idea to do this via the api is an interesting one so I might play with that over the weekend when I have some more time. Thanks.

I’m open to using a script to address this if you think it’s safe and it’s my only option. Would the script point to the background or make a copy to save under square art? Just wondering in case it adds a lot of data to my metadata directory

@dokuro @ourcore reusing the simple script structure. I commented out a way to simply do one item to test with. 194929 is the ratingKey for the media I tested with, see the screenshots.

from plexapi.server import PlexServer


def background_to_squareArt(library, libtype=None):
    for item in library.all(libtype):
        print(f'{item.title} ({item.year})')
        item.uploadSquareArt(item.artUrl)

if __name__ == '__main__':
    plex = PlexServer('your plex server')

    # item = plex.fetchItem(194929)
    # item.uploadSquareArt(item.artUrl)

    for library in plex.library.sections():
        if library.type == 'movie':
            background_to_squareArt(library)

        elif library.type == 'show':
            background_to_squareArt(library)

Before:

You can see the background in the background :grin: and what I had picked for the square art.

After:

The background is now selected for square art.

Very nice, thank you.

Thanks a lot!

:grimacing: I would assume that it would make a copy. If you want to explore using the script above, maybe add some breaks or pauses and monitor your local appdata directory to see how much bigger it gets. I don’t think it should be much more but I can’t assume to know which images you choose for your backgrounds.

Yeah, I might hold off ‘cause I realised I’d also have to run the script anytime I changed a background. It’d be cool if there was a way to revert the square art selections to whatever they are now, before refreshing a show’s/movie’s metadata and when they fall back to the standard backgrounds

@Atomatth I appreciate the workaround but we really need an option to always use the background image if we want to…

The ones I’ve chosen are meant to work as both landscape and square (cropped) proportions, after the latest update I now need to choose an extra image file only for the square version. That should be unnecessary if we prefer to reuse the background image, and I definitely don’t want to run scripts regularly to correct this situation.

I did file an internal issue for this request. Unfortunately, this will not be something that we will be addressing.

This is an unfortunate consequence of adding a new art asset along with the timing of allowing customization of this new art asset. Sorry for the inconvenience and frustration this has caused. Hopefully the workaround script can ease some of the frustration.

Appreciate the honesty. Thanks.

Thanks for trying, I appreciate the effort. I wish the square art would at least be unselectable like the logos and fallback on the regular background without having to make hundreds of copies

Thank you @dokuro and @Atomatth, riffing on what’s already here:

Forcing a copy of the background as the square art is an option, but I agree that’s a non-optimal work around and just adds more data. Unselecting does still fall back on the background art, so am using that to my advantage.

I’ve run @dokuro’s initial delete all square art script, and have written something here that deletes/unselects square art from the most recently added item (regardless of library type):

from plexapi.server import PlexServer

def delete_squareArt(item):
    print(f'SquareArt Unselected for:\n    {item.title} ({item.year})')
    item.deleteSquareArt()

latest_media = None #initial definition for 'latest media'

for library in plex.library.sections():
    if library.type == 'movie' or library.type == 'show':
        for item in library.all(): #select all libraries matched
            if latest_media is None or item.addedAt > latest_media.addedAt:
                latest_media = item #redefine 'latest media' to most recent item

if latest_media:
    delete_squareArt(latest_media) #close loop, delete that item's square art

After adding a new item, am running this to unselect/delete its’ square art. Which is also not heaps optimal, but for now it’s working well enough for me.

Hopefully I’ll find/make a way to automatically run this script whenever a new media item is detected in the library at all and save me manually doing it. Better yet: hoping they add an unselect option like there is for logos.

Also, in case I miss doing that for an item, or if multiple items are added at the same time and the previous code doesn’t wipe multiple items with the same timestamp for you (it does for me but yknow, always expecting it might error for some):

Here’s a variation to remove square art from the variable recent [num] of entries:

from plexapi.server import PlexServer

def delete_squareArt(item):
    item.deleteSquareArt()

def delete_recent_items(plex, num_items):
    latest_media = [] #initial definitions

    for library in plex.library.sections():
        if library.type == 'movie' or library.type == 'show':
            for item in library.all():
                latest_media.append(item) #lists all items

    latest_media.sort(key=lambda x: x.addedAt, reverse=True) #sorts list by newest
    latest_media = latest_media[:num_items] #limits list to number variable
    print(f'SquareArt Unselected for:')
    for item in latest_media:
        print(f'    {item.title} ({item.year})')
    for item in latest_media:
        delete_squareArt(item)

delete_recent_items(plex, 5) #variable [num] (in this case 5), value for how many recent item entries
#so in this case, the 5 most recent items' square arts are unselected/deleted
#change this number to however many items are needed/wanted

(and of course, can add your

if __name__ == '__main__':
    plex = PlexServer('your plex server')

if need be).

Hopefully these are helpful to y’all too~ :sparkles:

EDIT:
Just learnt that Tautulli can autorun python scripts upon triggers. I’ve not used this before, but I’m adding my first script above to trigger upon a new item and will test if that works to automatically delete/unselect square art. But in theory:

Tautilli’s notification agent → new notification → script → add .py file of code → trigger on ‘recently added’ → hopefully automatic square art removal for the most recent item :crossed_fingers:

If you’re never wanting any square art, could use that to trigger the delete all script, or the [num] script to make sure the last [num] amount of entries have their art removed on trigger.

Sorry this ended up being a long post/reply for my first post! I’m new here and the square art fiasco was annoying me enough to jump in and do something :joy:

Appreciate your reply but aren’t you able to just create an “unselect an image” similar to what you do for Clear Logos?