From dde2e3b4059e3a8b7b9c52582b4084e8ae2f5a9e Mon Sep 17 00:00:00 2001 From: Arno Hautala Date: Wed, 1 Sep 2021 12:30:00 -0400 Subject: [PATCH] comments --- ipod-shuffle-4g.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/ipod-shuffle-4g.py b/ipod-shuffle-4g.py index 22bee31..2a174de 100755 --- a/ipod-shuffle-4g.py +++ b/ipod-shuffle-4g.py @@ -476,6 +476,9 @@ class PlaylistHeader(Record): self["number_of_playlists"] = playlistcount if podcastlistcount > 0: + # "number_of_non_podcast_lists" should default to 65535 if there + # aren't any podcast playlists, so only calculate the count if + # the podcastlistcount is greater than 0 self["number_of_non_podcast_lists"] = playlistcount - podcastlistcount self["total_length"] = 0x14 + (self["number_of_playlists"] * 4) # Start the header