Author: jwilcox
Date: 2007-03-29 16:07:47 -0500 (Thu, 29 Mar 2007)
New Revision: 75174
Modified:
trunk/ipod-sharp/ChangeLog
trunk/ipod-sharp/src/TrackDatabase.cs
Log:
2007-03-29 James Willcox <[EMAIL PROTECTED]>
* src/TrackDatabase.cs: add write support for this new album list
data
Modified: trunk/ipod-sharp/ChangeLog
===================================================================
--- trunk/ipod-sharp/ChangeLog 2007-03-29 20:55:16 UTC (rev 75173)
+++ trunk/ipod-sharp/ChangeLog 2007-03-29 21:07:47 UTC (rev 75174)
@@ -1,5 +1,10 @@
2007-03-29 James Willcox <[EMAIL PROTECTED]>
+ * src/TrackDatabase.cs: add write support for this new album list
+ data
+
+2007-03-29 James Willcox <[EMAIL PROTECTED]>
+
* src/TrackDatabase.cs: oops, there are some new mhod types in the
album list data. This adds them.
Modified: trunk/ipod-sharp/src/TrackDatabase.cs
===================================================================
--- trunk/ipod-sharp/src/TrackDatabase.cs 2007-03-29 20:55:16 UTC (rev
75173)
+++ trunk/ipod-sharp/src/TrackDatabase.cs 2007-03-29 21:07:47 UTC (rev
75174)
@@ -638,8 +638,8 @@
PlaylistRules = 51,
LibraryIndex = 52,
Misc = 100,
- AlbumListArtist = 200,
- AlbumListAlbum = 201,
+ AlbumListAlbum = 200,
+ AlbumListArtist = 201,
}
internal enum IndexType {
@@ -784,7 +784,7 @@
writer.Write (unknownOne);
writer.Write (unknownTwo);
- if ((int) Type < 50) {
+ if ((int) Type < 50 || Type == DetailType.AlbumListArtist || Type
== DetailType.AlbumListAlbum) {
if (Type == DetailType.PodcastUrl || Type ==
DetailType.PodcastUrl2 ||
Type == DetailType.ChapterData) {
writer.Write (valbytes);
@@ -1560,11 +1560,6 @@
}
public override void Save (DatabaseRecord db, BinaryWriter writer) {
- DataSetRecord albumSet = this[DataSetIndex.AlbumList];
- if (albumSet != null) {
- datasets.Remove (albumSet);
- }
-
ReassignTrackIds ();
MemoryStream stream = new MemoryStream ();
@@ -2031,11 +2026,11 @@
continue;
DetailRecord albumDetail = new DetailRecord (dbrec.IsBE);
- albumDetail.Type = DetailType.Album;
+ albumDetail.Type = DetailType.AlbumListAlbum;
albumDetail.Value = splitAlbum[0];
DetailRecord artistDetail = new DetailRecord (dbrec.IsBE);
- artistDetail.Type = DetailType.Artist;
+ artistDetail.Type = DetailType.AlbumListArtist;
artistDetail.Value = splitAlbum[1];
item.Add (albumDetail);
@@ -2047,6 +2042,7 @@
public void Save () {
CheckFreeSpace ();
+ CreateAlbumList ();
// make sure all the new tracks have file names, and that they
exist
foreach (Track track in tracksToAdd) {
_______________________________________________
Mono-patches maillist - [email protected]
http://lists.ximian.com/mailman/listinfo/mono-patches