Commit Graph

98 Commits

Author SHA1 Message Date
Oystein Kristoffer Tveit c129e5104d
.gitea/workflows: adjust rsync action url
Build and test / build (push) Successful in 1m54s Details
Build and test / check (push) Successful in 1m56s Details
Build and test / test (push) Successful in 3m25s Details
Build and test / docs (push) Successful in 2m26s Details
2024-08-21 07:19:24 +02:00
Oystein Kristoffer Tveit 467cac3c50
fix inverted switch for `MpvExt::set_playback`
Build and test / build (push) Successful in 1m56s Details
Build and test / check (push) Successful in 1m55s Details
Build and test / docs (push) Successful in 3m57s Details
Build and test / test (push) Successful in 3m57s Details
2024-08-03 21:02:46 +02:00
Oystein Kristoffer Tveit 6a0a275f64
cargo fmt + clippy
Build and test / build (push) Successful in 1m58s Details
Build and test / check (push) Successful in 1m58s Details
Build and test / docs (push) Successful in 2m16s Details
Build and test / test (push) Successful in 3m27s Details
2024-08-03 17:07:52 +02:00
Oystein Kristoffer Tveit 99e4622ef7
switch default branch from `master` to `main` 2024-08-03 17:07:50 +02:00
Oystein Kristoffer Tveit ee0c51eeba
Cargo.toml: use real name for co-author 2024-08-03 17:07:13 +02:00
Oystein Kristoffer Tveit 961da5b301
rename project from `mpvipc` to `mpvipc-async` 2024-08-03 17:07:09 +02:00
Oystein Kristoffer Tveit cbd8b1aed2
Add TODO for missing async response events 2024-08-03 16:02:17 +02:00
Oystein Kristoffer Tveit 9e0d8c0117
README: small fixups, add fork notice 2024-08-03 15:52:41 +02:00
Oystein Kristoffer Tveit bb050d7a6d
Add comments for `integration_tests::event_property_parser` 2024-08-03 15:38:49 +02:00
Oystein Kristoffer Tveit 93366593c7
Allow a few more highlevel types to be nullable 2024-08-03 15:38:46 +02:00
Oystein Kristoffer Tveit 4cc824d164
.envrc: init 2024-08-02 18:20:31 +02:00
Oystein Kristoffer Tveit d482e9eaf6
flake: fix `RUST_SRC_PATH`, add `x86_64-darwin` to systems 2024-05-05 14:06:21 +02:00
Oystein Kristoffer Tveit eb81d7c463
reuse `property_parser` for highlevel api, add more highlevel functions 2024-05-04 23:01:17 +02:00
Oystein Kristoffer Tveit 66d54a58aa
add cargo-nextest to flake.nix devshell 2024-05-04 18:45:33 +02:00
Oystein Kristoffer Tveit 650507e680
add support for parsing playlists as events + more
This brings several changes with it:

- `Mpv::get_property` now returns `Option`s in case `data` is
  nonexistent. There could be cases where this is different from
  `MpvDataType::Null` and `MpvDataType::MinusOne`.

