mirror of
https://github.com/rembo10/headphones.git
synced 2026-07-22 17:04:01 +01:00
Merge branch 'develop' of github.com:rembo10/headphones into new-interface
This commit is contained in:
@@ -272,7 +272,7 @@ def addReleaseById(rid):
|
|||||||
|
|
||||||
#we don't want to make more calls to MB here unless we have to, could be happening quite a lot
|
#we don't want to make more calls to MB here unless we have to, could be happening quite a lot
|
||||||
#TODO: why do I have to str() this here? I don't get it.
|
#TODO: why do I have to str() this here? I don't get it.
|
||||||
rg_exists = myDB.select("SELECT * from albums WHERE AlbumID=?", [rid])
|
rg_exists = myDB.select("SELECT * from albums WHERE AlbumID=?", [rgid])
|
||||||
|
|
||||||
#make sure the artist exists since I don't know what happens later if it doesn't
|
#make sure the artist exists since I don't know what happens later if it doesn't
|
||||||
artist_exists = myDB.select("SELECT * from artists WHERE ArtistID=?", [release_dict['artist_id']])
|
artist_exists = myDB.select("SELECT * from artists WHERE ArtistID=?", [release_dict['artist_id']])
|
||||||
|
|||||||
@@ -101,7 +101,7 @@ def verify(albumid, albumpath):
|
|||||||
|
|
||||||
myDB.upsert("tracks", newValueDict, controlValueDict)
|
myDB.upsert("tracks", newValueDict, controlValueDict)
|
||||||
|
|
||||||
controlValueDict = {"ArtistID": albumid}
|
controlValueDict = {"ArtistID": release_dict['artist_id']}
|
||||||
newValueDict = {"Status": "Paused"}
|
newValueDict = {"Status": "Paused"}
|
||||||
|
|
||||||
myDB.upsert("artists", newValueDict, controlValueDict)
|
myDB.upsert("artists", newValueDict, controlValueDict)
|
||||||
@@ -164,7 +164,11 @@ def verify(albumid, albumpath):
|
|||||||
|
|
||||||
logger.warn('Could not identify album: %s. It may not be the intended album.' % albumpath)
|
logger.warn('Could not identify album: %s. It may not be the intended album.' % albumpath)
|
||||||
myDB.action('UPDATE snatched SET status = "Unprocessed" WHERE AlbumID=?', [albumid])
|
myDB.action('UPDATE snatched SET status = "Unprocessed" WHERE AlbumID=?', [albumid])
|
||||||
renameUnprocessedFolder(albumpath)
|
processed = re.search(r' \(Unprocessed\)(?:\[\d+\])?', albumpath)
|
||||||
|
if not processed:
|
||||||
|
renameUnprocessedFolder(albumpath)
|
||||||
|
else:
|
||||||
|
logger.info("Already marked as unprocessed: " + albumpath)
|
||||||
|
|
||||||
def doPostProcessing(albumid, albumpath, release, tracks, downloaded_track_list):
|
def doPostProcessing(albumid, albumpath, release, tracks, downloaded_track_list):
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user