mirror of
https://github.com/beetbox/beets.git
synced 2025-12-14 20:43:41 +01:00
Gmusic fixes based on review and changelog addition
* Fixes based on review and changelog addition
This commit is contained in:
parent
ef4490087b
commit
cfe8ed9c34
2 changed files with 10 additions and 5 deletions
|
|
@ -41,7 +41,7 @@ class Gmusic(BeetsPlugin):
|
|||
self.config.add({
|
||||
u'auto': False,
|
||||
})
|
||||
if self.config['auto'].get(bool):
|
||||
if self.config['auto']:
|
||||
self.import_stages = [self.autoupload]
|
||||
|
||||
def commands(self):
|
||||
|
|
@ -63,19 +63,22 @@ class Gmusic(BeetsPlugin):
|
|||
|
||||
def upload(self, lib, opts, args):
|
||||
items = lib.items(ui.decargs(args))
|
||||
files = [x.path.decode('utf-8') for x in items]
|
||||
files = self.getpaths(items)
|
||||
ui.print_(u'Uploading your files...')
|
||||
self.m.upload(filepaths=files)
|
||||
ui.print_(u'Your files were successfully added to library')
|
||||
|
||||
def autoupload(self, session, task):
|
||||
items = task.imported_items()
|
||||
files = [x.path.decode('utf-8') for x in items]
|
||||
ui.print_(u'Uploading your files to Google Play Music...')
|
||||
files = self.getpaths(items)
|
||||
self._log.info(u'Uploading files to Google Play Music...', files)
|
||||
self.m.upload(filepaths=files)
|
||||
ui.print_(u'Your files were successfully added to your '
|
||||
self._log.info(u'Your files were successfully added to your '
|
||||
+ 'Google Play Music library')
|
||||
|
||||
def getpaths(self, items):
|
||||
return [x.path for x in items]
|
||||
|
||||
def search(self, lib, opts, args):
|
||||
password = config['gmusic']['password']
|
||||
email = config['gmusic']['email']
|
||||
|
|
|
|||
|
|
@ -16,6 +16,8 @@ New features:
|
|||
:bug:`2944`
|
||||
* Added whitespace padding to missing tracks dialog to improve readability.
|
||||
:user:`jams2`
|
||||
* Automatically upload to Google Play Music library on track import.
|
||||
:user:`shuaiscott`
|
||||
|
||||
Fixes:
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue