Commit Graph

183 Commits

Author SHA1 Message Date
Bryan Schumaker
1c58e948b8 Library set_attr art
I can use the library's set_attr() function to manually set album art
from a local file.
2010-11-28 00:34:35 -05:00
Bryan Schumaker
3a19f6fb07 Albumart set from local file
I can pass the file location to the lastfm module to set the artwork
from a local file rather than from a web location.
2010-11-28 00:31:23 -05:00
Bryan Schumaker
70a2759192 Cache delete items
I can now delete things from the cache in addition to adding things.
2010-11-28 00:29:36 -05:00
Bryan Schumaker
fed3c7f356 Import old library
I can now import files from an Ocarina 4.1 library exported as xml.
Ocarina 4.2 keeps track of a list of sources, but 4.1 does not.  For
importing to work properly, the library needs to be rescanned before
running the import.  The import will set the playcount and score
attributes for each file.
2010-11-27 23:11:16 -05:00
Bryan Schumaker
13edf01abe Library set_attr
The library now has a way to set attributes in each track record.
Note: There is currently no way to change artist, album, title or
filepath.
2010-11-27 23:10:27 -05:00
Bryan Schumaker
3831eb6e2a User can pass files to open
If the user passes text as argv to the program, we will call
universal_open with each string in argv.
2010-11-27 22:22:44 -05:00
Bryan Schumaker
594f2dd054 URL character escaping
Only escape a subset of the characters when placing a url request.
2010-11-27 20:04:57 -05:00
Bryan Schumaker
6a5176d5d7 Initialize controls in two parts
This gives us a chance to initialize random early, and then grab the
audio functions later (when they exist)
2010-11-27 15:38:48 -05:00
Bryan Schumaker
1e2d27377f Progress bar tooltip
The tooltip shows the time corresponding to the mouse location on the
widget.
2010-11-27 12:48:09 -05:00
Bryan Schumaker
f23fc65cc5 Save recently played songs
In addition to the playlist, I am also saving the list of recently
played songs between sessions.
2010-11-27 10:47:31 -05:00
Bryan Schumaker
333cbaeb37 Remove from playlist
I can now remove songs from the playlist.
2010-11-27 10:38:42 -05:00
Bryan Schumaker
cd91638f9c Playlist deduplication
We shouldn't add the same song to the playlist twice.  The song id set
we are keeping helps with this.
2010-11-27 10:34:08 -05:00
Bryan Schumaker
ba4488202a Teased apart old ocarina.collection code
The new code is easier to read, and much less intimidating.  I also
changed the Library() and Playlist() classes into python modules to make
them easier to read.
2010-11-26 23:31:12 -05:00
Bryan Schumaker
d690904b3b Fix playlist saving
The playlist was trying to save itself using the old save functions
2010-11-26 16:46:26 -05:00
Bryan Schumaker
fb24259b4a Library multiple sources list
Tracking multiple sources makes more sense as a list, rather than an
FSTree().
2010-11-26 10:56:44 -05:00
Bryan Schumaker
933e961d34 Move set_volume() and toggle_rand() 2010-11-23 21:10:22 -05:00
Bryan Schumaker
604d602448 Move stop features to libsaria.controls.py 2010-11-23 20:50:57 -05:00
Bryan Schumaker
c8c79272b6 Moved play and pause to libsaria/controls.py
They have been moved from libsaria/audio/__init__.py.
2010-11-23 20:44:37 -05:00
Bryan Schumaker
1d609c5606 Add libsaria/controls.py
I will eventually be moving things over to here.  The general rule: if
it has to do with buttons on the gui, then it should probably be
considered a control.
2010-11-23 20:37:24 -05:00
Bryan Schumaker
717c36b78e init_pref returns value
When I initialize a preference, the actual value of the preference
should be returned to the caller.
2010-11-23 19:48:17 -05:00
Bryan Schumaker
a84ddabf31 Move lastfm to path/ 2010-11-20 10:05:12 -05:00
Bryan Schumaker
42948165a3 Move generic saving / loading functions
These belong under path/
2010-11-20 10:01:25 -05:00
Bryan Schumaker
751af55575 Move cache into path/
The cache modifies files, so it can be part of path/
2010-11-20 09:54:14 -05:00
Bryan Schumaker
c6f48165f3 Moved backup.py to path/
This moves the backup functions to a more reasonable place.
2010-11-20 09:51:11 -05:00
Bryan Schumaker
a88f8225a7 Web remote controls
I can play, pause, stop, and advance to the next song through the web
interface.
2010-11-19 22:47:41 -05:00
Bryan Schumaker
9f20a17228 url formatting: don't escape the quote
We don't need to do this.  It causes problems with last.fm
2010-11-17 23:32:23 -05:00
Bryan Schumaker
2ab7ace608 library tag accessor functions
I have created functions to make it easy to get at titles and song ids
from known tags.
2010-11-17 23:31:02 -05:00
Bryan Schumaker
3eff3c6aee lastfm return None on error
lastfm album art fetching should return None if there is a problem
opening the image url.
2010-11-17 23:29:51 -05:00
Bryan Schumaker
849f071d58 Get artist and album lists from the library
This patch makes it easy to get an artist or album list out of the
library.
2010-11-16 23:03:01 -05:00
Bryan Schumaker
629f940796 Import trees from libsaria.trees 2010-11-16 23:02:35 -05:00
Bryan Schumaker
f8e8837d3c Get artwork by (artist, album)
This makes it easier to find artwork using (artist, album) as a key.
This will probably be the best way to use artwork in the web interface.
2010-11-16 23:01:19 -05:00
Bryan Schumaker
778945fea5 Added basename() to path
This will be useful for finding the file referred to by a path.
2010-11-16 21:14:45 -05:00
Bryan Schumaker
4f1b1d0162 Moved libsaria.path to a package
This is the beginning of moving file related code into a single package
and out of the main libsaria directory.
2010-11-16 08:19:23 -05:00
Bryan Schumaker
f13e10e862 Make sure playlist is initialized properly
This stops an error when ocarina is run with an empty library.  Because
the library is empty, the playlist was never being initialized.
2010-11-15 21:30:58 -05:00
Bryan Schumaker
971238ddf2 Removed Table() class
I don't know why this wasn't removed earlier.  It hasn't been used since
Ocarina 4.0
2010-11-15 21:12:37 -05:00
Bryan Schumaker
40597b9cb3 Removed Map()
I don't need the Map() class anymore
2010-11-15 21:12:03 -05:00
Bryan Schumaker
5650f2d750 Finish new prefrences moveover
I have renamed libsaria.prefs2 to libsaria.prefs
2010-11-15 21:11:12 -05:00
Bryan Schumaker
4335c1a111 Volume through new preferences tree
The volume is now controlled through the preferences tree.
2010-11-15 08:29:25 -05:00
Bryan Schumaker
3cd7f4b20f Random new preferences
The random feature uses the new preferences tree, rather than the
preferences map.
2010-11-15 08:24:45 -05:00
Bryan Schumaker
5a02227e99 Ocarina window new preferences tree
The main window will set its size based on the new preferences tree,
instead of the old preferences map.
2010-11-15 08:17:31 -05:00
Bryan Schumaker
38026a43c5 Optimize rand_candidate
The set of searchable songs shouldn't change while selecting songs.  We
can determine which list of songs to look at up front and always use
that as an argument to rand_candidate()
2010-11-14 19:32:47 -05:00
Bryan Schumaker
a53f2740c3 Correctly get the preference tree when initializing 2010-11-14 17:50:37 -05:00
Bryan Schumaker
a95e94936d Load preference trees
Preference trees should be able to load from disk if associated with a
file.
2010-11-14 17:49:23 -05:00
Bryan Schumaker
63211fb1c8 Libsaria initialization
I now initialize libsaria during import, rather than as a separate step
afterwards.
2010-11-14 17:32:09 -05:00
Bryan Schumaker
b8d6d918a1 libsaria.collection cleanup
I found more places using libsaria.collection instead of
libsaria.sources
2010-11-14 17:31:32 -05:00
Bryan Schumaker
8fb2b45ac8 Add prefs2 variable / remove vars
The prefs2 structure is where I will store my new tree-based
preferences.  I'll use this for now until everything gets moved over.  I
also remove the vars variable since nothing uses it.
2010-11-14 17:29:31 -05:00
Bryan Schumaker
5594825502 Preference trees
Preference trees are used to store various preferences.  Each component
can have its own set of preferences that use overlapping names.
2010-11-14 17:26:52 -05:00
Bryan Schumaker
6124296f70 libsaria sources change
Change files to reflect the rename of libsaria.collection to
libsaria.sources
2010-11-14 13:50:35 -05:00
Bryan Schumaker
fe787dfd6b Rename libsaria.collection to libsaria.sources 2010-11-14 13:50:10 -05:00
Bryan Schumaker
9167e6441c Quit plugins on exit
Plugins should have a chance to clean up after themselves when we are
shutting down.
2010-11-13 21:38:16 -05:00