some changes
This commit is contained in:
22
repear.py
22
repear.py
@@ -42,10 +42,6 @@ from pathlib import Path
|
||||
import iTunesDB, mp3info, hash58
|
||||
Options = {}
|
||||
|
||||
################################################################################
|
||||
## Some internal management functions ##
|
||||
################################################################################
|
||||
|
||||
broken_log = False
|
||||
homedir = ""
|
||||
logfile = None
|
||||
@@ -1369,24 +1365,6 @@ NOTE: The database is already frozen.
|
||||
"ERROR: The iTunesDB file could not be written. This means that the iPod will\n" +
|
||||
"not play anything.\n")
|
||||
|
||||
# write iPod shuffle stuff (if necessary)
|
||||
if os.path.exists(CONTROL_DIR + "iTunesSD"):
|
||||
backup(CONTROL_DIR + "iTunesSD")
|
||||
log("Creating iTunesSD ... ", True)
|
||||
db = iTunesDB.iTunesSD(tracklist)
|
||||
try:
|
||||
f = open(CONTROL_DIR + "iTunesSD", "wb")
|
||||
f.write(db)
|
||||
f.close()
|
||||
log("\n")
|
||||
except IOError as e:
|
||||
write_ok = False
|
||||
log("FAILED: %s\n" % e.strerror +
|
||||
"ERROR: The iTunesSD file could not be written. This means that the iPod will\n" +
|
||||
"not play anything.\n")
|
||||
delete(CONTROL_DIR + "iTunesShuffle")
|
||||
delete(CONTROL_DIR + "iTunesPState")
|
||||
|
||||
# generate statistics
|
||||
if write_ok:
|
||||
log("\nYou can now unmount the iPod and listen to your music.\n")
|
||||
|
||||
Reference in New Issue
Block a user