Commit Graph

15 Commits

Author SHA1 Message Date
Tomas Klaen
f635df18f7 refactor: cursor events consolidated into one interface (#483)
`mbtn_left` and `wheel` events are now only fired on a `cursor.on_{event}` object, which resets at the beginning of each frame, so elements need to bind these listeners in their render functions. These properties are overwritable which allows elements to take over cursor event handling from their parents if necessary.
2023-03-29 09:08:18 +02:00
tomasklaen
02228282be refactor: uppercase constants 2023-03-27 16:52:32 +02:00
christoph-heinrich
1dfbbd7091 fix: lax chapter range patterns producing false positives (#454) 2023-02-16 20:26:06 +01:00
tomasklaen
543c4a71f1 feat: added autoload_types option
Controls what file types to look for when deciding next file to play.

Comma separated list of: `video`, `audio`, `image`, `subtitle`

closes #387
2023-01-30 12:57:05 +01:00
tomasklaen
54bb9d6a77 feat: split media_types option into video_types, audio_types, and image_types 2023-01-30 11:44:15 +01:00
tomasklaen
7647cac9f8 feat: trim unnecessary 00: from timestamps in durations shorter than an hour
closes #401
2023-01-30 10:58:22 +01:00
christoph-heinrich
e460e8c973 feat: better alphanumerical sorting (#426) 2023-01-13 19:41:17 +01:00
dyphire
e33db65c1c feat: add use_trash option (#394) 2022-12-23 15:51:37 +01:00
christoph-heinrich
8b863a611f fix: osd resolution initializing incorrectly (#383)
* fix: only update resolution when it's > 0

* fix: only render after the resolution has been initialized

* chore: update type annotation to fix warning
2022-12-04 09:09:20 +01:00
tomasklaen
5f5bf4b842 fix: file menu not updating active item and other menu issues
- Preselecting previous folder wasn't working sometimes.
- `join_path()` didn't account for drive letters already having a separator.

Also refactors how `open_file_navigation_menu()` stores menu items value. As a side effect this is now a lot faster as we don't have to serialize each item's path into meta table, but instead we now store just a path string and handle it as needed.

closes #355
2022-10-31 11:10:25 +01:00
tomasklaen
e8060c74ad refactor: don't overwrite default libraries and expose join_path() and path_separator() types 2022-10-31 09:47:46 +01:00
christoph-heinrich
59ac8af48f fix: menu title when browsing files (#349) 2022-10-28 21:54:57 +02:00
tomasklaen
8538d6a177 perf: optimize reading directories
Instead of calling `utils.readdir()` twice to get directories and files, we now read the directory only once and sort it by item type. Also optimizes extension checking.

ref #344
2022-10-27 13:25:02 +02:00
tomasklaen
70c02b8a7c refactor: don't extend native utilities 2022-10-27 12:14:28 +02:00
tomasklaen
4399904bba refactor: change directory structure to support mpv 0.32 and lower 2022-10-27 12:09:59 +02:00