Bryan Schumaker
a975fcc2cc
libsaria: Added a current_track() function
...
This function will generate a Track object based on the current file
stored by the audio. I then pass this object to to provided function so
the UI can be updated.
2011-10-28 15:33:17 -04:00
Bryan Schumaker
a508b7ff72
libsaria: Rip out old library
...
The code was a bit messy and didn't make use of namespaces very well.
By converting to a set of functions (instead of a class) I can use
each function as a function pointer if I want to. I am also able to
remove libsaria/library.cpp since this was just a set of wrapper
functions to the old static class functions.
2011-10-18 10:02:55 -04:00
Bryan Schumaker
c8daf92af4
libsaria: Save to XDG_CONFIG_HOME
...
I plan on storing all my preferences there rather than creating my own
save directory. This will keep things consistent with other
applications the user may have.
2011-10-02 10:52:23 -04:00
Bryan Schumaker
1a7b8a5ae9
libsaria: Load a saved library
...
No point in saving a library if I can't make use of the save file later.
2011-09-30 08:12:26 -04:00
Bryan Schumaker
1d1ecc8d8c
libsaria: Save the library scan results
...
I write each track to a file that will be read in on startup (once those
changes are committed)
2011-09-27 08:23:49 -04:00
Bryan Schumaker
a97da1dd05
libsaria: Create the saria dir on startup
...
This is either ~/.saria or ~/.saria-debug, depending on if we're running
a debug build or not.
2011-09-22 08:21:57 -04:00
Bryan Schumaker
2017e8a2f1
libsaria: Play tracks based on inode number
...
This allows the UI to pass in an inode returned by the track list used
to set up the display.
2011-09-20 08:34:02 -04:00
Bryan Schumaker
0326b9c7e4
libsaria: Add accessor functions for Track and Tag classes
...
I need to get at these variables to add them to a list in the UI
2011-09-19 19:47:31 -04:00
Bryan Schumaker
7aff13f382
libsaria: Add tags to the library
...
I add each scanned track to the library for use later.
2011-09-18 12:20:59 -04:00
Bryan Schumaker
a685023bcb
libsaria: Convert length into a string
...
I format it into mm:ss format for UIs to display.
2011-09-18 11:39:18 -04:00
Bryan Schumaker
3255b045f0
libsaria: Find audio properties of each scanned song
...
This gives me the length, bitrate, sample rate and number of channels.
2011-09-18 11:23:44 -04:00
Bryan Schumaker
333a3a4b04
libsaria: Tag files to add to the library
...
I collect the artist / album / title / ... tags and add them to a class.
2011-09-17 14:16:06 -04:00
Bryan Schumaker
5167c6f012
libsaria: Read a directory into two vectors
...
I separate out directories and files so they can be processed
differenty.
2011-09-17 12:27:20 -04:00
Bryan Schumaker
b8e8f7179c
Remove Ocarina 4 files
...
Get them out of the way to begin work on Ocarina 5
2011-08-14 10:46:22 -04:00
Bryan Schumaker
9be5b10112
libsaria: Clear cur_id when loading file
...
This allows me to return the correct attributes for a random song loaded
by the user.
2011-06-23 10:21:24 -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
97902d0730
libsaria: Remove print statement
...
I added it for debugging. I don't need it anymore.
2011-06-17 23:53:01 -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
12cb9a900a
libsaria: Switch most code to use all_attrs()
...
all_attrs() is my new way of doing things, so it makes sense to use it
now.
2011-06-17 20:23:32 -04:00
Bryan Schumaker
5a735aa625
libsaria: Clear cur_id correctly
...
I do this if the song isn't found in the library, rather than as part of
opening a track from disk.
2011-06-16 18:53:27 -04:00
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
071257d77d
libsaria: Fix saving playlists
...
I was still using old functions, rather than my new ones.
2011-05-29 18:22:29 -04:00
Bryan Schumaker
1cbb1fb969
libsaria: Remove more path code
2011-05-26 16:04:07 -04:00
Bryan Schumaker
07c673fa47
libsaria: Remove unused libsaria.path code
...
I eventually want to get rid of this directory, so removing this code
helps.
2011-05-26 15:55:59 -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
6b0ccce530
libsaria: Remove oldlibrary from export code
2011-05-24 07:58:47 -04:00
Bryan Schumaker
913ee9f931
libsaria: Remove library export and import
...
Using export / import functions for library updates can be a pain. I
don't plan on changing the library file format any time soon, so I don't
need to keep this code around.
2011-05-23 10:04:05 -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
531ceb2c17
libsaria: Rename library.py to oldlibrary.py
...
I want to preserve the old library as I slowly introduce the new one.
This should help.
2011-05-20 21:22:21 -04:00
Bryan Schumaker
86f4aca8f3
libsaria: Remove old threads.py module
...
Everything in here can easily be duplicated with one line of python
code. Keeping this file does a good job at increasing complexity.
2011-05-08 10:58:41 -04:00
Bryan Schumaker
e2233e4106
libsaria: Remove old cache code
...
I've replaced it with a cache implemented in libsaria/storage. The new
cache should be easier to use (or at least easier to maintain and
understand).
2011-05-07 17:10:20 -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
a7c7b85fdb
libsaria: Get album art through new cache
...
I am working on replacing my old cache functions with something easier
to use. I can now get album art out of the new cache.
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
e64f93ef39
libsaria: New library source callback
...
Triggered upon scanning a new path to add to the library.
2011-05-01 12:46:17 -04:00
Bryan Schumaker
bc54ef0a98
libsaria: Add a load_playlist() callback
...
Called when playlists are loaded from file.
2011-05-01 12:46:17 -04:00
Bryan Schumaker
96b237631e
libsaria: Remove POSTSETART event
...
Nothing was listening for it, and I am removing the event system soon
anyway
2011-05-01 12:46:17 -04:00
Bryan Schumaker
d0198cdd1a
libsaria: Get artwork when songs are loaded
...
I may change this to something that has to be requested by the front
end, rather than always fetching it. We'll see.
2011-05-01 12:46:17 -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
dc8a69bc0d
ocarina: Refresh library after loading
...
To show changes. I also use the v1.3 decoder function to decode
exported libraries.
2011-05-01 12:27:30 -04:00
Bryan Schumaker
3d1b8773d5
ocarina: Added album art
...
I put it on the now playing page for now. Eventually I'll put it in
other places, too.
2011-05-01 12:19:49 -04:00
Bryan Schumaker
212a846d8c
libsaria: Cache removes path if it exists
...
I wasn't checking if the path exists before removing it, and this caused
an error. Checking before removing is simple enough, though...
2011-05-01 11:59:29 -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
270d33d5ec
Reset playlist before loading xspf file
...
Loading an xspf file should replace the current playlist, rather than
add to it.
2010-12-18 16:45:48 -05:00
Bryan Schumaker
aa0f832356
Refresh the playlist after loading
...
After we load an xspf file, we should refresh the playlist to reflect
changes.
2010-12-18 16:44:18 -05:00
Bryan Schumaker
da99d4b349
Load xspf playlists
...
This patch adds loading of xspf playlists
2010-12-18 16:39:17 -05:00
Bryan Schumaker
77f065b703
Export playlist to xspf
...
This patch adds support for saving a playlist as an xspf xml file. I
only use the <location> tag to keep it simple.
2010-12-18 16:22:06 -05:00