rocksky 0.13.0 → 0.14.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 +4 -4
- data/CHANGELOG.md +12 -0
- data/lib/rocksky/event.rb +55 -0
- data/lib/rocksky/manifest.json +7 -7
- data/lib/rocksky/remote.rb +12 -7
- data/lib/rocksky/version.rb +1 -1
- data/lib/rocksky.rb +4 -2
- metadata +2 -1
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: c9d26267b45f471f9cda322cc761436e434d5282269bbf4849bf9b57a85dce91
|
|
4
|
+
data.tar.gz: 5c50a5a93410dfd5b1454273d07e1f0ccb121c52a6b32a87e49cc7884f7f8d08
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: ba39252bd1b17f33110c56092574ec14539b7ea40ce5338a576732f9ac7f6def7313d92e1a86a09e55c814b3b88918f08d6f4d76aebac909aaede594538478f5
|
|
7
|
+
data.tar.gz: ff24eaf530004037f4518d5a26c33ff814bf299bf0bdd815f297c7b8bdcb542c86a11d12f1be3062713320f8aa2671638a2ee82de1c2d50deea9693354fc8aa1
|
data/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,17 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## 0.14.0
|
|
4
|
+
|
|
5
|
+
- Added `Rocksky::Event` (`events`, `event`, `rsvps`, `artist_events`,
|
|
6
|
+
`put_rsvp`) over the new `app.rocksky.event.*` and
|
|
7
|
+
`app.rocksky.artist.getArtistEvents` lexicons.
|
|
8
|
+
- `match_song` candidates now carry `source`, `providerId`, `mbId`,
|
|
9
|
+
`mbReleaseId` and `mbArtists`; `album` is a hard filter and an unmatched
|
|
10
|
+
lookup returns an empty `matches` array without song fields.
|
|
11
|
+
- Remote player tracks accept `bitrate`, `waveform` (256 peaks) and
|
|
12
|
+
`waveformStatus`; controllers receive a `:command_error` event when a
|
|
13
|
+
target player rejects a command.
|
|
14
|
+
|
|
3
15
|
## 0.13.0
|
|
4
16
|
|
|
5
17
|
- Regenerated the native core against the updated `app.rocksky.*` lexicons.
|
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
module Rocksky
|
|
4
|
+
# app.rocksky.event.* — indexed music events (community.lexicon.calendar.event
|
|
5
|
+
# records annotated by app.rocksky.event.music) and their RSVPs.
|
|
6
|
+
module Event
|
|
7
|
+
module_function
|
|
8
|
+
|
|
9
|
+
# Indexed music events, soonest first. Without a time window only unexpired
|
|
10
|
+
# events are returned; +include_past+ lists past events, most recent first.
|
|
11
|
+
# Filters: +artist+ (AT-URI, id or sha256), +did+ (publisher), +rsvp_by+
|
|
12
|
+
# (a DID that RSVP'd going/interested), +kind+, +genre+, +from+ / +to+
|
|
13
|
+
# (RFC-3339). Pass +token+ to get each event's "viewerRsvp". Returns
|
|
14
|
+
# { "events" => [...] }.
|
|
15
|
+
def events(artist: nil, did: nil, rsvp_by: nil, kind: nil, genre: nil, from: nil, to: nil,
|
|
16
|
+
include_past: false, limit: nil, offset: nil, token: nil, base: nil)
|
|
17
|
+
params = { artist: artist, did: did, rsvpBy: rsvp_by, kind: kind, genre: genre,
|
|
18
|
+
from: from, to: to, limit: limit, offset: offset }.compact
|
|
19
|
+
params[:includePast] = true if include_past
|
|
20
|
+
Rocksky.get("app.rocksky.event.getEvents", params, base: base, token: token)
|
|
21
|
+
end
|
|
22
|
+
|
|
23
|
+
# One music event by the AT-URI of either its calendar event record or its
|
|
24
|
+
# app.rocksky.event.music record.
|
|
25
|
+
def event(uri, token: nil, base: nil)
|
|
26
|
+
Rocksky.get("app.rocksky.event.getEvent", { uri: uri }, base: base, token: token)
|
|
27
|
+
end
|
|
28
|
+
|
|
29
|
+
# Who responded to an event, most recent first ({ "rsvps" => [...] }).
|
|
30
|
+
# +status+ narrows to one community.lexicon.calendar.rsvp#… token.
|
|
31
|
+
def rsvps(uri, status: nil, limit: nil, offset: nil, base: nil)
|
|
32
|
+
params = { uri: uri, status: status, limit: limit, offset: offset }.compact
|
|
33
|
+
Rocksky.get("app.rocksky.event.getEventRsvps", params, base: base)
|
|
34
|
+
end
|
|
35
|
+
|
|
36
|
+
# The music events an artist is billed on, soonest first
|
|
37
|
+
# ({ "events" => [...] }); +include_past+ adds past events, most recent first.
|
|
38
|
+
def artist_events(uri, include_past: false, limit: nil, offset: nil, base: nil)
|
|
39
|
+
params = { uri: uri, limit: limit, offset: offset }.compact
|
|
40
|
+
params[:includePast] = true if include_past
|
|
41
|
+
Rocksky.get("app.rocksky.artist.getArtistEvents", params, base: base)
|
|
42
|
+
end
|
|
43
|
+
|
|
44
|
+
# Set the viewer's RSVP on an event. +status+ is a
|
|
45
|
+
# community.lexicon.calendar.rsvp#{going,interested,notgoing} token; an
|
|
46
|
+
# existing RSVP record is reused. Returns { "uri" => ..., "status" => ... }.
|
|
47
|
+
def put_rsvp(uri, status, token:, base: nil)
|
|
48
|
+
# putRsvp's input is a JSON body, so it rides the body-carrying native
|
|
49
|
+
# call rather than the query-string Rocksky.post.
|
|
50
|
+
Rocksky.unwrap(C.rocksky_library_post(base.to_s, token.to_s,
|
|
51
|
+
"app.rocksky.event.putRsvp",
|
|
52
|
+
JSON.generate({ uri: uri, status: status })))
|
|
53
|
+
end
|
|
54
|
+
end
|
|
55
|
+
end
|
data/lib/rocksky/manifest.json
CHANGED
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
{
|
|
2
2
|
"repo": "tsirysndr/rocksky",
|
|
3
|
-
"tag": "bindings-v0.
|
|
3
|
+
"tag": "bindings-v0.14.0",
|
|
4
4
|
"checksums": {
|
|
5
|
-
"aarch64-apple-darwin": "
|
|
6
|
-
"aarch64-linux-gnu": "
|
|
7
|
-
"x86_64-apple-darwin": "
|
|
8
|
-
"x86_64-linux-gnu": "
|
|
9
|
-
"x86_64-unknown-freebsd": "
|
|
10
|
-
"x86_64-unknown-netbsd": "
|
|
5
|
+
"aarch64-apple-darwin": "1a7db9b8e3fe9d79ffbc7aa546039636a2bf66e5e18d6fa1b6d2a542a51a063a",
|
|
6
|
+
"aarch64-linux-gnu": "95fab942c479f712bfbb3b75dc6d3b9bd9d9783cfffd28fe0bfe76ad450bd102",
|
|
7
|
+
"x86_64-apple-darwin": "68c39d92d3caf4cc167c0c0858a9a56504099f3f0c9dc10287b789b7adf37cf2",
|
|
8
|
+
"x86_64-linux-gnu": "18bfd64ae27e287b9e7b73b06fb37bad10b1ff4bc91f72cb5b441d906d42e45c",
|
|
9
|
+
"x86_64-unknown-freebsd": "6ec0f2712cb18537b38622655ab5fbc75638b74df11d18ea46632084030063ab",
|
|
10
|
+
"x86_64-unknown-netbsd": "00fd064a0ef79773ac495da88b88552dfa17f73a94360b0f528ba055d9849260"
|
|
11
11
|
}
|
|
12
12
|
}
|
data/lib/rocksky/remote.rb
CHANGED
|
@@ -82,9 +82,11 @@ module Rocksky
|
|
|
82
82
|
# Advertise the currently-playing track. Call whenever it changes, and
|
|
83
83
|
# periodically (~every 1–4s) with a fresh +elapsedMs+ so controllers show
|
|
84
84
|
# smooth progress. +track+ is a camelCase Hash. Optional audio info —
|
|
85
|
-
# +codec+ (audio codec/container, e.g. "mp3", "flac")
|
|
86
|
-
# (sample rate in Hz, e.g. 44100)
|
|
87
|
-
#
|
|
85
|
+
# +codec+ (audio codec/container, e.g. "mp3", "flac"), +sampleRate+
|
|
86
|
+
# (sample rate in Hz, e.g. 44100), +bitrate+ (kbit/s), +waveform+ (exactly
|
|
87
|
+
# 256 amplitude peaks 0..255 in track-time order) and +waveformStatus+
|
|
88
|
+
# ("pending", "ready" or "unavailable") — is included in the track payload
|
|
89
|
+
# when set, and omitted otherwise.
|
|
88
90
|
def set_now_playing(track)
|
|
89
91
|
Rocksky.unwrap(C.rocksky_remote_player_set_now_playing(@ptr, JSON.generate(track)))
|
|
90
92
|
end
|
|
@@ -168,10 +170,13 @@ module Rocksky
|
|
|
168
170
|
|
|
169
171
|
# Register a handler for a server event type, one of +:devices+,
|
|
170
172
|
# +:device_registered+, +:device_unregistered+, +:primary_changed+,
|
|
171
|
-
# +:now_playing+, +:status+, +:queue+. The block receives
|
|
172
|
-
# symbol-keyed event Hash. A +:now_playing+ event carries the
|
|
173
|
-
# track under +:track+, including optional +:codec+ /
|
|
174
|
-
#
|
|
173
|
+
# +:now_playing+, +:status+, +:queue+, +:command_error+. The block receives
|
|
174
|
+
# the full symbol-keyed event Hash. A +:now_playing+ event carries the
|
|
175
|
+
# advertised track under +:track+, including optional +:codec+ /
|
|
176
|
+
# +:sampleRate+ / +:bitrate+ / +:waveform+ / +:waveformStatus+ audio info
|
|
177
|
+
# when the player supplied it. A +:command_error+ event (+:deviceId+,
|
|
178
|
+
# +:deviceName+, +:message+) means the target player rejected a command
|
|
179
|
+
# this controller sent. Returns +self+ for chaining.
|
|
175
180
|
def on(event_type, &block)
|
|
176
181
|
@handlers[event_type.to_sym] = block
|
|
177
182
|
self
|
data/lib/rocksky/version.rb
CHANGED
data/lib/rocksky.rb
CHANGED
|
@@ -222,8 +222,9 @@ module Rocksky
|
|
|
222
222
|
end
|
|
223
223
|
|
|
224
224
|
# Resolve full canonical metadata for a bare title + artist (matchSong).
|
|
225
|
-
# +album+
|
|
226
|
-
#
|
|
225
|
+
# When +album+ is given only candidates matching that album (after
|
|
226
|
+
# normalization) are accepted; with no accepted candidate the response has an
|
|
227
|
+
# empty "matches" array and no song fields.
|
|
227
228
|
def self.match_song(title, artist, album: nil, mb_id: nil, isrc: nil, base: nil)
|
|
228
229
|
unwrap(C.rocksky_match_song(base.to_s, title, artist, album.to_s, mb_id.to_s, isrc.to_s))
|
|
229
230
|
end
|
|
@@ -363,6 +364,7 @@ module Rocksky
|
|
|
363
364
|
end
|
|
364
365
|
|
|
365
366
|
require_relative "rocksky/equalizer"
|
|
367
|
+
require_relative "rocksky/event"
|
|
366
368
|
require_relative "rocksky/filter"
|
|
367
369
|
require_relative "rocksky/library"
|
|
368
370
|
require_relative "rocksky/playlist"
|
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.
|
|
4
|
+
version: 0.14.0
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Rocksky
|
|
@@ -81,6 +81,7 @@ files:
|
|
|
81
81
|
- exe/rocksky-console
|
|
82
82
|
- lib/rocksky.rb
|
|
83
83
|
- lib/rocksky/equalizer.rb
|
|
84
|
+
- lib/rocksky/event.rb
|
|
84
85
|
- lib/rocksky/filter.rb
|
|
85
86
|
- lib/rocksky/library.rb
|
|
86
87
|
- lib/rocksky/manifest.json
|