Don't auto search for manually added VA albums

This commit is contained in:
Ade
2014-09-27 09:40:31 +12:00
parent d887d06a4f
commit e07fafda6e
2 changed files with 13 additions and 4 deletions

View File

@@ -664,14 +664,21 @@ def addReleaseById(rid, rgid=None):
myDB.upsert("tracks", newValueDict, controlValueDict)
# Reset status
wanted = True
if status == 'Loading':
controlValueDict = {"AlbumID": rgid}
newValueDict = {"Status": "Wanted"}
if artistid not in blacklisted_special_artists:
newValueDict = {"Status": "Wanted"}
else:
newValueDict = {"Status": "Skipped"}
wanted = False
myDB.upsert("albums", newValueDict, controlValueDict)
# Start a search for the album
import searcher
searcher.searchforalbum(rgid, False)
if wanted:
import searcher
searcher.searchforalbum(rgid, False)
elif not rg_exists and not release_dict:
logger.error("ReleaseGroup does not exist in the database and did not get a valid response from MB. Skipping release.")
if status == 'Loading':

View File

@@ -221,6 +221,7 @@ class WebInterface(object):
rgids = myDB.select('SELECT DISTINCT ReleaseGroupID FROM albums JOIN releases ON AlbumID = ReleaseGroupID WHERE ArtistID=?', [ArtistID])
for rgid in rgids:
myDB.action('DELETE from releases WHERE ReleaseGroupID=?', [rgid['ReleaseGroupID']])
myDB.action('DELETE from have WHERE Matched=?', [rgid['ReleaseGroupID']])
myDB.action('DELETE from albums WHERE ArtistID=?', [ArtistID])
myDB.action('DELETE from tracks WHERE ArtistID=?', [ArtistID])
@@ -228,10 +229,11 @@ class WebInterface(object):
rgids = myDB.select('SELECT DISTINCT ReleaseGroupID FROM allalbums JOIN releases ON AlbumID = ReleaseGroupID WHERE ArtistID=?', [ArtistID])
for rgid in rgids:
myDB.action('DELETE from releases WHERE ReleaseGroupID=?', [rgid['ReleaseGroupID']])
myDB.action('DELETE from have WHERE Matched=?', [rgid['ReleaseGroupID']])
myDB.action('DELETE from allalbums WHERE ArtistID=?', [ArtistID])
myDB.action('DELETE from alltracks WHERE ArtistID=?', [ArtistID])
myDB.action('UPDATE have SET Matched=NULL WHERE ArtistName=?', [artistname])
myDB.action('DELETE from have WHERE ArtistName=?', [artistname])
myDB.action('INSERT OR REPLACE into blacklist VALUES (?)', [ArtistID])
raise cherrypy.HTTPRedirect("home")
deleteArtist.exposed = True