{"id":18356251,"url":"https://github.com/erengy/anisthesia","last_synced_at":"2025-04-06T12:32:13.190Z","repository":{"id":153401982,"uuid":"81137948","full_name":"erengy/anisthesia","owner":"erengy","description":"Media detection library","archived":false,"fork":false,"pushed_at":"2024-07-01T14:27:56.000Z","size":79,"stargazers_count":42,"open_issues_count":5,"forks_count":9,"subscribers_count":7,"default_branch":"master","last_synced_at":"2025-03-22T00:03:32.288Z","etag":null,"topics":["work-in-progress"],"latest_commit_sha":null,"homepage":"","language":"C++","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/erengy.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,"governance":null,"roadmap":null,"authors":null,"dei":null}},"created_at":"2017-02-06T21:58:39.000Z","updated_at":"2024-08-25T15:51:10.000Z","dependencies_parsed_at":"2024-02-07T12:38:39.969Z","dependency_job_id":"eb791bcb-3f8e-4a8f-8171-3ff5406e6561","html_url":"https://github.com/erengy/anisthesia","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/erengy%2Fanisthesia","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/erengy%2Fanisthesia/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/erengy%2Fanisthesia/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/erengy%2Fanisthesia/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/erengy","download_url":"https://codeload.github.com/erengy/anisthesia/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247484450,"owners_count":20946388,"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":["work-in-progress"],"created_at":"2024-11-05T22:09:23.074Z","updated_at":"2025-04-06T12:32:12.702Z","avatar_url":"https://github.com/erengy.png","language":"C++","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Anisthesia\n\n*Anisthesia* is a media detection library for Windows.\n\n- Detects running media players and web browsers\n- Retrieves information about the currently playing video\n\n## Usage\n\n***This is a work in progress. Usage in public applications is not yet recommended.***\n\n```cpp\n#include \u003ciostream\u003e\n#include \u003cvector\u003e\n#include \u003canisthesia.hpp\u003e\n\nint main() {\n  std::vector\u003canisthesia::Player\u003e players;\n  if (!anisthesia::ParsePlayersFile(\"data/players.anisthesia\", players)) {\n    return 1;\n  }\n\n  const auto media_proc = [](const anisthesia::MediaInfo\u0026) {\n    return true;  // Accept all media\n  };\n\n  std::vector\u003canisthesia::win::Result\u003e results;\n  if (!anisthesia::win::GetResults(players, media_proc, results)) {\n    return 1;\n  }\n\n  const auto get_type = [](const anisthesia::MediaInfoType\u0026 type) {\n    switch (type) {\n      case anisthesia::MediaInfoType::File: return \"File\";\n      case anisthesia::MediaInfoType::Tab: return \"Tab\";\n      case anisthesia::MediaInfoType::Title: return \"Title\";\n      case anisthesia::MediaInfoType::Url: return \"URL\";\n      default: return \"Other\";\n    }\n  };\n\n  for (const auto\u0026 result : results) {\n    std::cout \u003c\u003c result.player.name \u003c\u003c '\\n';\n    for (const auto\u0026 media : result.media) {\n      for (const auto\u0026 information : media.information) {\n        std::cout \u003c\u003c \"\\t\" \u003c\u003c get_type(information.type);\n        std::cout \u003c\u003c \"\\t\\\"\" \u003c\u003c information.value \u003c\u003c \"\\\"\\n\";\n      }\n    }\n  }\n\n  return 0;\n}\n```\n\n## License\n\nLicensed under the [MIT License](https://opensource.org/licenses/MIT).\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ferengy%2Fanisthesia","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ferengy%2Fanisthesia","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ferengy%2Fanisthesia/lists"}