{"id":23391371,"url":"https://github.com/vivyir/moc-rs","last_synced_at":"2025-04-08T14:47:26.725Z","repository":{"id":57639743,"uuid":"410624003","full_name":"vivyir/moc-rs","owner":"vivyir","description":"A library to interact with the MoC (Music on Console) server running on the current machine","archived":false,"fork":false,"pushed_at":"2023-02-09T18:05:08.000Z","size":17,"stargazers_count":0,"open_issues_count":1,"forks_count":1,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-03-30T10:01:51.152Z","etag":null,"topics":["audio","moc","music-on-console","rust","sound","utility","zero-dependency"],"latest_commit_sha":null,"homepage":"","language":"Rust","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mpl-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/vivyir.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2021-09-26T17:57:30.000Z","updated_at":"2021-11-29T20:31:27.000Z","dependencies_parsed_at":"2022-08-27T19:51:42.590Z","dependency_job_id":null,"html_url":"https://github.com/vivyir/moc-rs","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/vivyir%2Fmoc-rs","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/vivyir%2Fmoc-rs/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/vivyir%2Fmoc-rs/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/vivyir%2Fmoc-rs/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/vivyir","download_url":"https://codeload.github.com/vivyir/moc-rs/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247866130,"owners_count":21009238,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["audio","moc","music-on-console","rust","sound","utility","zero-dependency"],"created_at":"2024-12-22T04:16:01.195Z","updated_at":"2025-04-08T14:47:26.683Z","avatar_url":"https://github.com/vivyir.png","language":"Rust","funding_links":[],"categories":[],"sub_categories":[],"readme":"# moc-rs\nThis library helps you interact with the MoC (Music on Console) server running on \nyour system thru the binary, which in the case of arch linux (and manjaro) is \ninstallable thru pacman\n```\nsudo pacman -S moc\n```\nor for debian and ubuntu\n```\nsudo apt install moc\n```\n\n⚠️ The currently tested and working version of MoC is v2.5.2.\n\nIf you can't find an up to date version of MoC in your distributions \nrepositories (highly unlikey) please check out the\n[download](https://moc.daper.net/download) section of the official website\n\n## Basic example\n```rust\nuse moc_rs::{Moc, MocInterface, MocSource};\nuse std::time::Duration;\n\nfn main() -\u003e Result\u003c(), Box\u003cdyn std::error::Error\u003e\u003e {\n    // Make a new instance of Moc\n    let mut moc_ctx = Moc::new(\"mocp\".into());\n\n    // Get info about the current state of MoC\n    let mocinfo = moc_ctx.info();\n    dbg!(mocinfo);\n\n    moc_ctx.set_volume(50);\n\n    // A little delay to let the last task execute\n    std::thread::sleep(Duration::from_millis(100));\n\n    // Begin streaming SceneSat Radio immediately\n    moc_ctx.immediate_play(MocSource::Url(\n        \"http://sentinel.scenesat.com:8000/scenesat\".into(),\n    ));\n\n    // Remember to check out the docs for more info!\n\n    Ok(())\n}\n```\nFor more examples check out the [examples/][examples] directory on github\n\n[examples]: https://github.com/phnixir/moc-rs\n\n## Projects using `moc-rs`\n- [moc-rich-presence][mrp], discord rich presence for Music on Console!\n\n[mrp]: https://github.com/phnixir/moc-rich-presence\n\n## Contributing\nThanks for your interest in contributing! please open an issue or merge request\nto contibute. Code contributions submitted for inclusion in the work by you, as\ndefined in the MPL2.0 license, shall be licensed as the above without any\nadditional terms or conditions.\n\n\n## License\nThis project is licenced under [MPL 2.0][license].\n\n[license]: https://www.mozilla.org/en-US/MPL/2.0/\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fvivyir%2Fmoc-rs","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fvivyir%2Fmoc-rs","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fvivyir%2Fmoc-rs/lists"}