Commit Graph

107 Commits (c9181f571fffc7170b4658164b23b2f49f365e1e)

Author SHA1 Message Date
Christopher Snowhill c9181f571f Better locking behavior for playlist storage
This should fix up potential locking issues with maintaining a copy of
the results set while certain other background actions may happen, such
as the player updating play counts while playing.

Signed-off-by: Christopher Snowhill <kode54@gmail.com>
2022-10-11 23:09:05 -07:00
Christopher Snowhill 47258b02b1 [Core Data] Add access locking
Apparently we need this to prevent Core Data from stomping on itself
when another thread accesses it.

Signed-off-by: Christopher Snowhill <kode54@gmail.com>
2022-07-15 07:00:11 -07:00
Christopher Snowhill 02f49093a3 Remove the meta string cache
It wasn't helping anyway.

Signed-off-by: Christopher Snowhill <kode54@gmail.com>
2022-07-08 16:34:50 -07:00
Christopher Snowhill dad9275a30 Ditch the data compression
It just wasn't working out.

Signed-off-by: Christopher Snowhill <kode54@gmail.com>
2022-07-08 16:34:50 -07:00
Christopher Snowhill 6222e25adc Experimental tag support redesign
This redesign completely changes how tags are stored in memory. Now all
arbitrary tag names are supported, where possible. Some extra work will
be needed to support arbitrary tags with TagLib, such as replacing it
with a different library.

Translation pending for a couple of strings.

Signed-off-by: Christopher Snowhill <kode54@gmail.com>
2022-07-08 16:34:50 -07:00
Christopher Snowhill ab285417ae [Album Art] macOS Ventura natively supports AVIF
Disable the compiled in AVIF support there, as the OS supports it
natively. Keep the libraries for older OSes.

Signed-off-by: Christopher Snowhill <kode54@gmail.com>
2022-07-05 23:44:35 -07:00
Christopher Snowhill 44fb1efc73 [Play Info] Implement track rating system
The track ratings are stored in the same stats table as the play counts.

Signed-off-by: Christopher Snowhill <kode54@gmail.com>
2022-06-28 01:59:36 -07:00
Christopher Snowhill 5c4cfb4053 [Play Counts] Fix counts for tracks with subsongs
Fix counts for tracks with subsongs from piling all the counts onto the
first subsong seen, by using the URL fragment in the filename check and
storage.

Signed-off-by: Christopher Snowhill <kode54@gmail.com>
2022-06-26 04:38:18 -07:00
Christopher Snowhill 5cb08291bf [Sandbox / Core Data] Refine global variable usage
Refine the global variable usage, eliminating double underscore prefixes
and trusting that static global variables will exist in the object where
the class was created. Got rid of that nasty NSApplication extension
hack that was previously in use.

Signed-off-by: Christopher Snowhill <kode54@gmail.com>
2022-06-21 00:01:07 -07:00
Christopher Snowhill 636fefaf6f [ReplayGain Info] Info strings are now localized
The strings are now part of the localized strings storage, which is
still awaiting a volunteer to add more translations to the app.

Signed-off-by: Christopher Snowhill <kode54@gmail.com>
2022-06-18 23:45:18 -07:00
Christopher Snowhill a0a5106e51 [Play Counts] Now correctly reports last seen time
Correctly reports last seen time, instead of reporting the first seen
time twice.

Signed-off-by: Christopher Snowhill <kode54@gmail.com>
2022-06-18 23:44:29 -07:00
Christopher Snowhill a2d8e0ec42 [Track Info] Add play count tabulation and display
Add play count data collection, including first seen times for every
file first added to the playlist. Data is indexed by album, artist, and
title, or by filename, whichever matches first. Add interfaces to
AppleScript automation definition as well.

Signed-off-by: Christopher Snowhill <kode54@gmail.com>
2022-06-18 23:00:08 -07:00
Christopher Snowhill 41d4c7458e [Translations] Load PlaylistEntry error messages
These error messages should be loaded from the main bundle, where the
class is located.

Signed-off-by: Christopher Snowhill <kode54@gmail.com>
2022-06-18 16:16:43 -07:00
Christopher Snowhill 1c2ecc1c7c [Playlist] Handle invalid files in a better way
Invalid files may include nil URLs, which should be skipped or stop
playback altogether. Invalid files will be marked as an error, and
stop playback.

Signed-off-by: Christopher Snowhill <kode54@gmail.com>
2022-06-18 16:09:41 -07:00
Christopher Snowhill 39f4d09c1a Use NSNumber Literals as much as possible
Replaced a bunch of [NSNumber numberWith...] with NSNumber Literals.

