Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
M
mymusiclist
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
1
Issues
1
List
Board
Labels
Milestones
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Commits
Issue Boards
Open sidebar
Brian Guadalupe
mymusiclist
Commits
787d171a
Commit
787d171a
authored
Nov 20, 2017
by
Gink
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix edge cases
parent
6257f2d2
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
6 additions
and
5 deletions
+6
-5
exthook.py
core/exthook.py
+6
-5
No files found.
core/exthook.py
View file @
787d171a
...
...
@@ -2,6 +2,7 @@
import
pprint
import
musicbrainzngs
from
musicbrainzngs
import
ResponseError
from
musicbrainzngs
import
NetworkError
from
core.models
import
Album
pp
=
pprint
.
PrettyPrinter
(
indent
=
4
)
...
...
@@ -18,12 +19,12 @@ def verifyAlbumArt(album, artist):
def
fetchAlbumArt
(
name
,
artist
):
debug
(
"GET "
+
name
+
" "
+
artist
)
results
=
musicbrainzngs
.
search_release_groups
(
name
,
limit
=
3
,
artistname
=
artist
,
primarytype
=
"album"
)
#pp.pprint(results['release-group-list'])
results
=
results
[
'release-group-list'
]
resultid
=
results
[
0
][
'id'
]
debug
(
"ID = "
+
resultid
)
try
:
results
=
musicbrainzngs
.
search_release_groups
(
name
,
limit
=
3
,
artistname
=
artist
,
primarytype
=
"album"
)
#pp.pprint(results['release-group-list'])
results
=
results
[
'release-group-list'
]
resultid
=
results
[
0
][
'id'
]
debug
(
"ID = "
+
resultid
)
imagelist
=
musicbrainzngs
.
get_release_group_image_list
(
resultid
)
except
ResponseError
:
debug
(
"No image found."
)
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment