Author: jwilcox
Date: 2007-04-20 18:14:29 -0400 (Fri, 20 Apr 2007)
New Revision: 76028

Modified:
   trunk/ipod-sharp/ChangeLog
   trunk/ipod-sharp/src/TrackDatabase.cs
Log:
2007-04-20  James Willcox  <[EMAIL PROTECTED]>

        * src/TrackDatabase.cs: add yet another detail type found in
        album list.



Modified: trunk/ipod-sharp/ChangeLog
===================================================================
--- trunk/ipod-sharp/ChangeLog  2007-04-20 22:10:42 UTC (rev 76027)
+++ trunk/ipod-sharp/ChangeLog  2007-04-20 22:14:29 UTC (rev 76028)
@@ -1,3 +1,8 @@
+2007-04-20  James Willcox  <[EMAIL PROTECTED]>
+
+       * src/TrackDatabase.cs: add yet another detail type found in
+       album list.
+
 2007-04-04  Aaron Bockover  <[EMAIL PROTECTED]>
 
        0.6.3 Released

Modified: trunk/ipod-sharp/src/TrackDatabase.cs
===================================================================
--- trunk/ipod-sharp/src/TrackDatabase.cs       2007-04-20 22:10:42 UTC (rev 
76027)
+++ trunk/ipod-sharp/src/TrackDatabase.cs       2007-04-20 22:14:29 UTC (rev 
76028)
@@ -640,6 +640,7 @@
         Misc = 100,
         AlbumListAlbum = 200,
         AlbumListArtist = 201,
+        AlbumListTitle = 202,
         AlbumListPodcastUrl = 203
     }
 
@@ -685,13 +686,14 @@
             Type = (DetailType) ToInt32 (body, 0);
 
             if ((int) Type > 50 && Type != DetailType.Misc && Type != 
DetailType.LibraryIndex &&
-                Type != DetailType.AlbumListArtist && Type != 
DetailType.AlbumListAlbum && Type != DetailType.AlbumListPodcastUrl)
+                Type != DetailType.AlbumListArtist && Type != 
DetailType.AlbumListAlbum &&
+                Type != DetailType.AlbumListPodcastUrl && Type != 
DetailType.AlbumListTitle)
                 throw new DatabaseReadException ("Unsupported detail type: " + 
Type);
 
             unknownOne = ToInt32 (body, 4);
             unknownTwo = ToInt32 (body, 8);
             
-            if ((int) Type < 50 || Type == DetailType.AlbumListArtist || Type 
== DetailType.AlbumListAlbum || Type == DetailType.AlbumListPodcastUrl) {
+            if ((int) Type < 50 || (int) Type >= 200) {
                 if (Type == DetailType.PodcastUrl ||
                     Type == DetailType.PodcastUrl2) {
 
@@ -708,7 +710,7 @@
                     int strlen = 0;
                     //int strenc = 0;
             
-                    if ((int) Type < 50 || Type == DetailType.AlbumListArtist 
|| Type == DetailType.AlbumListAlbum || Type == DetailType.AlbumListPodcastUrl) 
{
+                    if ((int) Type < 50 || (int) Type >= 200) {
                         // 'string' mhods       
                         strlen = ToInt32 (body, 16);
                         //strenc = ToInt32 (body, 20); // 0 == UTF16, 1 == UTF8
@@ -758,8 +760,7 @@
 
             byte[] valbytes = null;
 
-            if ((int) Type < 50 || Type == DetailType.AlbumListArtist || Type 
== DetailType.AlbumListAlbum ||
-                Type == DetailType.AlbumListPodcastUrl) {
+            if ((int) Type < 50 || (int) Type >= 200) {
                 if (Type == DetailType.PodcastUrl || Type == 
DetailType.PodcastUrl2) {
                     valbytes = Encoding.UTF8.GetBytes (Value);
                     writer.Write (24 + valbytes.Length);
@@ -786,8 +787,7 @@
             writer.Write (unknownOne);
             writer.Write (unknownTwo);
 
-            if ((int) Type < 50 || Type == DetailType.AlbumListArtist || Type 
== DetailType.AlbumListAlbum ||
-                Type == DetailType.AlbumListPodcastUrl) {
+            if ((int) Type < 50 || (int) Type >= 200) {
                 if (Type == DetailType.PodcastUrl || Type == 
DetailType.PodcastUrl2 ||
                     Type == DetailType.ChapterData) {
                     writer.Write (valbytes);

_______________________________________________
Mono-patches maillist  -  [email protected]
http://lists.ximian.com/mailman/listinfo/mono-patches

Reply via email to