about summary refs log tree commit homepage
path: root/lib
DateCommit message (Collapse)
2016-04-11player: "cue prev" reliably hits previous cue breakpoint
Seeking around a track should not be done relative to a previous seek, but should rather be analogous to the "tl prev" command to skip around the tracklist. I'm not sure what drugs I was on when I originally wrote this original version, but I'm fairly certain this is a bugfix and not intentional behavior.
2016-03-18sigevent/pipe: require file for DTAS::Nonblock properly
This fixes a bug introduced in 0.12.0 which only affects non-sleepy_penguin users. Fixes: d3cf61b05d95 ("switch to exception-free non-blocking I/O")
2016-02-09av_ff_common: fixes for libav-tools under Debian Jessie
Newer avprobe outputs a new format, fix our parser to workaround this while remaining compatible with the old one in Debian wheezy. Additionally, ffprobe is no longer available as a link to avprobe.
2016-01-25player: support "consume" mode for tracklist
When activated, this boolean deletes a song from the tracklist after it is played.
2016-01-25mlib: use more appropriate methods
.each on a Sequel dataset is more appropriate for the way we emit comments. And using Array#map! is more efficient when we do not need the original array.
2016-01-25mlib: support --force option
We will allow forcing updates since upgrading dependent software (e.g. sox, avprobe, ffprobe) may allow previously-ignored files to become support
2016-01-25mlib: support all formats of player
Almost, we will need to get a list of all suffixes supported by ffprobe or avprobe. This could prove tricky..
2016-01-25source/sox: try_to_fail_harder is a normal method
The @last_failed state is in the parent object, not the dup-ed object we fork off of.
2016-01-24source/sox: explicitly freeze comment keys
We load them frequently enough that the garbage is not worth it.
2016-01-24String#split with a single-byte instead of regexp
This reduces memory usage as a Regexp object is hundreds of bytes and a single-byte string object is only 40 bytes that is deduped within the VM.
2016-01-24player: avoid allocation on sort
Hash#keys already allocates a new array, so we may sort it in place without worrying about side effects and avoiding an extra allocation.
2016-01-17mlib: fix foreign-key ordering issues with delete
We need to ensure children and comments are all deleted before parents are.
2016-01-05tracklist: reshuffle tracklist when exhausted
For now, shuffle means "random without repeats". So avoid repeating ourselves by shuffling when we've reached the end of the shuffled tracklist and have no more tracks to go. Whenever a client restarts the player or hits the loop for repeat, we'll have a freshly shuffled list for them to listen to.
2016-01-05tracklist: fix off-by-one error on track removal
@pos is an array index, and should never go beyond the last element.
2016-01-05console: show tracklist shuffle status, too
We support this feature, so it should probably be shown along with the repeat status of the tracklist. Ensure we notify all of our listeners about the status change in player, too.
2016-01-04player: replaygain: avoid unnecessary ignoring
It is possible for a file to only have one of the ReplayGain tags we need and not the previous-required REPLAYGAIN_TRACK_GAIN tag. So do not reject the entire series of tags if a file has the one we want.
2016-01-02copyright updates for 2016
Using the 'update-copyright' script from gnulib[1]: git ls-files | UPDATE_COPYRIGHT_HOLDER='all contributors' \ UPDATE_COPYRIGHT_USE_INTERVALS=2 \ xargs /path/to/gnulib/build-aux/update-copyright [1] git://git.savannah.gnu.org/gnulib.git
2016-01-02source/splitfx: stringify comments
It's easier to leave numerics unquoted in YAML; so automatically stringify comments comming from the YAML file.
2015-12-31mlib: warn about non-SQLite databases becoming unsupported
For a music collection (even a large one), SQLite is sufficient and less overhead than all of Sequel.
2015-12-31dtas-console: show trim and "tl repeat" status
It probably makes sense for the -console user to know if tracklist repeat and trim are enabled. Have player emit these in "current" output and let the console client track them for now.
2015-12-31dtas-console: show paused track and time offset
When invoking the "current" command, the player now returns the first track + offset in the queue. This should make it easier to show what's paused or not.
2015-12-31player: frozen_string_literal fixup for "tl tracks"
Oops :x
2015-12-27splitfx: fixup frozen_string_literal for spawn
This only affected splitfx when it used the command option, and only when calling dtas-splitfx (not when playing splitfx files through the player).
2015-12-26remove vestigial mentions of opusenc
We removed support for opusenc back in May as it was not really suitable for audio production and a maintenance burden. ref: commit 7ca5d0bfc714c254c374af9cbc2e024a8b439725 ("splitfx: remove support for encoding opus")
2015-12-25enable "frozen_string_literal: true"
While we're in the area, make a wording change from "GPLv3 or later" to "GPL-3.0+", as the latter is favored by SPDX.org
2015-12-20mlib: fix update
We cannot use "dirname" in queries, oops :x
2015-12-16mlib: wire up search/find/stats to the UI
Not in any way a stable interface, yet, and still incomplete. This should emulate parts of the mpd protocol which should make it easier to debug and develop.
2015-12-15nodoc internal classes
DTAS does not expose any sort of public API for external users, so it will not be documented using RDoc. Currently all of our documentation is in plain-text or Markdown (only for manpages).
2015-12-14rg_state: fixup replaygain normalization
Oops, normalization is probably a forgotten feature...
2015-12-14player: implement software volume control
This is on a linear scale from 0.0 (mute) to 1.0 (no change) This is in the MPRIS spec and mpd as well (scaled to 0-100) This changes dtas-console key bindings (0/9) slightly to match mplayer more closely. ReplayGain preamp adjustment has moved from '0'/'9' to '7'/'8' keys. The 'm' key also toggles mute state (the pre-mute volume is stored in the dtas-console instance, not in dtas-player itself).
2015-12-14player: show "tracklist" hash with summary info with "current"
This allows clients to quickly query tracklist size/position/shuffle/random info.
2015-12-14tracklist: swap functionality
This (from the point of the client) will atomically swap two tracks. This should allow easily implementing of a tracklist editor.
2015-12-13unix_accepted: enable checking for readability after emit
Oops...
2015-12-13parse_time: enable frozen_string_literal
This is a new feature in Ruby 2.3 which can reduce allocations without adding ugly ".freeze" calls everywhere. This is a small enough file that we shouldn't have to worry about inadvertant breakage.
2015-12-13player: dump state file asynchronously when requested
This avoids stalling when we have a gigantic tracklist.
2015-12-13player: support "tl clear" internally
It is orders of magnitude more efficient to implement this in the player and very noticeable when using large playlists.
2015-12-13player: reduce I/O priority of connected clients
Do not batch processing of requests or buffered output. We cannot have clients running "dtas-tl cat" or similar to dump a gigantic playlist cause us to have gaps in our playback. Since we implemented a tunable tracklist limit, we can also remove the hardcoded 100 element limit for buffered messages while we're at it; now the tracklist limit affects maximum memory use.
2015-12-13mlib: split out the output format from the library
The caller should dictate how the output format goes, not the library.
2015-12-13mlib: add find/search functionality based on mpd
This allows fast-ish tag searching, but the internal API is still subject to change to ease emulation of mpd.
2015-12-13mlib: no kwargs for 1.9.3 compatibility
We'll continue supporting Ruby 1.9.3 as long as Debian wheezy is supported.
2015-12-13mlib: add stats support
These are the same stats used by the mpd "stats" command.
2015-12-13mlib: remove non-existent entries
Files in a music library may be deleted or renamed, so our library should not persist old data. Unfortunately this double-stats all files, but using a hash for temporary storage could also bloat memory/disk usage and probably isn't worth it at the moment.
2015-12-13switch to exception-free non-blocking I/O
Ruby 2.3 will have `exception: false' support in socket-related classes. Additionally, 2.3 will implement the existing IO#*_nonblock methods more efficiently than before by avoiding the hash allocation necessary for keywords. For users on older Rubies, we'll continue supporting them with compatibility wrappers; even Ruby 1.9.3 users (for now).
2015-12-13tracklist: fixup idempotent "tl shuffle false"
Disabling shuffle should be idempotent.
2015-12-07player: tl (repeat|shuffle|max) and trim swap values
It makes more sense to return the previous value rather than the newly-set one, since the user presumably knows what they're setting and might care about the previous value.
2015-12-07player: refactor and document tracklist interface
The dpc_tl method was becoming too large, split it up into sub-methods for easier readability. While we're at it, at least make "tl repeat" consistent with "tl shuffle" when setting new values.
2015-12-07tracklist: support limiting maximum tracklist size
This defaults to 16384? This is what mpd uses by default as well. Of course folks interacting with dtas-player directly can override this: dtas-tl max INTEGER dtas-tl max This is NOT meant to be a hard security measure for local users talking to dtas-player directly. It is only to prevent accidentally stupid things like flooding the playlist with a broken script and to prevent remote users from DoS-ing us via the to-be-written mpd proxy/emulation layer. Remember: dtas-player itself will ALWAYS remain capable of executing arbitrary code :)
2015-12-07tracklist: shuffle support
This is in the MPRIS 2.0 TrackList spec and also in mpd (as "repeat" mode), so we can probably support it directly in player to ease implementations of future wrappers.
2015-12-06tracklist: avoid needlessly building a hash for track IDs
Building this hash is a linear operation anyways, so there's no point in doing it when Array#index can stop early if the track is found, to avoid unnecessary work.
2015-12-05tracklist: do not mutate @list when serializing
This happens when "dtas-ctl state dump" is invoked manually; causing "dtas-tl cat" to break afterwards. Fixes: commit 7b065706d37df9e54c8b3299ce696545c6159fa4 ("tracklist: use lower number unique track IDs")