-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Signed-off-by: Jon Mason <[email protected]>
- Loading branch information
Showing
1 changed file
with
9 additions
and
3 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -385,10 +385,16 @@ class album: | |
|
||
|
||
def _create_cddb_email(self): | ||
print "Would you like to send this via e-mail to update the CDDB?" | ||
choice = raw_input('--> ') | ||
if choice == "y" or choice == "Yes" or choice == "yes": | ||
print "Sending email..." | ||
else: | ||
return False | ||
|
||
sendmail_location = "/usr/sbin/sendmail" # sendmail location | ||
email = os.popen("%s -t" % sendmail_location, "w") | ||
#email.write("To: %s, %s\n" %("[email protected]", "[email protected]")) | ||
email.write("To: %s\n" % "[email protected]") | ||
email.write("To: %s\n" % "[email protected]") | ||
email.write("Subject: cddb %s %08lx\n" %(self.genre, self.cddb_checksum)) | ||
email.write("\n") # blank line separating headers from body | ||
|
||
|
@@ -497,7 +503,7 @@ class album: | |
time.sleep(1) | ||
print "No disc detected, retrying..." | ||
|
||
(error, query_info) = CDDB.query(disc_id) | ||
(error, query_info) = CDDB.query(disc_id, 'https://gnudb.gnudb.org/~cddb/cddb.cgi') | ||
if error != 200 and error != 210 and error != 211 and error != 202: | ||
print "Error encountered querying CDDB, error = %d" %error | ||
return True | ||
|