Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save gravelld/cc492d4860bcf8765b66 to your computer and use it in GitHub Desktop.
Save gravelld/cc492d4860bcf8765b66 to your computer and use it in GitHub Desktop.
# Rule to limit track fields to 100 characters, as per https://sonos.custhelp.com/app/answers/detail/a_id/1552/kw/tag%20character%20limit
# Offers a one-click fix to truncate the track to exactly 97 characters with a three character ellipsis at the end
rule sonosTrackCharLimit with label "Sonos track name character limit" has alternatives
100_CHARS {
find /^(.{0,97}+)(.{0,3}+).+$/ replace with "$1..."
}
applies to track_name
@gravelld
Copy link
Author

A regular expression rule to identify and fix (with an ellipsis at the end) track names longer than the Sonos character length limit - http://www.blisshq.com/music-library-management-blog/2016/03/29/sonos-character-limits/

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment