Commit graph

90 commits

Author SHA1 Message Date
Adrian Sampson
633b97b302 decode unicode art paths from legacy databases 2010-08-06 10:44:00 -07:00
Adrian Sampson
898b4bd24e destination now uses album values when available
When computing track destination paths, we now look for album-level values when
they're available. This has the effect of making albums go into a single
directory even when their tracks have heterogeneous metadata. We will need to
revisit this once we start explicitly supporting non-album tracks.
2010-08-06 10:36:17 -07:00
Adrian Sampson
181949d1a3 _sanitize_path now uses a non-unicode regex 2010-08-06 10:01:49 -07:00
Adrian Sampson
d1c6448da8 album art paths now stored in blobs in database 2010-08-06 09:55:21 -07:00
Adrian Sampson
2a91ddf40b destinations now return bytestring paths 2010-08-05 13:36:50 -07:00
Adrian Sampson
2950ae1bf6 all paths are now bytestrings (not unicode)
In the end, after all of this, it turns out that we basically need to abandon
the temptation of dealing with unicode paths altogether. The POSIX filesystem
API has no notion of unicode and is very much a bytes-only interface. This
means that undecodable pathnames are a reality we must deal with. This new
approach stores all paths as buffers (blobs) in SQLite and -- as transparently
as possible -- presents them as str objects to the Python code. Legacy
databases will have their paths automatically encoded into str objects, and
will lazily have their unicodes in the database replaced with buffers.
2010-08-05 13:26:30 -07:00
Adrian Sampson
2eb10e391a add "format" field to MediaFile for getting the file type
This allows using $format in your path format string, which is nice.
2010-07-21 23:01:32 -07:00
Adrian Sampson
11c9b7fad9 move album/art file tests to test_files from test_db 2010-07-21 16:11:08 -07:00
Adrian Sampson
e9e90fa538 expand set of album metadata to include everything relevant 2010-07-15 11:22:36 -07:00
Adrian Sampson
7816b411ad simplified interface for add_album 2010-07-14 23:04:59 -07:00
Adrian Sampson
6b99e3f48d importer now takes album art config options and switch
(doesn't yet actually apply art)
2010-07-14 14:58:17 -07:00
Adrian Sampson
6a3c024005 add_art convenience function takes care of copying to destination 2010-07-14 14:28:54 -07:00
Adrian Sampson
304e4d6708 albums move and remove their items, manage album art 2010-07-14 14:19:51 -07:00
Adrian Sampson
19ded256cd albums query and modify their associated items 2010-07-14 13:24:11 -07:00
Adrian Sampson
3006f9953c beginnings of explicit album management 2010-07-14 12:40:25 -07:00
Adrian Sampson
5096a12052 basic (non-collected) implementation of albums table 2010-07-13 19:42:45 -07:00
Adrian Sampson
bdbabe91da basic album information access through proxy object 2010-07-13 18:01:14 -07:00
Adrian Sampson
5d4f452393 add "albums" table to library database (including migrations) 2010-07-13 10:25:42 -07:00
Adrian Sampson
30669fd7ac replace :s with -s instead of _s in path names 2010-07-11 19:12:50 -07:00
Adrian Sampson
4378db1361 more characters escaped on Windows 2010-07-11 18:14:40 -07:00
Adrian Sampson
aec7bef504 add MusicBrainz ID fields to database schema 2010-07-10 17:53:51 -07:00
Adrian Sampson
f4d7d68e57 rudimentary migration (column adds only) support 2010-07-10 17:37:33 -07:00
Adrian Sampson
a0bf6112ae remove dead code: add_path 2010-07-05 21:15:28 -07:00
Adrian Sampson
ed51369dce track ordering now always uses bipartite matching algorithm, no longer assumes
current metadata to be correct if it's complete

Previously, we were using the Munkres algorithm (minimum bipartite matching) to
order tracks intelligently only as a fallback if the current metadata was
paradoxical or incomplete. This was because of a concern about the performance
of the potentially-O(n^3) Munkres solver. However, it was found that (a) the
performance is actually not bad, taking on the order of 0.02 to perform a
matching, and (b) there was no recourse for the tagger to reorder tracks that
were legitimately in the wrong order. Now, we get intelligent reordering of
badly tagged music even when the metadata seems to be complete.

To retain some of the functionality of the old orderer, the track distance
metric was expanded to include a component reflecting the track index.

In doing this, another bug was discovered in the UI that showed the track name
differences based on an arbitrary ordering. Now, the tag_album function returns
a reordered items list with every candidate.
2010-05-30 23:52:54 -07:00
Adrian Sampson
67c4ec9507 change to MIT license
--HG--
rename : COPYING.txt => LICENSE.txt
2010-05-28 00:07:11 -07:00
Adrian Sampson
f6a0345786 intuitive field restrictions on text queries for browsing functions 2010-04-10 13:17:44 -07:00
Adrian Sampson
38801813be Item no longer retains a Library (changed constructors)
--HG--
branch : device
2010-04-06 11:45:31 -07:00
Adrian Sampson
68d43380b4 remove remaining library-interaction methods from Item
--HG--
branch : device
2010-04-06 11:36:00 -07:00
Adrian Sampson
4d1944f939 better names: add vs. add_path
--HG--
branch : device
2010-04-06 10:17:53 -07:00
Adrian Sampson
d3d485195c move destination calculation to Library from Item
--HG--
branch : device
2010-04-06 10:07:58 -07:00
Adrian Sampson
4280760191 truncate long filenames 2009-11-28 17:03:36 -08:00
Adrian Sampson
a348e19112 moved per-library settings to config file 2009-11-27 21:18:20 -08:00
Adrian Sampson
71c5141f80 correct super-attribute behavior 2009-11-17 23:15:51 -08:00
adrian.sampson
60848d85ee added GPL license and accompanying notice
--HG--
extra : convert_revision : svn%3A41726ec3-264d-0410-9c23-a9f1637257cc/trunk%40197
2009-04-09 02:46:22 +00:00
adrian.sampson
b1a45fda0b added bitrate and length to mediafile
--HG--
extra : convert_revision : svn%3A41726ec3-264d-0410-9c23-a9f1637257cc/trunk%40119
2009-02-07 04:13:36 +00:00
adrian.sampson
1294d573d6 dded full date access to MediaFile (yyyy-mm-dd)
--HG--
extra : convert_revision : svn%3A41726ec3-264d-0410-9c23-a9f1637257cc/trunk%4085
2008-08-04 05:46:44 +00:00
adrian.sampson
fb4344e937 item fields no longer dirtied if unchanged when assigned
This is especially important for read(), which will assign many times while, in many cases, causing few actual changes. A store() that follows soon after will now be much more lightweight.

--HG--
extra : convert_revision : svn%3A41726ec3-264d-0410-9c23-a9f1637257cc/trunk%4079
2008-07-09 21:44:15 +00:00
adrian.sampson
e811b72763 fixed but with copying in library.add, tests
--HG--
extra : convert_revision : svn%3A41726ec3-264d-0410-9c23-a9f1637257cc/trunk%4078
2008-07-08 00:06:56 +00:00
adrian.sampson
4ba801acb7 paths now normalized to absolute (issue 5)
--HG--
extra : convert_revision : svn%3A41726ec3-264d-0410-9c23-a9f1637257cc/trunk%4076
2008-07-07 22:13:52 +00:00
adrian.sampson
cd124d2dad new tests for DB and file operations
Also, new organization for tests and automatic loader. Fixed bugs uncovered by new tests.

--HG--
extra : convert_revision : svn%3A41726ec3-264d-0410-9c23-a9f1637257cc/trunk%4069
2008-07-07 05:23:17 +00:00