mirror of
https://github.com/rembo10/headphones.git
synced 2026-07-16 22:14:00 +01:00
Possible fix for album art permissions not being updated
This commit is contained in:
@@ -500,11 +500,11 @@ def addAlbumArt(artwork, albumpath, release):
|
|||||||
if album_art_name.startswith('.'):
|
if album_art_name.startswith('.'):
|
||||||
album_art_name = album_art_name.replace(0, '_')
|
album_art_name = album_art_name.replace(0, '_')
|
||||||
|
|
||||||
prev = os.umask(headphones.UMASK)
|
#prev = os.umask(headphones.UMASK)
|
||||||
file = open(os.path.join(albumpath, album_art_name), 'wb')
|
file = open(os.path.join(albumpath, album_art_name), 'wb')
|
||||||
file.write(artwork)
|
file.write(artwork)
|
||||||
file.close()
|
file.close()
|
||||||
os.umask(prev)
|
#os.umask(prev)
|
||||||
|
|
||||||
def cleanupFiles(albumpath):
|
def cleanupFiles(albumpath):
|
||||||
logger.info('Cleaning up files')
|
logger.info('Cleaning up files')
|
||||||
@@ -799,10 +799,10 @@ def embedLyrics(downloaded_track_list):
|
|||||||
logger.debug('Adding lyrics to: %s' % downloaded_track.decode(headphones.SYS_ENCODING, 'replace'))
|
logger.debug('Adding lyrics to: %s' % downloaded_track.decode(headphones.SYS_ENCODING, 'replace'))
|
||||||
f.lyrics = metalyrics
|
f.lyrics = metalyrics
|
||||||
try:
|
try:
|
||||||
f.save()
|
f.save()
|
||||||
except:
|
except:
|
||||||
logger.error('Cannot save lyrics to: %s. Skipping' % downloaded_track.decode(headphones.SYS_ENCODING, 'replace'))
|
logger.error('Cannot save lyrics to: %s. Skipping' % downloaded_track.decode(headphones.SYS_ENCODING, 'replace'))
|
||||||
continue
|
continue
|
||||||
|
|
||||||
def renameFiles(albumpath, downloaded_track_list, release):
|
def renameFiles(albumpath, downloaded_track_list, release):
|
||||||
logger.info('Renaming files')
|
logger.info('Renaming files')
|
||||||
|
|||||||
Reference in New Issue
Block a user