From ca90bbf90c6520dcd99676918574c1858216ee8b Mon Sep 17 00:00:00 2001 From: NicoHood Date: Sun, 17 Jan 2016 12:15:27 +0100 Subject: [PATCH 1/2] Corrected minor comment --- shuffle.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/shuffle.py b/shuffle.py index 7c07f9c..88ecf98 100755 --- a/shuffle.py +++ b/shuffle.py @@ -203,7 +203,7 @@ class TunesSD(Record): ]) def construct(self): - # The header is a fixed length, so no need to precalculate it + # The header is a fixed length, so no need to calculate it self.track_header.base_offset = 64 track_header = self.track_header.construct() From 491f74c0322235eab3a6ff3b29af63b6c8b6c9be Mon Sep 17 00:00:00 2001 From: NicoHood Date: Sun, 17 Jan 2016 12:15:43 +0100 Subject: [PATCH 2/2] Check if path exists --- shuffle.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/shuffle.py b/shuffle.py index 88ecf98..e1fa0e9 100755 --- a/shuffle.py +++ b/shuffle.py @@ -555,6 +555,10 @@ if __name__ == '__main__': parser.add_argument('path') result = parser.parse_args() + if not os.path.isdir(result.path): + print "Error finding IPod directory. Maybe it is not connected or mounted?" + sys.exit() + if result.rename_unicode: check_unicode(result.path)