summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--ChangeLog6
-rw-r--r--INSTALL8
-rw-r--r--INSTALL_CVS8
-rw-r--r--README7
-rw-r--r--configure.ac2
-rw-r--r--src/itdb.h89
-rw-r--r--src/itdb_itunesdb.c6
-rw-r--r--src/itdb_playlist.c5
8 files changed, 113 insertions, 18 deletions
diff --git a/ChangeLog b/ChangeLog
index 2f0477b..96afccf 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -6,8 +6,10 @@
* applied patch provided by Christophe Fergeau <teuf at gnome.org>
for artwork database support (read-only).
- * read iTunesStats file if present (corresponds to Play Counts
- file on the Shuffle).
+ * itdb_itunesdb.c: read iTunesStats file if present (corresponds
+ to Play Counts file on the Shuffle).
+
+ * itdb.h: implemented sortorder in playlists (new enum)
2005-09-17 Jorg Schuler <jcsjcs at users.sourceforge.net>
diff --git a/INSTALL b/INSTALL
index 54caf7c..1816dcb 100644
--- a/INSTALL
+++ b/INSTALL
@@ -1,3 +1,11 @@
+----------------------------------------------------------------------
+For the time being please always use the current version in CVS. See
+http://sourceforge.net/cvs/?group_id=67873 for information on how to
+access the CVS server. The module to download is called 'libgpod'. The
+package released on sourceforge is simply there to raise awareness and
+hopefully have some package maintainers pick up the library.
+----------------------------------------------------------------------
+
Copyright (C) 1994, 1995, 1996, 1999, 2000, 2001, 2002 Free Software
Foundation, Inc.
diff --git a/INSTALL_CVS b/INSTALL_CVS
index 81c82fa..db709c6 100644
--- a/INSTALL_CVS
+++ b/INSTALL_CVS
@@ -5,3 +5,11 @@ make
make install
See the INSTALL and TROUBLESHOOTING file for more information.
+
+----------------------------------------------------------------------
+For the time being please always use the current version in CVS. See
+http://sourceforge.net/cvs/?group_id=67873 for information on how to
+access the CVS server. The module to download is called 'libgpod'. The
+package released on sourceforge is simply there to raise awareness and
+hopefully have some package maintainers pick up the library.
+----------------------------------------------------------------------
diff --git a/README b/README
index e82ef3d..52dae19 100644
--- a/README
+++ b/README
@@ -12,3 +12,10 @@ photos please contact us so we can work together. Just drop a mail to
Gtkpod-devel@lists.sourceforge.net (you may ask to be CC in the
answer).
+----------------------------------------------------------------------
+For the time being please always use the current version in CVS. See
+http://sourceforge.net/cvs/?group_id=67873 for information on how to
+access the CVS server. The module to download is called 'libgpod'. The
+package released on sourceforge is simply there to raise awareness and
+hopefully have some package maintainers pick up the library.
+----------------------------------------------------------------------
diff --git a/configure.ac b/configure.ac
index eca3edb..01d274a 100644
--- a/configure.ac
+++ b/configure.ac
@@ -13,7 +13,7 @@ AM_CONFIG_HEADER(config.h)
#
LIBGPOD_MAJOR_VERSION=0
LIBGPOD_MINOR_VERSION=1
-LIBGPOD_MICRO_VERSION=2
+LIBGPOD_MICRO_VERSION=3
LIBGPOD_INTERFACE_AGE=0
# If you need a modifier for the version number.
# Normally empty, but can be used to make "fixup" releases.
diff --git a/src/itdb.h b/src/itdb.h
index a2fbe0b..35a6c42 100644
--- a/src/itdb.h
+++ b/src/itdb.h
@@ -1,4 +1,4 @@
-/* Time-stamp: <2005-09-19 19:14:40 jcs>
+/* Time-stamp: <2005-09-19 22:52:40 jcs>
|
| Copyright (C) 2002-2005 Jorg Schuler <jcsjcs at users sourceforge net>
| Part of the gtkpod project.
@@ -354,16 +354,17 @@ typedef struct
typedef struct
{
Itdb_iTunesDB *itdb; /* pointer to iTunesDB (for convenience) */
- gchar *name; /* name of playlist in UTF8 */
- guint32 type; /* PL_TYPE_MPL: master play list */
- gint num; /* number of tracks in playlist */
- GList *members; /* tracks in playlist (Track *) */
- gboolean is_spl; /* smart playlist? */
- guint32 timestamp; /* some timestamp */
- guint64 id; /* playlist ID */
- guint32 unk036, unk040, unk044;
- SPLPref splpref; /* smart playlist prefs */
- SPLRules splrules; /* rules for smart playlists */
+ gchar *name; /* name of playlist in UTF8 */
+ guint32 type; /* PL_TYPE_MPL: master play list */
+ gint num; /* number of tracks in playlist */
+ GList *members; /* tracks in playlist (Track *) */
+ gboolean is_spl; /* smart playlist? */
+ guint32 timestamp; /* some timestamp */
+ guint64 id; /* playlist ID */
+ guint32 unk036, unk040;
+ guint32 sortorder; /* How to sort playlist -- see below */
+ SPLPref splpref; /* smart playlist prefs */
+ SPLRules splrules; /* rules for smart playlists */
/* below is for use by application */
guint64 usertype;
gpointer userdata;
@@ -374,6 +375,72 @@ typedef struct
} Itdb_Playlist;
+/*
+Playlist Sort Order
+
+1 - playlist order (manual sort order)
+2 - ???
+3 - songtitle
+4 - album
+5 - artist
+6 - bitrate
+7 - genre
+8 - kind
+9 - date modified
+10 - track nr
+11 - size
+12 - time
+13 - year
+14 - sample rate
+15 - comment
+16 - date added
+17 - equalizer
+18 - composer
+19 - ???
+20 - play count
+21 - last played
+22 - disc nr
+23 - my rating
+24 - release date (I guess, it's the value for the "Podcasts" list)
+25 - BPM
+26 - grouping
+27 - category
+28 - description
+*/
+
+typedef enum
+{
+ ITDB_PSO_MANUAL = 1,
+/* ITDB_PSO_UNKNOWN = 2, */
+ ITDB_PSO_TITLE = 3,
+ ITDB_PSO_ALBUM = 4,
+ ITDB_PSO_ARTIST = 5,
+ ITDB_PSO_BIRATE = 6,
+ ITDB_PSO_GENRE = 7,
+ ITDB_PSO_FILETYPE = 8,
+ ITDB_PSO_TIME_MODIFIED = 9,
+ ITDB_PSO_TRACK_NR = 10,
+ ITDB_PSO_SIZE = 11,
+ ITDB_PSO_TIME = 12, /* ? */
+ ITDB_PSO_YEAR = 13,
+ ITDB_PSO_SAMPLERATE = 14,
+ ITDB_PSO_COMMENT = 15,
+ ITDB_PSO_TIME_ADDED = 16,
+ ITDB_PSO_EQUALIZER = 17, /* ? */
+ ITDB_PSO_COMPOSER = 18,
+/* ITDB_PSO_UNKNOWN = 19, */
+ ITDB_PSO_PLAYCOUNT = 20,
+ ITDB_PSO_TIME_PLAYED = 21,
+ ITDB_PSO_CD_NR = 22,
+ ITDB_PSO_RATING = 23,
+ ITDB_PSO_RELEASE_DATE = 24, /* used by podcasts */
+ ITDB_PSO_BPM = 25,
+ ITDB_PSO_GROUPING = 26,
+ ITDB_PSO_CATEGORY = 27,
+ ITDB_PSO_DESCRIPTION = 28
+} ItdbPlaylistSortOrder;
+
+
/* some of the descriptive comments below are copied verbatim from
http://ipodlinux.org/ITunesDB.
http://ipodlinux.org/ITunesDB is the best source for information
diff --git a/src/itdb_itunesdb.c b/src/itdb_itunesdb.c
index 9e8e65d..662304b 100644
--- a/src/itdb_itunesdb.c
+++ b/src/itdb_itunesdb.c
@@ -1,4 +1,4 @@
-/* Time-stamp: <2005-09-19 21:31:28 jcs>
+/* Time-stamp: <2005-09-20 00:06:36 jcs>
|
| Copyright (C) 2002-2005 Jorg Schuler <jcsjcs at users sourceforge net>
| Part of the gtkpod project.
@@ -1258,7 +1258,7 @@ static glong get_playlist (FImport *fimp, glong seek)
CHECK_ERROR (fimp, -1);
plitem->unk040 = get32lint (cts, seek+40);
CHECK_ERROR (fimp, -1);
- plitem->unk044 = get32lint (cts, seek+44);
+ plitem->sortorder = get32lint (cts, seek+44);
CHECK_ERROR (fimp, -1);
for (i=0; i < mhod_num; ++i)
{
@@ -2926,7 +2926,7 @@ static gboolean write_playlist(FExport *fexp, Itdb_Playlist *pl)
put64lint (cts, pl->id); /* 64 bit ID */
put32lint (cts, pl->unk036);
put32lint (cts, pl->unk040);
- put32lint (cts, pl->unk044);
+ put32lint (cts, pl->sortorder);
put32_n0 (cts, 15); /* ? */
mk_mhod (cts, MHOD_ID_TITLE, pl->name);
diff --git a/src/itdb_playlist.c b/src/itdb_playlist.c
index c228a41..362e8e5 100644
--- a/src/itdb_playlist.c
+++ b/src/itdb_playlist.c
@@ -1,4 +1,4 @@
-/* Time-stamp: <2005-09-17 21:52:19 jcs>
+/* Time-stamp: <2005-09-19 22:54:16 jcs>
|
| Copyright (C) 2002-2005 Jorg Schuler <jcsjcs at users sourceforge net>
| Part of the gtkpod project.
@@ -1016,6 +1016,8 @@ Itdb_Playlist *itdb_playlist_new (const gchar *title, gboolean spl)
pl->type = ITDB_PL_TYPE_NORM;
pl->name = g_strdup (title);
+ pl->sortorder = ITDB_PSO_MANUAL;
+
pl->is_spl = spl;
if (spl)
{
@@ -1085,6 +1087,7 @@ void itdb_playlist_add (Itdb_iTunesDB *itdb, Itdb_Playlist *pl, gint32 pos)
} while (id == 0);
pl->id = id;
}
+ if (pl->sortorder == 0) pl->sortorder = ITDB_PSO_MANUAL;
if (pos == -1) itdb->playlists = g_list_append (itdb->playlists, pl);
else itdb->playlists = g_list_insert (itdb->playlists, pl, pos);
}