After media is set in playlist user presses upload with all files in list, then user error gets presented with this error on screen about files having more then 100 letter names.
this has suboptimal user upload expirience.
Can the error pop out at the moment when user select file which has 100 letters imidiately before even reaching upload list, not after list is set ?
Why is this name limit so small ?
Can it be raised somewhere ?
# /usr/local/bin/rename99.sh
#!/bin/bash
# Rename all files in current folder to max 99 characters (keep extensions)
MAX_LENGTH=99
for file in *; do
# Skip directories and non-files
[ -f "$file" ] || continue
# Extract name and extension
name="${file%.*}"
ext="${file##*.}"
# Handle files without extensions correctly
if [ "$name" = "$ext" ]; then
ext=""
else
ext=".$ext"
fi
# Truncate only if filename too long
if [ ${#file} -gt $MAX_LENGTH ]; then
max_name_len=$((MAX_LENGTH - ${#ext}))
new_name="${name:0:$max_name_len}$ext"
echo "Renaming: \"$file\" ^f^r \"$new_name\""
mv -n -- "$file" "$new_name"
fi
done