Add Option to Truncate Names on Export
Is your feature request related to a problem?
I'm currently trying to export my music library's artwork so I can refactor how I keep it stored, but export has been failing due to an exceptionally long album title (pulled directly as reported by Plex's metadata provider).
What is your feature request?
It would be nice to add an option to automatically truncate the actual album names (but keep the ids) if requested to work around issues like this, so that Artist - Chumbawamba [266473].resources/Chumbawamba - The Boy Bands Have Won_ and All the Copyists and the Tribute Bands and the TV Talent Show Producers Have Won_ If We Allow Our Culture to Be Shaped by Mimicry_ Whether From Lack of Ideas or From Exaggerated Respect. You Should Never Try to Freeze Culture. What You Can Do Is Recycle That Culture. Take Your Older Brothers Hand-Me-Down Jacket and Re-Style It_ Re-Fashion It to the Point Where It Becomes Your Own. But Dont Just Regurgitate Creative History_ or Hold Art and Music and Literature as Fixed_ Untouchable and Kept Under Glass. The People Who Try to Guard Any Particular Form of Music Are_ Like the Copyists and Manufactured Bands_ Doing It the Worst Disservice_ Because the Only Thing That You Can Do to Music That Will Damage It Is Not Change It_ Not Make It Your Own. Because Then It Dies_ Then Its Over_ Then Its Done_ and the Boy Bands Have Won. [266527].thumb.jpg would become Artist - Chumbawamba [266473].resources/Chumbawamba - The Boy Bands Have Won_ and All the Copyists and the Tribute Bands and the TV Talent Show Producers Have Won_ If We Allow Our Culture to Be Shaped by Mimicry_ Whether From Lack of Ideas or From Exaggerated Respect. You Should Never Try to Freeze Cu [266527].thumb.jpg or something similar.
Actual log failure:
Tautulli Exporter :: Failed to export 'Library - Music - All [2]': [Errno 36] File name too long: '/config/exports/Library - Music - All [2].20260809110739/Artist - Chumbawamba [266473].resources/Chumbawamba - The Boy Bands Have Won_ and All the Copyists and the Tribute Bands and the TV Talent Show Producers Have Won_ If We Allow Our Culture to Be Shaped by Mimicry_ Whether From Lack of Ideas or From Exaggerated Respect. You Should Never Try to Freeze Culture. What You Can Do Is Recycle That Culture. Take Your Older Brothers Hand-Me-Down Jacket and Re-Style It_ Re-Fashion It to the Point Where It Becomes Your Own. But Dont Just Regurgitate Creative History_ or Hold Art and Music and Literature as Fixed_ Untouchable and Kept Under Glass. The People Who Try to Guard Any Particular Form of Music Are_ Like the Copyists and Manufactured Bands_ Doing It the Worst Disservice_ Because the Only Thing That You Can Do to Music That Will Damage It Is Not Change It_ Not Make It Your Own. Because Then It Dies_ Then Its Over_ Then Its Done_ and the Boy Bands Have Won. [266527].thumb.jpg'
Traceback (most recent call last):
File "/app/plexpy/exporter.py", line 2082, in _real_export
result = pool.map(self._do_export, items)
File "/usr/local/lib/python3.13/multiprocessing/pool.py", line 367, in map
return self._map_async(func, iterable, mapstar, chunksize).get()
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^^
File "/usr/local/lib/python3.13/multiprocessing/pool.py", line 774, in get
raise self._value
File "/usr/local/lib/python3.13/multiprocessing/pool.py", line 125, in worker
result = (True, func(*args, **kwds))
~~~~^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.13/multiprocessing/pool.py", line 48, in mapstar
return list(map(*args))
File "/app/plexpy/exporter.py", line 2115, in _do_export
result = item._export_obj()
File "/app/plexpy/exporter.py", line 2515, in _export_obj
result = self.export_obj(self.obj)
File "/app/plexpy/exporter.py", line 2387, in export_obj
return helpers.get_attrs_to_dict(obj, attrs=export_attrs)
~~~~~~~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^
File "/app/plexpy/helpers.py", line 1314, in get_attrs_to_dict
value = [sub(o) for o in value]
~~~^^^
File "/app/plexpy/exporter.py", line 942, in <lambda>
'albums': lambda e: self.export_obj(e)
~~~~~~~~~~~~~~~^^^
File "/app/plexpy/exporter.py", line 2387, in export_obj
return helpers.get_attrs_to_dict(obj, attrs=export_attrs)
~~~~~~~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^
File "/app/plexpy/helpers.py", line 1317, in get_attrs_to_dict
value = sub(obj)
File "/app/plexpy/exporter.py", line 1020, in <lambda>
'thumbFile': lambda o: self.get_resource(o, 'thumb'),
~~~~~~~~~~~~~~~~~^^^^^^^^^^^^
File "/app/plexpy/exporter.py", line 2490, in get_resource
with open(filepath, 'wb') as outfile:
~~~~^^^^^^^^^^^^^^^^
OSError: [Errno 36] File name too long: '/config/exports/Library - Music - All [2].20260809110739/Artist - Chumbawamba [266473].resources/Chumbawamba - The Boy Bands Have Won_ and All the Copyists and the Tribute Bands and the TV Talent Show Producers Have Won_ If We Allow Our Culture to Be Shaped by Mimicry_ Whether From Lack of Ideas or From Exaggerated Respect. You Should Never Try to Freeze Culture. What You Can Do Is Recycle That Culture. Take Your Older Brothers Hand-Me-Down Jacket and Re-Style It_ Re-Fashion It to the Point Where It Becomes Your Own. But Dont Just Regurgitate Creative History_ or Hold Art and Music and Literature as Fixed_ Untouchable and Kept Under Glass. The People Who Try to Guard Any Particular Form of Music Are_ Like the Copyists and Manufactured Bands_ Doing It the Worst Disservice_ Because the Only Thing That You Can Do to Music That Will Damage It Is Not Change It_ Not Make It Your Own. Because Then It Dies_ Then Its Over_ Then Its Done_ and the Boy Bands Have Won. [266527].thumb.jpg' Are there any workarounds?
It's worth noting that while there's likely a technical workaround for this issue by renaming the album in Plex's UI - that also appears to be broken at the moment as well. I foresee this issue happening on certain filesystems with limited special character support with albums such as Wingdings.
Additional Context
No response
Source: Tautulli/Tautulli