commit d309ac3cd55ab0e8415701c1203ea609ed14cb01
Author: Adam Broschinski <[email protected]>
Date: Tue Oct 5 22:38:50 2010 -0400
Add bookmarks and skip on shuffle to old shuffles
Removes the hard coded values for bookmarks and skip on shuffle
from the 2nd gen writing code allowing those features to be enabled.
Also clarifies a few comments.
src/itdb_itunesdb.c | 8 ++++----
src/itdb_playlist.c | 3 ++-
2 files changed, 6 insertions(+), 5 deletions(-)
---
diff --git a/src/itdb_itunesdb.c b/src/itdb_itunesdb.c
index ab995f2..3f6f9b6 100644
--- a/src/itdb_itunesdb.c
+++ b/src/itdb_itunesdb.c
@@ -6409,7 +6409,8 @@ static gboolean write_rths (WContents *cts, Itdb_Track
*track)
put32lint (cts, track->bookmark_time); /* Bookmark time */
/* Don't Skip on shuffle */
/* This field has the exact opposite value as in the iTunesDB */
- /* 1 when you want to skip, 0 when you don't want to skip */
+ /* 1 when you want to skip, 0 when you don't want to skip. Causes a
+ * playlist to be skipped if all songs in that playlist have this set
*/
put8int (cts, !track->skip_when_shuffling);
put8int (cts, track->remember_playback_position); /* Remember playing
pos */
/* put8int (cts, ); In uninterruptable album */
@@ -6777,9 +6778,8 @@ gboolean itdb_shuffle_write_file (Itdb_iTunesDB *itdb,
g_free(path);
g_free(path_utf16);
- /* XXX FIXME: should depend on something, not hardcoded */
- put8int (cts, 0x1); /* song used in shuffle mode */
- put8int (cts, 0); /* song will not be bookmarkable */
+ put8int (cts, tr->skip_when_shuffling); /* Is the song used in
shuffle mode */
+ put8int (cts, tr->remember_playback_position); /* Is the song
bookmarkable */
put8int (cts, 0);
}
}else {
diff --git a/src/itdb_playlist.c b/src/itdb_playlist.c
index dac871f..fbb4aac 100644
--- a/src/itdb_playlist.c
+++ b/src/itdb_playlist.c
@@ -1590,7 +1590,7 @@ gboolean itdb_playlist_is_podcasts (Itdb_Playlist *pl)
* Checks if @pl is an audiobook playlist
*
* Returns: TRUE if all tracks in @pl have a mediatype of
ITDB_MEDIATYPE_AUDIOBOOK,
- FALSE if there are no tracks or one track does not the correct type
+ FALSE if there are no tracks or one track is not the correct type
*
*/
gboolean itdb_playlist_is_audiobooks (Itdb_Playlist *pl)
@@ -1603,6 +1603,7 @@ gboolean itdb_playlist_is_audiobooks (Itdb_Playlist *pl)
for (tl = pl->members; tl; tl = tl->next)
{
track = tl->data;
+ /* Don't check more tracks than necessary */
if (!(track->mediatype & ITDB_MEDIATYPE_AUDIOBOOK))
{
return FALSE;
------------------------------------------------------------------------------
Beautiful is writing same markup. Internet Explorer 9 supports
standards for HTML5, CSS3, SVG 1.1, ECMAScript5, and DOM L2 & L3.
Spend less time writing and rewriting code and more time creating great
experiences on the web. Be a part of the beta today.
http://p.sf.net/sfu/beautyoftheweb
_______________________________________________
gtkpod-cvs2 mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/gtkpod-cvs2