about summary refs log tree commit homepage
path: root/lib/dtas/mlib.rb
DateCommit message (Collapse)
2020-02-03doc: update copyrights for 2020
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] https://git.savannah.gnu.org/git/gnulib.git
2019-01-02dtas 0.16.0 v0.16.0
A bunch of minor fixes and cleanups accumulating for the past two years since the last release. It's tough to remember to make releases when I'm always running the latest version from git :x Most notably, "io_splice" is no longer used for dtas-linux users since "sleepy_penguin" includes all the functionality we use. This is to reduce memory overhead from extra DSOs(*) There's also some deprecation warning fixes for the still-undocumented "dtas-mlib" command. 12 changes since v0.15.0 (2017-04-07): pipeline: new module for running process pipelines console: ensure time calculations are done in UTC Rakefile: update path for uploads player: support guessing encodings for comments get rid of Windows-31J regexps mlib: compatibility with Sequel 5.x mlib: remove redundant tag massaging and encoding mlib: use flock to get around SQLite busy errors mlib: ignore files with nil times dtas/watchable: check SystemCallError mlib: fix unused variable warning use sleepy_penguin 3.5+ for splice and tee support (*) https://udrepper.livejournal.com/8790.html
2019-01-02mlib: fix unused variable warning
2018-01-30mlib: ignore files with nil times
It happens with some video files, apparently.
2018-01-30mlib: use flock to get around SQLite busy errors
The SQLite busy waiting scheme isn't great for usability and the busy timeout is done by sleep+backoff. I prefer to say we only support filesystems with flock() for our little DB.
2018-01-29mlib: remove redundant tag massaging and encoding
Redundant since ("player: support guessing encodings for comments")
2018-01-29mlib: compatibility with Sequel 5.x
Apparently some degree of thread-safety is being enforced; not sure I agree, but oh well...
2018-01-29get rid of Windows-31J regexps
Oops, a Perlism crept in :x
2017-03-02deduplicate strings using String#-@ (uminus) in Ruby 2.5+
This is faster than relying on eval() for older Rubies. https://bugs.ruby-lang.org/issues/13077 Ruby 2.5 is targetted for release in December 2017.
2016-12-27http -> https, and relocate homepage to https://80x24.org/dtas/
HTTPS allows some level of security(*) and we've actually supported it on 80x24.org for many months, now. So, point new readers to it. Moving away from hostname-based homepages will allow us to save on subjectAltName space (and bandwith) when negotiating an HTTPS connection. We'll also have an .onion mirror for Tor users, soon, too; in case we can't afford to pay ICANN in the future. (assuming TLS libraries don't have any more Heartblead-level bugs in them, CAs aren't compromised, MITM HTTPS stripping proxies don't get in your way, and your certificate bundle isn't compromised).
2016-11-26mlib: use transaction for removing stale entries
This ought to avoid busy DB errors.
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-17mlib: fix foreign-key ordering issues with delete
We need to ensure children and comments are all deleted before parents are.
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
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-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-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-11-28dtas-mlib: add dump support for debugging
Using an RFC-822-like format since YAML quoting rules aren't very human-friendly, and we already prevent newlines from entering our DB anyways.
2015-11-22introduce dtas-mlib for music library functions
Eventually this will support searching and be the basis of an mpd-compatible proxy in front of dtas-player