Bryan Schumaker
d8f47e8d4d
libsaria: Remove new_source() functions
...
I have new functions for creating the library, so this (and associated
callbacks) are no longer needed.
2011-05-23 10:07:19 -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
ae2fc30da8
ocarina: Remove export button
...
I don't plan on changing the library anytime soon, so there is no need
to export it to an xml file.
2011-05-23 10:02:43 -04:00
Bryan Schumaker
c4629024a6
libsaria: Add ids to queue visible set
...
When adding songs to the queue, we also need to add the ids to the
visible set if they are visible. Without this step, we won't have an
easy way of knowing how many IDs are visible.
2011-05-23 09:18:30 -04:00
Bryan Schumaker
d7ba67ee38
libsaria: Remove oldlibrary usage from playlist
...
The idea is to remove this from everywhere. The playlist is a good
start.
2011-05-23 09:05:56 -04:00
Bryan Schumaker
de1acd8a23
libsaria: Playlist filtering and next() fixes
...
I removed the old playlist filtering code, since I now have a generic
way of doing this. I also fixed the next function to use the revised
get_attrs() function.
2011-05-22 10:14:10 -04:00
Bryan Schumaker
bfeeb7f568
libsaria: Correct library num_visible()
...
Simply return the length of matching songs in the index.
2011-05-22 09:45:10 -04:00
Bryan Schumaker
43f37c93a7
ocarina: Do filtering in the listview
...
Each source was doing the exact same thing for filtering now that I have
a generic is_visible() function. There is no need for each source to
implement this.
2011-05-22 09:43:27 -04:00
Bryan Schumaker
39198ff2ce
libsaria: Set initial matching ids
...
This should be initialized to the set of all ids to begin with. That
way everything will match.
2011-05-22 09:34:30 -04:00
Bryan Schumaker
cb162bfa9f
libsaria: Remove callback print statement
...
This was just to make sure it was being triggered.
2011-05-22 09:28:04 -04:00
Bryan Schumaker
4f8f4d3ce3
ocarina: Use new filtering functions
...
I set this up through callbacks. It should filter all sources at once,
rather than just the current page.
2011-05-22 09:27:26 -04:00
Bryan Schumaker
3f8cba6f16
libsaria: Do filtering through sources
...
This allows me to set filter text and trigger a callback.
2011-05-22 09:24:53 -04:00
Bryan Schumaker
ac0f23ab80
ocarina: Remove oldlibrary code
...
The new library covers everything, so this is no longer needed.
2011-05-21 22:34:39 -04:00
Bryan Schumaker
248dd283ff
libsaria: Filter library
...
This reduces the number of visible songs that the user sees on the UI.
2011-05-21 22:28:12 -04:00
Bryan Schumaker
ad12bf6500
ocarina: Filter the library
...
I call the new libsaria.sources.filter() function and test ids using
libsaria.sources.is_visible().
2011-05-21 22:06:37 -04:00
Bryan Schumaker
eea3118012
libsaria: Test song visibility through sources
...
It queries the library, but the playlist and the queue should be able to
use this too. Then they don't each need to track what is currently
visible.
2011-05-21 22:05:23 -04:00
Bryan Schumaker
f676b5b44d
libsaria: Added library index
...
This makes it easier to search for songs.
2011-05-21 21:40:32 -04:00
Bryan Schumaker
297775896e
libsaria: Sources play song id
...
I find the filepath using the new library, rather than having the
library play the song. I only really want the library for managing
collected music. It shouldn't touch music playback at all.
2011-05-21 16:14:08 -04:00
Bryan Schumaker
c357a35313
ocarina: Reset library and right click menu
...
I added these based on the old library functions. It seems to be
working so far!
2011-05-21 15:43:29 -04:00
Bryan Schumaker
17d83d8fff
libsaria: Reset library
...
This clears the entire library and creates an empty tag tree.
2011-05-21 15:42:59 -04:00
Bryan Schumaker
c74f9680b2
libsaria: Load saved library on startup
...
I want to load the library and create a tree representing the entire
library on startup.
2011-05-21 15:27:58 -04:00
Bryan Schumaker
45600e8a2d
libsaria: Save library after update
...
I want to write this out to stable storage so the user doesn't need to
rescan every time they want to listen to music.
2011-05-21 08:26:04 -04:00
Bryan Schumaker
2587ae0954
ocarina: Fill new library
...
I make the list of songs visible, I also update the number of songs.
Finally, I respond to the library_updated() callback when songs are
added / removed from the library.
2011-05-21 08:20:44 -04:00
Bryan Schumaker
254483dd5b
libsaria: Added library getattrs
...
I search for attributes using the new library first. If the song isn't
found in the new library, then I fall back on the old library.
2011-05-21 08:19:59 -04:00
Bryan Schumaker
66d5314b6e
libsaria: Create tree from library
...
I do this at runtime, rather than at scan time, to cut down on storage
space required to store the library.
2011-05-21 08:02:04 -04:00
Bryan Schumaker
b1d8ba7653
libsaria: Remove old ids from library
...
If the song was deleted it should be removed.
This patch also addse in the Track() class that should have been in the
last patch.
2011-05-21 08:01:13 -04:00
Bryan Schumaker
a4988a0b28
libsaria: Add new songs to the library
...
I scan a directory and collect fileids for each file. If the fileid
doesn't exist in the library yet, I'll find the tags and add to the
dictionary.
2011-05-21 07:44:11 -04:00
Bryan Schumaker
a1722eafb3
libsaria: Find list of files to add to library
...
I put them all into a dictionary for use later.
2011-05-21 07:26:30 -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
39c9a7cca8
libsaria: Added new library directory
...
I'm going to let everything expand across several directories. It'll be
neater this way.
2011-05-20 21:43:35 -04:00
Bryan Schumaker
e3450d31ff
ocarina: Add new library page
...
Right now, it just adds a new page to the window. I'll add more as I
go.
2011-05-20 21:42:57 -04:00
Bryan Schumaker
c3dbd8167d
ocarina: Rename library.py -> oldlibrary.py
...
This reflects my recent libsaria change. I'm keeping around my old
library code for now. The new library will gradually be introduced
through several patches ending with the removal of the old library.
2011-05-20 21:29:30 -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
0d75d4f7d9
Began Ocarina 4.8
2011-05-20 20:50:30 -04:00
Bryan Schumaker
dd040252a4
Ocarina 4.7
2011-05-20 08:24:13 -04:00
Bryan Schumaker
6d01a1cbc8
libsaria: Fix playlist filtering
...
The variables "filtered" and "visible" are global, so we need to tell
the function that it shouldn't create local variables.
2011-05-16 12:04:28 -04:00
Bryan Schumaker
3301439e88
ocarina: Get gtk lock around gtk.main()
...
The internet suggests that this may help with the random crashes I
sometimes get. We'll see.
2011-05-15 15:58:37 -04:00
Bryan Schumaker
e0dd940671
libsaria: Don't write empty text to client
2011-05-15 15:58:21 -04:00
Bryan Schumaker
c02bffb652
libsaria: Web server controls playback
...
I can choose songs to play by clicking rows in an html table. I also
write text to the client as it becomes available, rather than doing it
all at once.
2011-05-15 15:39:14 -04:00
Bryan Schumaker
7ffd4e14fd
libsaria: Added RPC pages
...
For now, I can play and pause. I'll eventually add more operations to
the list.
2011-05-15 13:49:02 -04:00
Bryan Schumaker
2a6b04e328
libsaria: Began new web server
...
The new web server will be built in to libsaria, rather than existing as
a plugin. This allows me to break it into multiple files for easier
use. For now, the server is only active when version.__dev__ == True.
2011-05-15 13:41:47 -04:00
Bryan Schumaker
b373a88618
ocarina: Page showing and hiding improvements
...
When hiding a page I want to switch to page n - 1, but gtk was moving me
to n + 1. I also added a function to show, and optionally switch to, a
page.
2011-05-15 11:36:26 -04:00
Bryan Schumaker
93a785dafa
libsaria: list_source() takes a function pointer
...
I was taking a flag that I used to determine which list func to call. I
think it is simpler to take a function pointer passed from either
list_playlist() or list_queue()
2011-05-15 11:36:07 -04:00
Bryan Schumaker
76975ecead
libsaria: Fix spacing in playlist
2011-05-15 11:02:14 -04:00
Bryan Schumaker
32a1e96af0
libsaria: Remove unused global statements and imports
...
With my recent cleanups, I don't need these statements anymore. To do
this, I also had to move tracking recent songs to next.py
2011-05-15 10:59:31 -04:00
Bryan Schumaker
6d5ca5d416
libsaria: Rename queue and playlist list functions
...
I rename them from list() to list_ids() so that it doesn't clobbel the
list constructor.
2011-05-15 10:53:31 -04:00
Bryan Schumaker
b4eb7c15c5
libsaria: Remove unused playlist functions
...
I have more generic play_id() and load_id() functions now, so the
playlist specific implementations haven't been used in a long time. I
don't think I need them anymore.
2011-05-15 10:50:39 -04:00
Bryan Schumaker
b56fb6768f
libsaria: Track current file in audio
...
I use this for determining the pipeline state. get_property() wasn't
working as well as I hoped it would.
2011-05-15 10:43:57 -04:00
Bryan Schumaker
5a781479cd
libsaria: Move rand_next() to playlist's next.py
...
This keeps code for picking the next song in one place. I also cleaned
up rand_next() while I was at it.
2011-05-15 10:30:22 -04:00
Bryan Schumaker
898f843ee0
libsaria: Check that sources have an id before looking up a file
...
If next() in libsaria.sources doesn't get an id from the queue or
playlist, then we shouldn't try to look up a filepath. We return None
instead.
2011-05-15 10:28:24 -04:00