-
-
Notifications
You must be signed in to change notification settings - Fork 18
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Implement custom activity text formatting #165
base: main
Are you sure you want to change the base?
Conversation
Changed for consistency with default/unknown values.
We use the same version anyway.
This function is no longer used - it's replaced by `Client::get_details` for consistency with `Client::get_state` and `Client::get_image_text`. It also grants necessary access to display options format patterns that reside in `Client` struct.
Gets rid of dangling/duplicated separators and duplicated whitespaces.
Thank you a lot for this amazing update i love it! |
For consistency with `parse_music_display`
This is dope, it would be nice to have on shows and audiobooks too so that everything matches but other than that it looks great :) |
This is what I aim to do eventually. Since their display format is implemented a bit differently (they don't use |
Solves #154
Changes
Add support for new
display
format formusic
andmovies
:Music:
Movie:
Just for fun, another example config, with emojis:
Music:
Movies:
tested with old configuration:
briefly tested TV Episodes and they seem to work as they did before, haven't tested AudioBooks, Books or Live TV
API change: new struct
DisplayFormat
Vec<String>
asdisplay
type inDisplayOptions
String
orVec<String>
get converted toDisplayOptions
for legacy configuration supportsupported formatting items:
{track}
- track title{album}
- album title{artists}
- album artists, comma-separated{genres}
- genres, comma-separated{year}
- album release year{version}
- Jellyfin-RPC version, used for defaultimage_text
{sep}
- separator{title}
- movie title{genres}
- genres, comma-separated{year}
- movie release year{critic-score}
- RT critic score{community-score}
- RT community score{version}
- Jellyfin-RPC version, used for defaultimage_text
{sep}
- separatordisplay format texts are sanitized
unnecessary whitespaces are removed (e.g. whitespaces in the beginning, end and multiple space characters in a row)
duplicated or "dangling" separators are removed - this should take care of situations when some field is empty and separators can be placed one after another
Example:
"state_text": "{genres} {sep} {critic-score} {sep} {community-score}"
{genres} {sep} {sep} {community-score}
it should return{genres} {sep} {community-score}