mirror of
https://github.com/rembo10/headphones.git
synced 2026-07-22 00:44:00 +01:00
Don't auto search for manually added VA albums
This commit is contained in:
+10
-3
@@ -664,14 +664,21 @@ def addReleaseById(rid, rgid=None):
|
|||||||
myDB.upsert("tracks", newValueDict, controlValueDict)
|
myDB.upsert("tracks", newValueDict, controlValueDict)
|
||||||
|
|
||||||
# Reset status
|
# Reset status
|
||||||
|
wanted = True
|
||||||
if status == 'Loading':
|
if status == 'Loading':
|
||||||
controlValueDict = {"AlbumID": rgid}
|
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)
|
myDB.upsert("albums", newValueDict, controlValueDict)
|
||||||
|
|
||||||
# Start a search for the album
|
# Start a search for the album
|
||||||
import searcher
|
if wanted:
|
||||||
searcher.searchforalbum(rgid, False)
|
import searcher
|
||||||
|
searcher.searchforalbum(rgid, False)
|
||||||
|
|
||||||
elif not rg_exists and not release_dict:
|
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.")
|
logger.error("ReleaseGroup does not exist in the database and did not get a valid response from MB. Skipping release.")
|
||||||
if status == 'Loading':
|
if status == 'Loading':
|
||||||
|
|||||||
@@ -221,6 +221,7 @@ class WebInterface(object):
|
|||||||
rgids = myDB.select('SELECT DISTINCT ReleaseGroupID FROM albums JOIN releases ON AlbumID = ReleaseGroupID WHERE ArtistID=?', [ArtistID])
|
rgids = myDB.select('SELECT DISTINCT ReleaseGroupID FROM albums JOIN releases ON AlbumID = ReleaseGroupID WHERE ArtistID=?', [ArtistID])
|
||||||
for rgid in rgids:
|
for rgid in rgids:
|
||||||
myDB.action('DELETE from releases WHERE ReleaseGroupID=?', [rgid['ReleaseGroupID']])
|
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 albums WHERE ArtistID=?', [ArtistID])
|
||||||
myDB.action('DELETE from tracks 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])
|
rgids = myDB.select('SELECT DISTINCT ReleaseGroupID FROM allalbums JOIN releases ON AlbumID = ReleaseGroupID WHERE ArtistID=?', [ArtistID])
|
||||||
for rgid in rgids:
|
for rgid in rgids:
|
||||||
myDB.action('DELETE from releases WHERE ReleaseGroupID=?', [rgid['ReleaseGroupID']])
|
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 allalbums WHERE ArtistID=?', [ArtistID])
|
||||||
myDB.action('DELETE from alltracks 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])
|
myDB.action('INSERT OR REPLACE into blacklist VALUES (?)', [ArtistID])
|
||||||
raise cherrypy.HTTPRedirect("home")
|
raise cherrypy.HTTPRedirect("home")
|
||||||
deleteArtist.exposed = True
|
deleteArtist.exposed = True
|
||||||
|
|||||||
Reference in New Issue
Block a user