rocksky 0.5.0 → 0.6.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: f5ff00fa4d526c5436fb713d32c4f49f85609263ccf950ea51a2091bec6d8951
4
- data.tar.gz: 161fb86cda0ae97b7044a10c9d5a249971143d00d6cf27560500199ebfdcfbfa
3
+ metadata.gz: fa6c83fa81b7bb244115d6b179b278f592dbbade9efdbcb5ec1d4b0f7e2d4b9c
4
+ data.tar.gz: 410f0dda9e50cdc5b60f39d84d3184cc740db1937672fa3f63417b77665e46a6
5
5
  SHA512:
6
- metadata.gz: 4c279685557ce908beb4d7e763a6b4d3a6fd6e55d51158aa518bdeb70189ecec3b22b2367bd0cdcb61e72439a22f73745159b21d64326a02d49f2f6cec608a26
7
- data.tar.gz: 8c09668a64234fc5064e50b53e039cbc9ae2d077290cac0dbeb0769f175ae6f24a65f11a7ae039af34d38793dbbb2897283ff23e7978a87e1ce9453d558c5275
6
+ metadata.gz: 0b0f47853567386514a64edd0beca2ea4c1ab0561f5834371c1756566e026681d0456876c7adacc3d6c1d957be83e3735e0ed5b1e9c9c940c1495851362075d8
7
+ data.tar.gz: 190f6cbdba923e62b13332f6a04f897c07dec5a5b8098ee7cfc4947b15088dd721deae25778ed9a3ea26b1a4bf3f1926c9891b6c81e5ddce367cc7761324f7a6
data/README.md CHANGED
@@ -14,7 +14,7 @@ gem install rocksky
14
14
  Or in a Gemfile:
15
15
 
16
16
  ```ruby
17
- gem "rocksky", "~> 0.5"
17
+ gem "rocksky", "~> 0.6"
18
18
  ```
19
19
 
20
20
  The gem is pure-Ruby; the native library is fetched from the GitHub release on
@@ -92,11 +92,14 @@ below). Then `scrobble(track)` (fans out to artist/album/song/scrobble),
92
92
  `refresh_session`, and `close` (release the native handle).
93
93
 
94
94
  **Two scrobble paths** — `scrobble(track)` takes full metadata, while
95
- `scrobble_match(title, artist, album: nil, mb_id: nil, isrc: nil)` matches a bare
95
+ `scrobble_match(params)` takes a single Hash with camelCase string keys
96
+ required `"title"`/`"artist"`, optional `"album"` (override), `"mbId"`/`"isrc"`
97
+ (match anchors), `"timestamp"` (scrobbled-at Unix seconds) — matching a bare
96
98
  title + artist first, then writes.
97
99
 
98
100
  ```ruby
99
- agent.scrobble_match("Chaser", "Calibro 35", album: "Jazzploitation")
101
+ agent.scrobble_match("title" => "Chaser", "artist" => "Calibro 35",
102
+ "album" => "Jazzploitation")
100
103
  ```
101
104
 
102
105
  **Dedup + realtime** — with `dedup_path:` set at login, `agent.sync_repo`
@@ -1,12 +1,12 @@
1
1
  {
2
2
  "repo": "tsirysndr/rocksky",
3
- "tag": "bindings-v0.2.0",
3
+ "tag": "bindings-v0.3.0",
4
4
  "checksums": {
5
- "aarch64-apple-darwin": "3fc61d1194d66f58eaea8b82643bbdcd705ab80a626e38975a3c0d66ea14047d",
6
- "aarch64-linux-gnu": "4e6f003fb0c45eba7a675b81cc76b084dc770333b2d8c676b2123d19e78f89a0",
7
- "x86_64-apple-darwin": "a90563838920ef3575b1af55062e5f1bddcd124ba0d4b9bd50b5639ab6c4ed4e",
8
- "x86_64-linux-gnu": "98c2df9ff416fd3f2f0e50e0e48122751ea829f5208f11002ce9fdd85b0fbe5f",
9
- "x86_64-unknown-freebsd": "5ad9efc806706ba51cb7f1fe0e678eb97e03e2dd218fec9fe7e7ab29e0efcb68",
10
- "x86_64-unknown-netbsd": "f82db46965ea7872085920d37f4a854f7f882e0efa257df9a11dd3e2f7cebf48"
5
+ "aarch64-apple-darwin": "645f343ba39bbcaa62ed38a56b8b9d88010d20e8e1f7488b691eab751f05d52d",
6
+ "aarch64-linux-gnu": "d8939244fa7fac3b56e83012fc30c87dc50b8531e21f860ab324159d38d5e78d",
7
+ "x86_64-apple-darwin": "9702077e8793c2a3c07c345e684c0918da04a44c71668c862fb516a75af61763",
8
+ "x86_64-linux-gnu": "964afa99734213465343daf3c5e5681be7c1a5a5d656a7030b5f2cc2b3bcea23",
9
+ "x86_64-unknown-freebsd": "e827e572d9d18eb9996607a9107bed4e28aaea0878f744b152bd3e6afec05bf4",
10
+ "x86_64-unknown-netbsd": "78744d465bbcbbe2f7fc61e36e554153d9a8334ac471e52f65c997c1beaeb455"
11
11
  }
12
12
  }
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Rocksky
4
- VERSION = "0.5.0"
4
+ VERSION = "0.6.0"
5
5
  end
data/lib/rocksky.rb CHANGED
@@ -36,7 +36,7 @@ module Rocksky
36
36
  "void* rocksky_agent_login(const char*, const char*, const char*, const char*, const char*)",
37
37
  "void rocksky_agent_free(void*)",
38
38
  "char* rocksky_agent_scrobble(void*, const char*)",
39
- "char* rocksky_agent_scrobble_match(void*, const char*, const char*, const char*, const char*, const char*)",
39
+ "char* rocksky_agent_scrobble_match(void*, const char*)",
40
40
  "char* rocksky_agent_sync_repo(void*)",
41
41
  "char* rocksky_agent_hydrate_from_jetstream(void*)",
42
42
  "char* rocksky_agent_like(void*, const char*, const char*)",
@@ -166,8 +166,13 @@ module Rocksky
166
166
 
167
167
  # Scrobble from just a title + artist (album optional, plus optional mb_id /
168
168
  # isrc anchors): resolve full metadata via matchSong, then fan out.
169
- def scrobble_match(title, artist, album: nil, mb_id: nil, isrc: nil)
170
- Rocksky.unwrap(C.rocksky_agent_scrobble_match(@ptr, title, artist, album.to_s, mb_id.to_s, isrc.to_s))
169
+ # Scrobble from just a title + artist. +input+ is a Hash with camelCase keys:
170
+ # required "title"/"artist"; optional "album", "mbId", "isrc" (match anchors),
171
+ # and "timestamp" (scrobbled-at Unix seconds, default now).
172
+ #
173
+ # agent.scrobble_match("title" => "Chaser", "artist" => "Calibro 35")
174
+ def scrobble_match(input)
175
+ Rocksky.unwrap(C.rocksky_agent_scrobble_match(@ptr, JSON.generate(input)))
171
176
  end
172
177
 
173
178
  # Download the caller's repo and (re)build the local dedup index (needs a
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: rocksky
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.5.0
4
+ version: 0.6.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Rocksky