Commit Graph

13 Commits

Author SHA1 Message Date
Bryan Schumaker
e0ad57c541 libsaria: Fix playing songs from outside of library
The song was loading, but attributes weren't updating.  I also use this
patch to begin playback when a song is loaded (I was tired of manually
pressing play every time)
2011-06-09 08:35:02 -04:00
Bryan Schumaker
6398b3dd9a libsaria: Find attributes for songs not in library
I use the same Track() class that the library does.  I have to create
an instance of this class each time the function is called, but this is
ok since it is not the case I am trying to optimize for.
2011-05-26 09:18:43 -04:00
Bryan Schumaker
8debb4a508 libsaria: Began library scanning routines
I can add a new path to a dictionary, but I don't do any actual scanning
yet.  Instead, I just print out each path in the library.
2011-05-21 07:16:00 -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
063869c7ca libsaria: Remove old file management code
I have new code for loading / saving objects, so I can remove the old
stuff.
2011-05-01 12:46:16 -04:00
Bryan Schumaker
0c636bfd56 Clean up universal_open()
The cleaned up version chooses what function to call based on file
extention.  I use map.get() to pick a function, and use the open_music()
function as the default.
2010-12-27 12:06:22 -05:00
Bryan Schumaker
f869b17e2f Rename backup functions
Backup has been renamed to export
Restore has been renamed to import_xml
2010-12-18 14:52:31 -05:00
Bryan Schumaker
b6c9c12ea9 Remove datetime module import
This was added to test timing changes for my recent pickle improvements.
2010-12-16 11:02:32 -05:00
Bryan Schumaker
84eb73d2a2 Pickling improvements
By using pickle correctly, I can now load in files significantly faster
than the old way.  Library loading times have gone from about 3 seconds
to 0.25 seconds.  I like this.
2010-12-16 09:29:06 -05:00
Bryan Schumaker
4749c49e16 Use the file source
When opening a file, we should use the file source instead of directly
loading it.
2010-12-07 20:47:32 -05:00
Bryan Schumaker
3eeb35d81c Stop using file_to_id
We should now use file_id located in libsaria.path
2010-12-05 13:40:39 -05:00
Bryan Schumaker
8fa2c29fa5 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-12-03 08:35:14 -05:00
Bryan Schumaker
487e8c39be Move generic saving / loading functions
These belong under path/
2010-12-03 08:31:03 -05:00