Commit d8a543a
committed
loadfile: truncate long track URL titles
When a track title is a URL longer than 90 characters, truncate it to
not make track information too verbose.
This uses term_disp_width() which is convenient even for ASS output
because it avoids cutting in the middle of UTF-8 characters. So wide
unicode characters will count as 2 characters.
Long track URLs like reported in #10975 no longer flood the terminal
with useless information.
Long track URLs also no longer push track metadata beyond the track
menu, without having to implement UTF-8 aware functions in select.lua to
avoid cutting titles in the middle of UTF-8 characters.
The full URLs are always available in track-list/N/external-filename.
--osd-max-track-title-url-length configures this behavior.1 parent 2e5e293 commit d8a543a
File tree
5 files changed
+24
-1
lines changed- DOCS
- interface-changes
- man
- options
- player
5 files changed
+24
-1
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
4698 | 4698 | | |
4699 | 4699 | | |
4700 | 4700 | | |
| 4701 | + | |
| 4702 | + | |
| 4703 | + | |
| 4704 | + | |
| 4705 | + | |
| 4706 | + | |
| 4707 | + | |
4701 | 4708 | | |
4702 | 4709 | | |
4703 | 4710 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
888 | 888 | | |
889 | 889 | | |
890 | 890 | | |
| 891 | + | |
| 892 | + | |
891 | 893 | | |
892 | 894 | | |
893 | 895 | | |
| |||
999 | 1001 | | |
1000 | 1002 | | |
1001 | 1003 | | |
| 1004 | + | |
1002 | 1005 | | |
1003 | 1006 | | |
1004 | 1007 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
277 | 277 | | |
278 | 278 | | |
279 | 279 | | |
| 280 | + | |
280 | 281 | | |
281 | 282 | | |
282 | 283 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
25 | 25 | | |
26 | 26 | | |
27 | 27 | | |
| 28 | + | |
28 | 29 | | |
29 | 30 | | |
30 | 31 | | |
| |||
909 | 910 | | |
910 | 911 | | |
911 | 912 | | |
912 | | - | |
| 913 | + | |
| 914 | + | |
| 915 | + | |
| 916 | + | |
| 917 | + | |
| 918 | + | |
| 919 | + | |
| 920 | + | |
| 921 | + | |
| 922 | + | |
913 | 923 | | |
| 924 | + | |
914 | 925 | | |
915 | 926 | | |
916 | 927 | | |
| |||
0 commit comments