Commit Graph

3856 Commits

Author SHA1 Message Date
Bryan Schumaker 68bad792dc Library backup
I can now backup the library to an xml file.  This will be useful for
library updates in the future.  The plan is to eventually backport this
feature to Ocarina 4.1 (To make the 4.1 -> 4.2 transition easier)
2010-11-12 20:47:14 -05:00
Bryan Schumaker d35468ba19 Added xml creation functions
These functions are designed to help create an xml document.
2010-11-12 20:46:19 -05:00
Bryan Schumaker 2b2cd7e805 Remove old collection code and files 2010-11-12 19:40:42 -05:00
Bryan Schumaker 3cb1959a7f Random song from playlist
I can once again play random songs from the playlist.
2010-11-12 19:24:13 -05:00
Bryan Schumaker ed2e5b882b Playlist next()
The playlist can play the next song in the playlist.
2010-11-12 08:04:26 -05:00
Bryan Schumaker 2c4d42920e 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-11-11 22:51:31 -05:00
Bryan Schumaker 1f7d6538c4 Tree lookup
Lookup will follow a path and return whatever node it is pointing to.
2010-11-11 22:49:58 -05:00
Bryan Schumaker bcacfafa36 find attr filepath correctly
The attribute filepath is easier now that I can walk a fs_tree backwards
and get a path back.
2010-11-11 22:47:53 -05:00
Bryan Schumaker 0af81adbcd 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-11-11 22:46:17 -05:00
Bryan Schumaker b8eb1817b7 Library indexing
I can now add artist / album / title of each song to an index in the
library.
2010-11-11 08:21:01 -05:00
Bryan Schumaker 6ac2abda27 Library get_attr values
We should walk the tag values bacwards, rather than using the normal
walk_backwards function.
2010-11-10 22:52:50 -05:00
Bryan Schumaker cd78355b74 Tags in DLValTree
I store the tags in a doubly-linked value tree from now on.
2010-11-10 22:47:01 -05:00
Bryan Schumaker 88ca239a53 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-11-10 22:45:43 -05:00
Bryan Schumaker e2a0dacd58 Value Trees
Value trees store a value in addition to the path.  They come in normal
and doubly-linked flavors.
2010-11-10 21:59:24 -05:00
Bryan Schumaker e7d9ff897d 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-11-10 21:33:15 -05:00
Bryan Schumaker 1d95aeeaf2 DLFSTrees
Doubly linked filesystem trees are both a doubly linked tree and a
filesystem tree.  They can walk paths backwards.
2010-11-10 08:24:02 -05:00
Bryan Schumaker a45d18552b Find child id once
Rather than computing the child id for every iteration of walking
backwards, we do it once.
2010-11-10 08:22:33 -05:00
Bryan Schumaker 52da8984c3 Add track fields
Tracks need a playcount and a score in addition to all other fields.
2010-11-10 08:21:03 -05:00
Bryan Schumaker afd145efd7 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-11-09 23:26:13 -05:00
Bryan Schumaker 0e2898a0f6 Add Track class
This class will be used to store metadata about each song (year, length,
genre ...)
2010-11-09 23:24:49 -05:00
Bryan Schumaker 6ad263d712 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-11-09 23:22:52 -05:00
Bryan Schumaker 946e6b19da Remove value from tree displaying
Displaying a tree should not use the old tree.value variable.  This
variable doesn't exist anymore.
2010-11-09 23:21:57 -05:00
Bryan Schumaker efa680af19 Library scanning work
I have continued work on library scanning.
2010-11-09 20:08:44 -05:00
Bryan Schumaker dbc2d767d3 FSTree() correct insert
Correctly insert a split path into a FSTree()
2010-11-09 20:08:17 -05:00
Bryan Schumaker 019cded563 Tree() length
I made Tree().__len__() to use for finding the number of leafs that
exist on a tree.
2010-11-09 20:07:35 -05:00
Bryan Schumaker 99ea5fd3ed libsaria.path FSTree()
path should use an FSTree() instead of a Tree()
2010-11-09 20:06:46 -05:00
Bryan Schumaker 27d3baef27 FSTrees shouldn't have a value
If a Tree() doesn't have a value, then the FSTree() shouldn't either...
2010-11-09 19:44:58 -05:00
Bryan Schumaker d15a4e2967 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-11-09 19:41:47 -05:00
Bryan Schumaker 9c73996ade Modified makefile
The makefile reflects my new way of installing from git (using the git
daemon instead of http).
2010-11-09 19:21:54 -05:00
Bryan Schumaker 7012c9a9af Modified makefile
The makefile reflects my new way of installing from git (using the git
daemon instead of http).
2010-11-09 19:20:06 -05:00
Bryan Schumaker 4c398537b8 Ocarina 4.1.4 2010-11-09 14:09:22 -05:00
Bryan Schumaker 5833b1908c universal_open() needs escape character replacement
%20 and $22 should be replaced with " " and "\"" before using the path
to create a library.
2010-11-09 14:08:16 -05:00
Bryan Schumaker b1ae9fd878 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-11-09 13:58:28 -05:00
Bryan Schumaker bafa6e7e8a Don't reload when refreshed
Lists should not be reloaded when they are refreshed.  Instead, use
everything already in memory.
2010-11-09 13:57:24 -05:00
Bryan Schumaker ef9c53f930 universal_open() needs escape character replacement
%20 and $22 should be replaced with " " and "\"" before using the path
to create a library.
2010-11-09 13:55:14 -05:00
Bryan Schumaker 13d4ba7710 libsaria.path() with an FSTree()
I now have a function to walk all files in a filesystem and make an
FSTree().
2010-11-09 13:53:57 -05:00
Bryan Schumaker 7ad74e6dca FSTree()
FSTree() is a tree representing paths in a filesystem.  It has functions
for inserting paths and returning the paths it is storing.  A path is a
UNIX path: "/home/bjschuma" is the path to my home directory.
2010-11-09 13:52:02 -05:00
Bryan Schumaker 5cf8e8e639 Load in background
The library and playlist can be loaded in the background to save time!
Also, I changed the library list to use the new populate function.!
2010-11-08 22:47:31 -05:00
Bryan Schumaker 511fb83b0e Remove whitespace 2010-11-08 22:41:43 -05:00
Bryan Schumaker c364fdf5d1 Remove get_attr
This removes get_attr() as a library function (use get_attrs() instead)
2010-11-08 22:19:23 -05:00
Bryan Schumaker c5dccdfcdf Use get_attrs
This changes various parts of ocarina / libsaria to use get_attrs()
instead of get_attr().
2010-11-08 22:18:12 -05:00
Bryan Schumaker 7f5d0cd458 Library get_attrs()
get_attrs() will return a list of requested attributes for a given song
id.  For now, I have changed get_attr() into a wrapper around get_attrs
that returns the first entry in the result list.
2010-11-08 22:15:49 -05:00
Bryan Schumaker a9b5324889 Rename libsaria.music
I decided that libsaria.music should be known as libsaria.audio.  It
makes more sense to me.
2010-11-08 20:58:33 -05:00
Bryan Schumaker 3e9b96bf46 Added __bug__ to track bug fix versions. 2010-11-08 20:34:40 -05:00
Bryan Schumaker e83cf62bb7 Added __bug__ to track bug fix versions. 2010-11-08 20:31:14 -05:00
Bryan Schumaker b4af52cdce Collection Treeview / List cleanup
This removes the on_mouse_motion notifications that I was using for
setting the tooltip.
2010-11-07 17:01:01 -05:00
Bryan Schumaker 3eda4225a9 Treeview tooltips
The treeview tooltips will show detailed information about the selected
track (including album art!)
2010-11-07 16:58:01 -05:00
Bryan Schumaker b7559e7864 Added 'art' to library attrs
This attribute will return the path to the cached album art for the
song.
2010-11-07 16:56:02 -05:00
Bryan Schumaker 37fd8c953c get_artwork_id()
If I already have the song id, there is no reason I should have to look
up the filepath to set the artwork.
2010-11-07 16:18:32 -05:00
Bryan Schumaker 1f8b72185f Album art tooltip change
Use set_icon() instead of set_custom() to set the album art tooltip.
2010-11-07 16:15:05 -05:00