Skip to content

Commit 7907742

Browse files
committed
RBGuileBridge.swift(hook_with_track): Remove and inline boring admin.
1 parent 2b5fbc8 commit 7907742

File tree

1 file changed

+4
-7
lines changed

1 file changed

+4
-7
lines changed

Spotiqueue/Classes/RBGuileBridge.swift

Lines changed: 4 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -47,11 +47,6 @@ public func track_to_scm_record(track: RBSpotifyItem) -> SCM {
4747
}
4848

4949
@objc class RBGuileBridge: NSObject {
50-
private static func hook_with_track(hook_name: String, track: RBSpotifyItem) {
51-
let track_record = track_to_scm_record(track: track)
52-
self.call_hook(hook_name: hook_name, args_list: scm_list_1(track_record))
53-
}
54-
5550
private static func call_hook(hook_name: String, args_list: SCM) {
5651
assert(Thread.isMainThread)
5752

@@ -76,11 +71,13 @@ public func track_to_scm_record(track: RBSpotifyItem) -> SCM {
7671
}
7772

7873
static func player_playing_hook(track: RBSpotifyItem) {
79-
self.hook_with_track(hook_name: "player-started-hook", track: track)
74+
self.call_hook(hook_name: "player-started-hook",
75+
args_list: scm_list_1(track_to_scm_record(track: track)))
8076
}
8177

8278
static func player_endoftrack_hook(track: RBSpotifyItem) {
83-
self.hook_with_track(hook_name: "player-endoftrack-hook", track: track)
79+
self.call_hook(hook_name: "player-endoftrack-hook",
80+
args_list: scm_list_1(track_to_scm_record(track: track)))
8481
}
8582

8683
static func player_paused_hook() {

0 commit comments

Comments
 (0)