[Schmitzm-commits] r2286 - trunk/schmitzm-mp3/src/main/java/de/schmitzm/mp3/id3

scm-commit at wald.intevation.org scm-commit at wald.intevation.org
Tue Mar 26 00:05:45 CET 2013


Author: mojays
Date: 2013-03-26 00:05:45 +0100 (Tue, 26 Mar 2013)
New Revision: 2286

Modified:
   trunk/schmitzm-mp3/src/main/java/de/schmitzm/mp3/id3/ID3TagUtil.java
Log:
ID3TagUtil: handle 0 track number as NULL


Modified: trunk/schmitzm-mp3/src/main/java/de/schmitzm/mp3/id3/ID3TagUtil.java
===================================================================
--- trunk/schmitzm-mp3/src/main/java/de/schmitzm/mp3/id3/ID3TagUtil.java	2013-03-25 21:10:30 UTC (rev 2285)
+++ trunk/schmitzm-mp3/src/main/java/de/schmitzm/mp3/id3/ID3TagUtil.java	2013-03-25 23:05:45 UTC (rev 2286)
@@ -308,8 +308,11 @@
                     return ((ID3V2Tag)tag).getAlbum();
                   break;
       case TRACKNO: Integer track = null; 
-                    if ( tag instanceof ID3V1_1Tag )
+                    if ( tag instanceof ID3V1_1Tag ) {
                       track = ((ID3V1_1Tag)tag).getAlbumTrack();
+                      if ( track == 0 )
+                        return null;
+                    }
                     if ( tag instanceof ID3V2Tag )
                       track = getTrackNumber(((ID3V2Tag)tag));
                     if ( track == null )



More information about the Schmitzm-commits mailing list