Show number of albums in toString().
[Sone.git] / src / main / java / net / pterodactylus / sone / data / Sone.java
index 22dc593..6bee1c1 100644 (file)
@@ -832,7 +832,10 @@ public class Sone implements Fingerprintable, Comparable<Sone> {
                hash.putString(")");
 
                hash.putString("Albums(");
-               for (Album album : albums) {
+               for (Album album : rootAlbum.getAlbums()) {
+                       if (!Album.NOT_EMPTY.apply(album)) {
+                               continue;
+                       }
                        hash.putString(album.getFingerprint());
                }
                hash.putString(")");
@@ -872,7 +875,7 @@ public class Sone implements Fingerprintable, Comparable<Sone> {
        /** {@inheritDoc} */
        @Override
        public String toString() {
-               return getClass().getName() + "[identity=" + identity + ",requestUri=" + requestUri + ",insertUri(" + String.valueOf(insertUri).length() + "),friends(" + friendSones.size() + "),posts(" + posts.size() + "),replies(" + replies.size() + ")]";
+               return getClass().getName() + "[identity=" + identity + ",requestUri=" + requestUri + ",insertUri(" + String.valueOf(insertUri).length() + "),friends(" + friendSones.size() + "),posts(" + posts.size() + "),replies(" + replies.size() + "),albums(" + getRootAlbum().getAlbums().size() + ")]";
        }
 
 }