Signed-off-by: Christopher Snowhill <kode54@gmail.com>
2022-06-17 06:39:02 -07:00
Christopher Snowhill 4e782807d8 [ReplayGain / Volume] Fix default volume value
Fix the default volume scale reading for newly added tracks, as this
value should be 1 for any files which do not have tags. Also add an
override to the tag applying function, to reset the default on tag
re-read operations.

Please reload the tags or re-add your files to fix them playing
silently.

Signed-off-by: Christopher Snowhill <kode54@gmail.com>
2022-06-16 23:31:34 -07:00
Christopher Snowhill 789e8e432e [Playlist Storage] Add another compatibility hook
Add a compatibility getter/setter for URL, which was renamed to url, due
to Core Storage having a requirement of all attributes starting with a
lower case letter.

Signed-off-by: Christopher Snowhill <kode54@gmail.com>
2022-06-16 17:43:48 -07:00
Christopher Snowhill c71021fc9b [Metadata] Fix assigning Unsigned property
The PlaylistEntry class needs a compatibility wrapper for the Unsigned
member, as it is assigned by all of the inputs. Case sensitivity and all
that is. And unfortunately, Core Data requires all model members to
start with a lower case letter.

Signed-off-by: Christopher Snowhill <kode54@gmail.com>
2022-06-16 17:05:52 -07:00
Christopher Snowhill 72c4dddf18 [Clipboard] Add textual data to clipboard on copy
The copy action now includes formatted text of the selected entries when
copying, in addition to the supported file and URL types.

Signed-off-by: Christopher Snowhill <kode54@gmail.com>
2022-06-16 07:18:28 -07:00
Christopher Snowhill 4c95c943ef [Playlist Storage] Rewrite to use Core Data
Completely rewrite the playlist storage once again, this time with a
much faster Core Data implementation. It still uses a little magic for
Album Artwork consolidation, but string consolidation doesn't seem to be
needed to reduce the disk storage size. Works much faster than my silly
implementation, too.

Old implementations are still kept for backwards compatibility with
existing playlists.

Signed-off-by: Christopher Snowhill <kode54@gmail.com>
2022-06-16 07:14:33 -07:00
Christopher Snowhill 0f10543566 Improve spam formatting string in two ways
For one thing, improve it so that if the tracknumber field is present,
but zero, it doesn't show the number sign in the spam. For the second,
only show the track artist field if it differs from the album artist.

Signed-off-by: Christopher Snowhill <kode54@gmail.com>
2022-02-26 01:10:27 -08:00
Christopher Snowhill 3de43b55a7 Significantly reduce memory usage all around
Added a string dictionary for deduplication of metadata, and actually
initialize both it and the art dictionary on startup, so they actually
work like they should.

Signed-off-by: Christopher Snowhill <kode54@gmail.com>
2022-02-16 16:57:47 -08:00
Christopher Snowhill b8057b7c29 Add support for AVIF album artwork
Import libavif and libaom, specifically built only for decoding, not
encoding.

Signed-off-by: Christopher Snowhill <kode54@gmail.com>
2022-02-16 01:52:51 -08:00
Christopher Snowhill bf88c57454 Minor artwork caching changes
Art ID should be set on new files when they are stored into the
database, and the album art property should be affected by assigning to
the artId property, since it affects the caching identifier.

Signed-off-by: Christopher Snowhill <kode54@gmail.com>
2022-02-10 22:45:26 -08:00
Christopher Snowhill 740fdfa883 Attempt to wrangle memory usage from artwork
Now cache around NSData objects of individual pieces of album art,
unique by their byte contents. And the artwork image cacher will also
use the art ID keys from the database as the cache keys for NSImages,
so they'll not only be only read once per unique image, but also tracks
can have unique artwork per track, if the files so feature it.

Signed-off-by: Christopher Snowhill <kode54@gmail.com>
2022-02-10 22:37:37 -08:00
Christopher Snowhill 39dcb88728 FFmpeg input: Support reading metadata
Where TagLib is not being employed, use FFmpeg to read tags where
possible. This allows reading tags from files like IFF. It reads it
through properties, otherwise allowing tag readers to function like
usual.

Signed-off-by: Christopher Snowhill <kode54@gmail.com>
2022-02-10 15:29:13 -08:00
Christopher Snowhill 64c4aa2e25 Handle deleting the current track gracefully
Now it should flow playback correctly to the next remaining track after
the block of deleted tracks. And if the user deletes the next queued
track, it will still be queued to flow past the deleted block. If the
user undoes their deletes and restores the tracks, playback will resume
after the originally deleted track.