- `MpvError` now implements `PartialEq`
2024-05-04 18:45:32 +02:00
Oystein Kristoffer Tveit 2ed8025046
fix examples and documentation
Build and test / check (pull_request) Successful in 1m58s Details
Build and test / build (pull_request) Successful in 1m59s Details
Build and test / docs (pull_request) Successful in 2m44s Details
Build and test / test (pull_request) Successful in 3m19s Details
Build and test / build (push) Successful in 1m56s Details
Build and test / check (push) Successful in 1m50s Details
Build and test / docs (push) Successful in 2m45s Details
Build and test / test (push) Successful in 3m29s Details
2024-05-04 00:23:02 +02:00
Oystein Kristoffer Tveit e044246cba
fixup: fmt + clippy 2024-05-04 00:23:02 +02:00
Oystein Kristoffer Tveit f1687fe07b
add/fix more docstrings 2024-05-04 00:23:01 +02:00
Oystein Kristoffer Tveit 3a04cd14f1
restructure test directory 2024-05-04 00:23:01 +02:00
Oystein Kristoffer Tveit f50b4defc1
add some tests for event property parser 2024-05-04 00:23:01 +02:00
Oystein Kristoffer Tveit 48cbb51b77
use nextest for running tests 2024-05-04 00:23:00 +02:00
Oystein Kristoffer Tveit 2736d1d7ad
wrap event data in `Option` 2024-05-03 22:29:28 +02:00
Oystein Kristoffer Tveit 878cebbc9f
use usize for request ids 2024-05-03 22:29:27 +02:00
Oystein Kristoffer Tveit cb0921144d
rework error messages 2024-05-03 22:29:25 +02:00
Oystein Kristoffer Tveit 7eec34ce00
split property parsing from event parsing:
Build and test / build (pull_request) Successful in 1m55s Details
Build and test / check (pull_request) Successful in 1m52s Details
Build and test / docs (pull_request) Successful in 2m21s Details
Build and test / test (pull_request) Successful in 4m9s Details
Build and test / check (push) Successful in 1m55s Details
Build and test / build (push) Successful in 1m57s Details
Build and test / docs (push) Successful in 2m43s Details
Build and test / test (push) Successful in 5m33s Details
High-level properties are now optional, considering there are about a
thousand of them to parse. The high-level properties are a few chosen
ones that I suspect might be useful for most people, with catch-all enum
variants for the less common ones.
2024-05-02 21:16:23 +02:00
Oystein Kristoffer Tveit f5ca2ebde9
add more tests, fix event/command response race condition
Build and test / check (pull_request) Successful in 1m56s Details
Build and test / build (pull_request) Successful in 1m57s Details
Build and test / docs (pull_request) Successful in 2m30s Details
Build and test / test (pull_request) Successful in 4m0s Details
Build and test / check (push) Successful in 1m55s Details
Build and test / build (push) Successful in 1m56s Details
Build and test / docs (push) Successful in 3m2s Details
Build and test / test (push) Successful in 3m59s Details
2024-05-01 23:45:42 +02:00
Oystein Kristoffer Tveit bb3426f111
add script to create coverage report manually 2024-05-01 23:45:41 +02:00
Oystein Kristoffer Tveit 03bcf9976d
workflow: generate test reports and docs
Build and test / build (push) Successful in 2m53s Details
Build and test / check (push) Successful in 2m54s Details
Build and test / docs (push) Successful in 3m49s Details
Build and test / test (push) Successful in 6m26s Details
2024-05-01 22:22:46 +02:00
Oystein Kristoffer Tveit 64bf743c6c
clean: add docstrings, move a few things around 2024-05-01 22:22:45 +02:00
Oystein Kristoffer Tveit 7e20ff9b56
api: split into several files 2024-04-30 17:39:33 +02:00
Oystein Kristoffer Tveit 3be7b2bda6
cargo fmt + clippy
Build and test / check (push) Successful in 1m55s Details
Build and test / build (push) Successful in 1m59s Details
Build and test / test (push) Successful in 2m30s Details
2024-04-30 02:13:57 +02:00
Oystein Kristoffer Tveit 7bcd3fc1ec
setup gitea action workflows
Build and test / check (push) Failing after 1m29s Details
Build and test / build (push) Successful in 1m55s Details
Build and test / test (push) Successful in 1m57s Details
2024-04-30 02:07:08 +02:00
Oystein Kristoffer Tveit 75645c5880
api: move highlevel functions into extension 2024-04-30 02:07:08 +02:00
Oystein Kristoffer Tveit aacde5df12
Create event stream 2024-04-30 02:07:04 +02:00
Oystein Kristoffer Tveit c039eafa1e
Add some tests 2024-04-19 01:02:24 +02:00
Oystein Kristoffer Tveit ea12dbec5b
nix support 2024-04-19 00:59:22 +02:00
Oystein Kristoffer Tveit deb45a4570
Make entire project async
This moves all communication with Mpv's unix socket into another tokio
task, and uses message passing through clonable mpsc channels to receive
commands to execute, and to send responses.
2024-04-19 00:59:22 +02:00
Oystein Kristoffer Tveit f5c9674b78
Misc: refactor + serde serialization derives
- Split content into more files
- Refactor TypeHandler impls
- Add serialization traits to public structs/enums
2024-04-16 23:11:19 +02:00
Oystein Kristoffer Tveit 6d2575b940
Add `Clone` and `Copy` to several public structs 2024-04-16 20:54:17 +02:00
Jonas Frei d973f1e23e Merge branch 'fix-readme-link' into 'master'
Fix link to mpvc

See merge request mpv-ipc/mpvipc!6
2023-08-22 11:40:33 +00:00
naglis 48d15f8085 Fix link to mpvc 2023-08-22 14:05:32 +03:00
Jonas Frei fe6b191a3b Updated crates, switched edition to 2021, version update 2023-08-03 12:55:41 +02:00
Jonas Frei 9e3ec12894 Generate JSON string with serde_json
Closes #3
2023-08-02 11:15:37 +02:00
Jonas Frei ff7a7b7c9d Added mpv commands script-message and script-message-to 2023-07-31 20:19:03 +02:00
Jonas Frei cea343cd3b Merge branch 'add-client-message-event' into 'master'
Add support for `client-message` events

See merge request mpv-ipc/mpvipc!4
2023-07-31 07:30:06 +00:00
Jonas Frei f591765e34 Merge branch 'use-cycle-for-toggle' into 'master'
Use `cycle` command for toggling play/pause

See merge request mpv-ipc/mpvipc!5
2023-07-31 05:21:32 +00:00
naglis f023be48f7 Use `cycle` command for toggling play/pause
This way we do not need to get the `pause` property first.
2023-07-31 00:47:04 +03:00
naglis 83abe0bf62 Add support for `client-message` events
These events are issued [1] when clients communicate to each other using
`script-message` [2] and `script-message-to` [3] commands.

[1]: https://mpv.io/manual/stable/#command-interface-client-message
[2]: https://mpv.io/manual/stable/#command-interface-script-message
[3]: https://mpv.io/manual/stable/#command-interface-script-message-to
2023-07-30 23:14:20 +03:00
Jonas Frei c5550739f4 Bump package version 2022-07-21 18:21:58 +02:00
Jonas Frei 86662ffb6b Merge branch 'master' into 'master'
clean up code and fix bug

See merge request mpv-ipc/mpvipc!3
2022-07-20 15:44:23 +00:00