Commit Graph

556 Commits

Author SHA1 Message Date
Bryan Schumaker
8d5fd68cac Fix scripts/tag 2010-12-05 12:56:16 -05:00
Bryan Schumaker
7638fea8de Bump versions
Bump the minimum version required for plugins.  Also marked __dev__ =
False in Ocarina and Libsaria
2010-12-05 12:54:32 -05:00
Bryan Schumaker
43fd01e1cd Fill list with or without lock
The gtk.gdk lock is alread held when we add selected songs to the
playlist.  I deadlock if I try to grab it again.
2010-12-04 13:40:04 -05:00
Bryan Schumaker
c3dcb1c44c Comment out unused library attributes
I don't use these right now, but I may in the future.  For now, I will
just comment them out.
2010-12-04 13:39:33 -05:00
Bryan Schumaker
b64055d9b4 Don't load a song on empty playlist
If the playlist's cur_index is < 0, then we should not try to load a
song.
2010-12-04 13:38:40 -05:00
Bryan Schumaker
816bc84dfd Playlist should load id at saved cur_index
After loading the playlist, we should tell gstreamer to load the last
"current song" that the user was listening to.
2010-12-03 23:57:34 -05:00
Bryan Schumaker
e27f043e6e library.load_id()
This function only loads a song id.  It does not play the song.  If you
want to load and play a song, call library.play_id().
2010-12-03 23:56:43 -05:00
Bryan Schumaker
86462fc6ec gdk lock when populating lists
Getting this lock seems to stop an assertion failure I was getting when
trying to fill and scroll at the same time.
2010-12-03 23:55:52 -05:00
Bryan Schumaker
6147bb8e0f Don't check if audio is initialized
The audio module is initialized when libsaria starts up. We don't need
to keep checking it on every file load
2010-12-03 23:39:42 -05:00
Bryan Schumaker
84b220fae9 Return after list scrolling
We don't need to keep iterating over the list once we have scrolled to
the current song.  We can return early instead.
2010-12-03 23:33:25 -05:00
Bryan Schumaker
654b526766 Merge branch 'Ocarina-4.2' of file:///home/bjschuma/public_html/git/ocarina into Ocarina-4.2 2010-12-03 08:39:35 -05:00
Bryan Schumaker
d20a007c77 Filechooser callback in background
We should call the filechooser callback in the background so that gdk
threads have a chance to unlock and prevent deadlock.
2010-12-03 08:36:13 -05:00
Bryan Schumaker
793827b8f2 Check for empty playlist on startup
Before setting libsaria.sources.cur_lib_id, we should check that the
playlist has something to set it to.
2010-12-03 08:36:13 -05:00
Bryan Schumaker
a3749a9591 Removed GTK based remote
I am choosing to focus on the web remote for now.  I eventually do want
a "remote library" feature, but not as a different application.
2010-12-03 08:36:13 -05:00
Bryan Schumaker
7453a4e5a1 Playlist track cur_index
We should track the current song index between sessions.  This means we
need to set it when selecting a random song.  This also means we need to
save the playlist on each song selection.
2010-12-03 08:36:13 -05:00
Bryan Schumaker
d20693bba7 Select and goto song improvements
When we select a song through the gui, we should call either the
playlist or library play_id() function for appropriate bookkeeping.

Additionally, on startup we seek to sources.cur_lib_id
2010-12-03 08:36:13 -05:00
Bryan Schumaker
6b92d199e2 Only back up changed files
We only need to back up files with a score != 0 and count != 0
2010-12-03 08:36:13 -05:00
Bryan Schumaker
e5f85fab5c Library importing
I can now import both v1.1 and v1.2 libraries.  I split this into
appropriate functions for each version.
2010-12-03 08:36:13 -05:00
Bryan Schumaker
45b14e5d79 Check library sources before adding
New sources should:
  1) Be a string
  2) Not already be a tracked source
2010-12-03 08:36:13 -05:00
Bryan Schumaker
d251a46a6a Print library scanning errors
If there is an error scanning a file, we should print what the error is
to ease debugging.
2010-12-03 08:36:13 -05:00
Bryan Schumaker
e9fe8321af Backup sources and improvements
I already have a "dumb import" (retag all files based on the filepath)
so there is no point in storing extra attributes when I am only going to
find them again during importing.  Instead, we should only store the
information we need: filepath, score, and playcount.

