Commit Graph

3428 Commits

Author SHA1 Message Date
Bryan Schumaker 7f82a08a3a 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-12-03 08:30:12 -05:00
Bryan Schumaker de31941af1 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-12-03 08:30:12 -05:00
Bryan Schumaker 2cd2f4f742 pause_after.py undefined do_pause error 2010-12-03 08:30:12 -05:00
Bryan Schumaker 83ebf78d2b Tree prefs test persistance 2010-12-03 08:30:12 -05:00
Bryan Schumaker 0b8223d224 Correctly get the preference tree when initializing 2010-12-03 08:30:12 -05:00
Bryan Schumaker 80d91c3b60 Load preference trees
Preference trees should be able to load from disk if associated with a
file.
2010-12-03 08:30:12 -05:00
Bryan Schumaker e56d2b807e Tree prefs test
This was used for developing the preferences tree.
2010-12-03 08:30:12 -05:00
Bryan Schumaker e7fc59a877 Libsaria initialization
I now initialize libsaria during import, rather than as a separate step
afterwards.
2010-12-03 08:30:12 -05:00
Bryan Schumaker 1c5b1b85ba libsaria.collection cleanup
I found more places using libsaria.collection instead of
libsaria.sources
2010-12-03 08:30:12 -05:00
Bryan Schumaker fcae32cec0 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-12-03 08:30:12 -05:00
Bryan Schumaker 0716c7a79c Preference trees
Preference trees are used to store various preferences.  Each component
can have its own set of preferences that use overlapping names.
2010-12-03 08:30:12 -05:00
Bryan Schumaker ac96553e25 Pause after in local variable
The pause after current track plugin should store its variables in
something local to the plugin and not in the libsaria.vars map.
2010-12-03 08:30:12 -05:00
Bryan Schumaker 701306fef6 libsaria sources change
Change files to reflect the rename of libsaria.collection to
libsaria.sources
2010-12-03 08:30:12 -05:00
Bryan Schumaker caeb77e58c Rename libsaria.collection to libsaria.sources 2010-12-03 08:29:16 -05:00
Bryan Schumaker e8fabe3401 Bind remote server by ip address
This should worke better than binding by hostname or 'localhost'
2010-12-03 08:29:16 -05:00
Bryan Schumaker 880e621fcb Make remote visible to outside world
I have to use socket.gethostname() to make the remote server available
to the outside world.
2010-12-03 08:29:16 -05:00
Bryan Schumaker 4672711a47 Added remote plugin
This plugin will allow me to control Ocarina using an app on another
computer.
2010-12-03 08:29:16 -05:00
Bryan Schumaker eaa4d65a06 Began working on a web remote plugin
This plugin will eventually allow me to control ocarina through a web
interface.  So far, it can serve up web pages located in
current_working_directory/HTML.
2010-12-03 08:29:16 -05:00
Bryan Schumaker 53908f3b1e Quit plugins on exit
Plugins should have a chance to clean up after themselves when we are
shutting down.
2010-12-03 08:29:16 -05:00
Bryan Schumaker eae86f2dae current working directory function
This has been added to libsaria.path as libsaria.path.cwd()
2010-12-03 08:29:16 -05:00
Bryan Schumaker 33749eeb58 Add export button to gui
The button doesn't do much unless one is created and displayed
somewhere...
2010-12-03 08:29:16 -05:00
Bryan Schumaker c4738482b7 Remove old collection code and files 2010-12-03 08:29:16 -05:00
Bryan Schumaker 11e1caefe2 Random song from playlist
I can once again play random songs from the playlist.
2010-12-03 08:29:16 -05:00
Bryan Schumaker 1190fd45cc Playlist next()
The playlist can play the next song in the playlist.
2010-12-03 08:29:16 -05:00
Bryan Schumaker 587844cb4e libsaria.music doesn't exist anymore
It has been renamed libsaria.audio, so the end-of-song function should
be changed to reflect this.
2010-12-03 08:29:16 -05:00
Bryan Schumaker f8dd01a54c Tree lookup
Lookup will follow a path and return whatever node it is pointing to.
2010-12-03 08:29:16 -05:00
Bryan Schumaker 263cfde85d find attr filepath correctly
The attribute filepath is easier now that I can walk a fs_tree backwards
and get a path back.
2010-12-03 08:29:16 -05:00
Bryan Schumaker f7a963cab1 Easy file_to_id()
file_to_id() can stat the filepath to find the inode number (aka the
song id).  This is much easier than doing a bunch of lookups.  What I
really want to do eventually is get rid of file_to_id()...
2010-12-03 08:29:15 -05:00
Bryan Schumaker 18e9c7e135 Library indexing
I can now add artist / album / title of each song to an index in the
library.
2010-12-03 08:29:15 -05:00
Bryan Schumaker d5d97e502a Library get_attr values
We should walk the tag values bacwards, rather than using the normal
walk_backwards function.
2010-12-03 08:29:15 -05:00
Bryan Schumaker 8aaeffaa7e Tags in DLValTree
I store the tags in a doubly-linked value tree from now on.
2010-12-03 08:29:15 -05:00
Bryan Schumaker 2949535aba Val trees walk values
Val trees can walk through their values in addition to their paths.  A
doubly-linked val tree can also walk values backwards.
2010-12-03 08:29:15 -05:00
Bryan Schumaker fe449ffea4 Value Trees
Value trees store a value in addition to the path.  They come in normal
and doubly-linked flavors.
2010-12-03 08:29:15 -05:00
Bryan Schumaker f29c57992a Library FSTrees and unique ids
I now make a filesystem tree to store the library.  In addition, I am
using inode number to track songs.  This should make it easier to detect
moved files (inode number matches but path doesn't).
2010-12-03 08:29:15 -05:00
Bryan Schumaker 5dbbeb7dcb DLFSTrees
Doubly linked filesystem trees are both a doubly linked tree and a
filesystem tree.  They can walk paths backwards.
2010-12-03 08:29:15 -05:00
Bryan Schumaker ffd38ec9fa Find child id once
Rather than computing the child id for every iteration of walking
backwards, we do it once.
2010-12-03 08:29:15 -05:00
Bryan Schumaker 60aa99ad84 Add track fields
Tracks need a playcount and a score in addition to all other fields.
2010-12-03 08:29:15 -05:00
Bryan Schumaker 5a21e63e3f Add tracks to libray
I now attempt to add every file in the filesystem to the library as a
Track().  Errors are logged and bad extentions are saved (so we know not
to scan them in the future).
2010-12-03 08:29:15 -05:00
Bryan Schumaker b720519043 Add Track class
This class will be used to store metadata about each song (year, length,
genre ...)
2010-12-03 08:29:15 -05:00
Bryan Schumaker 825a8b8346 Add DLTree()
This patch adds a double-linked tree class for use in storing the
library.  This class can walk backwards from a leaf node when
walk_backwards is called.
2010-12-03 08:29:15 -05:00
Bryan Schumaker 4a33a2f0fd Remove value from tree displaying
Displaying a tree should not use the old tree.value variable.  This
variable doesn't exist anymore.
2010-12-03 08:29:15 -05:00
Bryan Schumaker b19e704154 Library scanning work
I have continued work on library scanning.
2010-12-03 08:29:15 -05:00
Bryan Schumaker 5e6cd3c26a FSTree() correct insert
Correctly insert a split path into a FSTree()
2010-12-03 08:29:15 -05:00
Bryan Schumaker c87a696e21 Tree() length
I made Tree().__len__() to use for finding the number of leafs that
exist on a tree.
2010-12-03 08:29:14 -05:00
Bryan Schumaker 5b4021f3f6 libsaria.path FSTree()
path should use an FSTree() instead of a Tree()
2010-12-03 08:29:14 -05:00
Bryan Schumaker 1f1cbe1b34 FSTrees shouldn't have a value
If a Tree() doesn't have a value, then the FSTree() shouldn't either...
2010-12-03 08:29:14 -05:00
Bryan Schumaker 3598de0b72 Trees don't have values
Trees don't actually need a value.  I can make a subclass later if I
find it's important.
2010-12-03 08:29:14 -05:00
Bryan Schumaker a66a4a769b Began new library scanning code
The new scanning code will use FSTrees() to find paths.  I hope it will
be easy to make a scanning progress bar with the new system.
2010-12-03 08:29:14 -05:00
Bryan Schumaker 8328a83dcd Don't reload when refreshed
Lists should not be reloaded when they are refreshed.  Instead, use
everything already in memory.
2010-12-03 08:29:14 -05:00
Bryan Schumaker 78b445793a libsaria.path() with an FSTree()
I now have a function to walk all files in a filesystem and make an
FSTree().
2010-12-03 08:29:14 -05:00