Module: Rockbox

Defined in:
lib/rockbox.rb,
lib/rockbox/types.rb,
lib/rockbox/client.rb,
lib/rockbox/errors.rb,
lib/rockbox/events.rb,
lib/rockbox/plugin.rb,
lib/rockbox/version.rb,
lib/rockbox/api/sound.rb,
lib/rockbox/transport.rb,
lib/rockbox/api/browse.rb,
lib/rockbox/api/system.rb,
lib/rockbox/api/devices.rb,
lib/rockbox/api/library.rb,
lib/rockbox/api/playback.rb,
lib/rockbox/api/playlist.rb,
lib/rockbox/api/settings.rb,
lib/rockbox/api/bluetooth.rb,
lib/rockbox/configuration.rb,
lib/rockbox/case_conversion.rb,
lib/rockbox/api/saved_playlists.rb,
lib/rockbox/api/smart_playlists.rb

Overview

Top-level convenience constructor — ‘Rockbox.new(host: “…”)` is a synonym for `Rockbox::Client.new(host: “…”)`.

Defined Under Namespace

Modules: Api, CaseConversion, ChannelConfig, InsertPosition, PlaybackStatus, RepeatMode, ReplaygainType, Type Classes: Client, Configuration, Error, EventEmitter, GraphQLError, HttpTransport, NetworkError, Plugin, PluginContext, PluginRegistry, WsTransport

Constant Summary collapse

Track =
Type.with(
  :id, :title, :artist, :album, :genre, :disc, :track_string, :year_string,
  :composer, :comment, :album_artist, :grouping,
  :discnum, :tracknum, :layer, :year, :bitrate, :frequency,
  :filesize, :length, :elapsed, :path,
  :album_id, :artist_id, :genre_id, :album_art
)
Album =
Type.with(
  :id, :title, :artist, :year, :year_string, :album_art, :md5,
  :artist_id, :copyright_message, :tracks
)
Artist =
Type.with(
  :id, :name, :bio, :image, :tracks, :albums
)
SearchResults =
Type.with(
  :artists, :albums, :tracks, :liked_tracks, :liked_albums
)
Playlist =
Type.with(
  :amount, :index, :max_playlist_size, :first_index,
  :last_insert_pos, :seed, :last_shuffled_start, :tracks
)
SavedPlaylist =
Type.with(
  :id, :name, :description, :image, :folder_id,
  :track_count, :created_at, :updated_at
)
SavedPlaylistFolder =
Type.with(:id, :name, :created_at, :updated_at)
SmartPlaylist =
Type.with(
  :id, :name, :description, :image, :folder_id, :is_system,
  :rules, :created_at, :updated_at
)
TrackStats =
Type.with(
  :track_id, :play_count, :skip_count, :last_played, :last_skipped, :updated_at
)
BluetoothDevice =
Type.with(
  :address, :name, :paired, :trusted, :connected, :rssi
)
VolumeInfo =
Type.with(:volume, :min, :max)
Device =
Type.with(
  :id, :name, :host, :ip, :port, :service, :app, :is_connected,
  :base_url, :is_cast_device, :is_source_device, :is_current_device
)
Entry =
Type.with(:name, :attr, :time_write, :customaction, :display_name)
ENTRY_DIR_BIT =

File-attribute bit set on directory entries.

0x10
SystemStatus =
Type.with(
  :resume_index, :resume_crc32, :resume_elapsed, :resume_offset,
  :runtime, :topruntime, :dircache_size,
  :last_screen, :viewer_icon_count, :last_volume_change
)
EqBandSetting =
Type.with(:cutoff, :q, :gain)
ReplaygainSettings =
Type.with(:noclip, :type, :preamp)
CompressorSettings =
Type.with(:threshold, :makeup_gain, :ratio, :knee, :release_time, :attack_time)
UserSettings =
Type.with(
  :music_dir, :volume, :balance, :bass, :treble, :channel_config, :stereo_width,
  :eq_enabled, :eq_precut, :eq_band_settings, :replaygain_settings, :compressor_settings,
  :crossfade_enabled, :crossfade_fade_in_delay, :crossfade_fade_in_duration,
  :crossfade_fade_out_delay, :crossfade_fade_out_duration, :crossfade_fade_out_mixmode,
  :crossfeed_enabled, :crossfeed_direct_gain, :crossfeed_cross_gain,
  :crossfeed_hf_attenuation, :crossfeed_hf_cutoff,
  :repeat_mode, :single_mode, :party_mode, :shuffle, :player_name
)
VERSION =
"0.1.0"

Class Method Summary collapse

Class Method Details

.directory?(entry) ⇒ Boolean

Returns:

  • (Boolean)


129
130
131
# File 'lib/rockbox/types.rb', line 129

def self.directory?(entry)
  (entry.attr.to_i & ENTRY_DIR_BIT) != 0
end

.new(**kwargs, &block) ⇒ Object



16
17
18
# File 'lib/rockbox.rb', line 16

def self.new(**kwargs, &block)
  block ? Client.build(&block) : Client.new(**kwargs)
end