Additionally, I now store the list of sources in the library backup.
2010-12-03 08:36:13 -05:00
Bryan Schumaker
9ba602318c xml write node with attributes
The xml functions can now create a node with attributes ( <node
attr="something"/> )
2010-12-03 08:35:15 -05:00
Bryan Schumaker
53027b6006 Library list sources
calling library.get_sources() will iterate over the list of sources
contained in the library.  This is mostly used for storing in the backup
xml.
2010-12-03 08:35:15 -05:00
Bryan Schumaker
5d17242912 Clean up web radio
I removed most of the comments from the web radio plugin.
2010-12-03 08:35:15 -05:00
Bryan Schumaker
4f5c3e8b57 Reorder header
Elements in the header have been reordered so they make more sense
2010-12-03 08:35:15 -05:00
Bryan Schumaker
e894ce10fc Web radio improvements
The web radio now exists as a single tab.  I eventually need some way of
moving to and from radio stations.
2010-12-03 08:35:15 -05:00
Bryan Schumaker
a6090a4247 Switch pages before removing current page
If we are asked to remove the current page, we should first switch to a
different page.
2010-12-03 08:35:15 -05:00
Bryan Schumaker
f05e6c6336 Set default page
During startup, we should check if the initial page exists.  If it
doesn't we will switch to the default page instead.
2010-12-03 08:35:15 -05:00
Bryan Schumaker
72f85f9f92 Create a set locked function for album art
We appear to already be locked when we get to the setter function.  I
was getting deadlocked when trying to do anything.  To fix this, I
made it so I can set images without needing the lock.
2010-12-03 08:35:15 -05:00
Bryan Schumaker
90ff6ad86e Rename screenshots/ to screens/ 2010-12-03 08:35:15 -05:00
Bryan Schumaker
fb11429055 Added screenshots
I added new screenshots showing the current state of Ocarina
2010-12-03 08:35:14 -05:00
Bryan Schumaker
ba9e25c846 Change goto icon
I am now using the stock "jump to" icon, rather than "index"
2010-12-03 08:35:14 -05:00
Bryan Schumaker
21e1cba61f Changed random icon
I found a good 6 sided die at:
http://dylantaylor.files.wordpress.com/2010/11/dice2.png

Now it is easier to tell what the random button does.
2010-12-03 08:35:14 -05:00
Bryan Schumaker
69aa68de0f Remove slogan
I think it was just getting in the way.
2010-12-03 08:35:14 -05:00
Bryan Schumaker
bf6a770e89 Lock image
This was uncommented, and led to problems.
2010-12-03 08:35:14 -05:00
Bryan Schumaker
accb75848c Goto current song on load
When a song has been loaded, we should scroll to it.
2010-12-03 08:35:14 -05:00
Bryan Schumaker
b12894d5a7 Goto song when filtering
When filtering, we should select the currently playing song if it is
visible.
2010-12-03 08:35:14 -05:00
Bryan Schumaker
5a508cefd3 Goto current song return early
We should return early if there is no currently playing song in the
list.
2010-12-03 08:35:14 -05:00
Bryan Schumaker
742333f1af Goto current song
There is no a button to scroll to the currently playing song.
2010-12-03 08:35:14 -05:00
Bryan Schumaker
a71ae8319f AlbumArt widget is now an event box
This allows me to catch a button-press-event and show a file chooser to
select an image as the new album art for the currently playing song.
2010-12-03 08:35:14 -05:00
Bryan Schumaker
ad45b10544 Fix fsselect
Selecting files through fsselect was broken at some point.  This commit
fixes it.
2010-12-03 08:35:14 -05:00
Bryan Schumaker
e25f35a74a Library set_attr art
I can use the library's set_attr() function to manually set album art
from a local file.
2010-12-03 08:35:14 -05:00
Bryan Schumaker
bb8632cf69 Albumart set from local file
I can pass the file location to the lastfm module to set the artwork
from a local file rather than from a web location.
2010-12-03 08:35:14 -05:00
Bryan Schumaker
0cbf344fa6 Cache delete items
I can now delete things from the cache in addition to adding things.
2010-12-03 08:35:14 -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
13661d47f1 Library set_attr
The library now has a way to set attributes in each track record.
Note: There is currently no way to change artist, album, title or
filepath.
2010-12-03 08:35:14 -05:00
Bryan Schumaker
a0c344dd71 User can pass files to open
If the user passes text as argv to the program, we will call
universal_open with each string in argv.
2010-12-03 08:35:14 -05:00
Bryan Schumaker
7fdfb73cd7 wm_tweaks fixes
I need to update wm_tweaks to make use of the new ocarina.window
functions.
2010-12-03 08:35:14 -05:00
Bryan Schumaker
d3444c04db Remove tag labels
I was having trouble with the artist / album / title labels, so they
have been removed to give more room for lyrics.
2010-12-03 08:35:13 -05:00
Bryan Schumaker
a3248b404e URL character escaping
Only escape a subset of the characters when placing a url request.
2010-12-03 08:35:13 -05:00