This gives these properties the "time" type, which allows them to be pretty-printed as HH:MM:SS easily (but also still allows raw formatting using e.g. ${=sub-start}).
Unified · Split
| @@ -0,0 +1 @@ | ||
| 1 | +change type of `sub-start` and `sub-end` properties to time | |
| @@ -2867,6 +2867,11 @@ Property list · 2866 unmodified lines | ||
| 2867 | 2867 | subtitles, returns the first start time. If no current subtitle is present |
| 2868 | 2868 | null is returned instead. |
| 2869 | 2869 | |
| 2870 | + This has a sub-property: | |
| 2871 | + | |
| 2872 | + ``sub-start/full`` | |
| 2873 | + ``sub-start`` with milliseconds. | |
| 2874 | + | |
| 2870 | 2875 | ``secondary-sub-start`` |
| 2871 | 2876 | Same as ``sub-start``, but for the secondary subtitles. |
| 2872 | 2877 | |
| @@ -2876,6 +2881,11 @@ Property list · 3 unmodified lines | ||
| 2876 | 2881 | if it's present but has unknown or incorrect duration, null is returned |
| 2877 | 2882 | instead. |
| 2878 | 2883 | |
| 2884 | + This has a sub-property: | |
| 2885 | + | |
| 2886 | + ``sub-end/full`` | |
| 2887 | + ``sub-end`` with milliseconds. | |
| 2888 | + | |
| 2879 | 2889 | ``secondary-sub-end`` |
| 2880 | 2890 | Same as ``sub-end``, but for the secondary subtitles. |
| 2881 | 2891 | |
| @@ -3062,7 +3062,7 @@ static int mp_property_sub_start(void *ctx, struct m_property *prop, · 3061 unmodified lines | ||
| 3062 | 3062 | double start = get_times(ctx, prop, action, arg).start; |
| 3063 | 3063 | if (start == MP_NOPTS_VALUE) |
| 3064 | 3064 | return M_PROPERTY_UNAVAILABLE; |
| 3065 | − return m_property_double_ro(action, arg, start); | |
| 3065 | + return property_time(action, arg, start); | |
| 3066 | 3066 | } |
| 3067 | 3067 | |
| 3068 | 3068 | |
| @@ -3072,7 +3072,7 @@ static int mp_property_sub_end(void *ctx, struct m_property *prop, · 3 unmodified lines | ||
| 3072 | 3072 | double end = get_times(ctx, prop, action, arg).end; |
| 3073 | 3073 | if (end == MP_NOPTS_VALUE) |
| 3074 | 3074 | return M_PROPERTY_UNAVAILABLE; |
| 3075 | − return m_property_double_ro(action, arg, end); | |
| 3075 | + return property_time(action, arg, end); | |
| 3076 | 3076 | } |
| 3077 | 3077 | |
| 3078 | 3078 | static int mp_property_playlist_current_pos(void *ctx, struct m_property *prop, |