Signed-off-by: Christopher Snowhill <kode54@gmail.com>
2022-02-09 21:04:17 -08:00
Christopher Snowhill 6120fce40a Metadata: Fix length field on track reloading
This fixes the dynamic length field not updating correctly after a track
info reload, which breaks the seekbar when reloading the current track.

Fixes #227

Signed-off-by: Christopher Snowhill <kode54@gmail.com>
2022-02-07 03:03:39 -08:00
Christopher Snowhill 95fb65527f Playlist Entry / SQLite: Add channel config field
Add channel config field to PlaylistEntry and the SQLite backing store.

Signed-off-by: Christopher Snowhill <kode54@gmail.com>
2022-02-07 01:11:30 -08:00
Christopher Snowhill 85c7073649 Reformat my own source code with clang-format
Signed-off-by: Christopher Snowhill <kode54@gmail.com>
2022-02-06 21:49:27 -08:00
Christopher Snowhill 2541633c17 Playlist Entry: Display full URL for remotes
For Playlist Entries that are not File URLs, return the full absolute
URL for path queries, so the playlist path column will show the full
URL instead of a useless reduced path string.

Fixes #214.

Signed-off-by: Christopher Snowhill <kode54@gmail.com>
2022-01-27 00:11:14 -08:00
Christopher Snowhill 8e5c62f185 Info Inspector: Now displays ReplayGain info as tooltip for status text 2022-01-22 20:44:06 -08:00
Christopher Snowhill 5bf5830b17 Info Inspector: Now displays ReplayGain tag presence 2022-01-21 23:49:07 -08:00
Christopher Snowhill 9bfc51cbf4 Info Inspector: Add field to display whether a track has an embedded CUE Sheet 2022-01-21 23:19:32 -08:00
Christopher Snowhill 0c4d5002f6 Metadata: Now supports storing cuesheet tags and encoding quality status properties 2022-01-21 22:38:54 -08:00
Christopher Snowhill 2165d37144 Metadata: Now supports disc number field where possible 2022-01-21 21:49:17 -08:00
Christopher Snowhill 6f0f9d7617 Playlist Entry: Made copy contsructor proper 2022-01-20 14:54:42 -08:00
Christopher Snowhill ba5f5b8694 Playlist Entry: Made object copyable 2022-01-19 23:23:17 -08:00
Christopher Snowhill 74cd0f7da9 SQLite playlist store: Greatly improved performance of playlist sync operations 2022-01-14 22:42:57 -08:00
Christopher Snowhill d24a01a637 Implemented basic embedded CueSheet support 2022-01-14 16:46:35 -08:00
Christopher Snowhill 2445cc94a9 - Retrieve profile paths properly instead of hard coding
- Display playlist total duration in units up to weeks and down to just seconds, and only pluralize units as necessary
- Major change: Implemented a SQLite disk backed playlist, track data, and queue storage system, which will be synchronized from the player in real time, and will hopefully survive system or app crashes. Existing plist playlist will be imported on first run, and removed on shutdown.
2021-12-24 01:01:21 -08:00
Christopher Snowhill fdae7eec21 File info: Implemented support for Album Artist and Codec fields 2021-10-01 19:18:42 -07:00
Christopher Snowhill 13bd399b31 Clean up most warnings and update some dependencies 2021-04-29 18:16:24 -07:00
Christopher Snowhill 505b8c3140 Fix playlist entry to return 0 length instead of NaN when metadata hasn't loaded yet. 2018-09-22 03:11:13 -07:00
Chris Moeller 0e3644177e Updated everything else to ARC, and plugged a release cycle. 2016-05-05 13:05:39 -07:00
Chris Moeller da26e6757b Implemented a distributed notification for track information and playback status 2014-12-03 22:13:27 -08:00
Chris Moeller 754a22166a XML playlists now store album art in an MD5 hash indexed dictionary, but continue to read the older format for backwards compatibility 2013-10-09 16:14:23 -07:00
Chris Moeller 555ccc9e87 Now storing all album art internally as its original format and synthesizing NSImage objects on demand 2013-10-09 13:53:13 -07:00
Chris Moeller 2837b12d32 Fix unsigned reporting, and can't match unsigned type declaration exactly 2013-10-07 11:26:23 -07:00
Chris Moeller 74b6188772 Implemented floating point sample format support into CogAudio and all relevant plug-ins 2013-10-05 14:15:09 -07:00