Commit Graph

14 Commits

Author SHA1 Message Date
Bryan Schumaker 868359a4a4 libsaria: Catch errors when writing cache files
The user doesn't want to see these...
2011-06-18 13:27:21 -04:00
Bryan Schumaker 72f7ec90eb libsaria: Remove unused function
I don't need the file_empty() function in the cache anymore
2011-06-18 09:44:34 -04:00
Bryan Schumaker 7319767ac3 libsaria: Don't automatically create cache file
The cache filler function will pass back a string to be written to this
file.  If this string != None, then I create the file and fill it.
2011-06-18 09:39:55 -04:00
Bryan Schumaker e6849dc5cd libsaria: Only delete empty cache files
For some reason I was trying to delete files that don't even exist in
the cache!  This was stupid and caused an error.  Now I only delete
empty files
2011-06-18 09:28:53 -04:00
Bryan Schumaker e8e0c5d743 libsaria: Return album art as part of all_attrs()
If the album art exists, I might as well return it so it can be set in
the main gtk thread.  If it doesn't exist, I'll trigger a web search for
it.
2011-06-17 23:42:20 -04:00
Bryan Schumaker 3fd94e4ddd libsaria: Set cache basedir when storage imported
I want to set this once, so I don't need to keep looking it up.
2011-05-07 17:15:06 -04:00
Bryan Schumaker bafdc6ef20 libsaria: Manually set artwork through a copy_in_file() function
I created this function in the cache to make a generic way to copy
outside files into the cache tree.  It makes sense to do this in the
cache, since I want to keep everything self-contained.
2011-05-07 16:49:41 -04:00
Bryan Schumaker 2a78d870ee libsaria: Set artwork from a local file
I set it in the new cache, rather than using the old one.
2011-05-07 16:45:04 -04:00
Bryan Schumaker 0f1b5550aa libsaria: Change cache_func() argument order
I want to pass the file object last, I just think it looks better.
2011-05-07 15:58:33 -04:00
Bryan Schumaker 797063c492 libsaria: Fill cache in new function
This keeps things easy to read
2011-05-07 15:58:33 -04:00
Bryan Schumaker 904b475363 libsaria: Began new cache functions
I think the new cache will be more generic, and should work for just
about anything.  We'll see.
2011-05-07 15:58:33 -04:00
Bryan Schumaker c1a2d74f7c libsaria: Move version information to new file
A bit of separation is good here, and it should help with managing the
code.
2011-05-07 15:58:33 -04:00
Bryan Schumaker af5947b088 libsaria: Save and load python objects
I do this using cPickle.  load_obj() takes a default constructor
function in case the object cannot be created.
2011-05-01 12:46:16 -04:00
Bryan Schumaker 1921e78e55 libsaria: Comment out most code, begin new preferences
I commented out most of the code in libsaria/__init__.py to make it
easier to clean up.  I also began work on libsaria/prefs.py for managing
preferences.

NOTE: For the next several commits, the best way to test changes is by
importing libsaria through the python interpreter.  Trying to run
ocarina will probably fail.
2011-05-01 12:46:16 -04:00