Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
script.spotify.screensaver
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
kodi
script.spotify.screensaver
Commits
c9be3476
Commit
c9be3476
authored
3 years ago
by
Benoît Harrault
Browse files
Options
Downloads
Plain Diff
Merge branch '15-fix-fail-on-get-track-name' into 'master'
Resolve "Fix fail on get track name" Closes
#15
See merge request
!11
parents
22b9dc3e
d794c3c8
No related branches found
No related tags found
1 merge request
!11
Resolve "Fix fail on get track name"
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
addon.xml
+1
-1
1 addition, 1 deletion
addon.xml
gui.py
+13
-8
13 additions, 8 deletions
gui.py
with
14 additions
and
9 deletions
addon.xml
+
1
−
1
View file @
c9be3476
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<addon
id=
"script.spotify.screensaver"
<addon
id=
"script.spotify.screensaver"
name=
"Spotify Screensaver"
name=
"Spotify Screensaver"
version=
"0.0.
6
"
version=
"0.0.
7
"
provider-name=
"Benoît Harrault"
>
provider-name=
"Benoît Harrault"
>
<requires>
<requires>
<import
addon=
"xbmc.python"
version=
"2.25.0"
/>
<import
addon=
"xbmc.python"
version=
"2.25.0"
/>
...
...
This diff is collapsed.
Click to expand it.
gui.py
+
13
−
8
View file @
c9be3476
...
@@ -153,16 +153,21 @@ class GUI(xbmcgui.WindowXMLDialog):
...
@@ -153,16 +153,21 @@ class GUI(xbmcgui.WindowXMLDialog):
)
)
data
=
response
.
json
()
data
=
response
.
json
()
track_name
=
data
[
'
name
'
]
track_name
=
data
.
get
(
'
name
'
,
''
)
# album/track image
# album/track image
album
=
data
[
'
album
'
]
album
=
data
.
get
(
'
album
'
)
images
=
album
[
'
images
'
]
if
album
is
not
None
:
image_url
=
images
[
0
][
'
url
'
]
images
=
album
.
get
(
'
images
'
)
if
images
is
not
None
:
imageLST
.
append
(
image
=
images
[
0
]
xbmcgui
.
ListItem
(
track_name
,
thumbnailImage
=
image_url
)
if
image
is
not
None
:
)
image_url
=
image
.
get
(
'
url
'
)
if
image_url
is
not
None
:
imageLST
.
append
(
xbmcgui
.
ListItem
(
track_name
,
thumbnailImage
=
image_url
)
)
except
Exception
as
e
:
except
Exception
as
e
:
self
.
log
(
'
failed to get track data
'
+
str
(
e
),
xbmc
.
LOGERROR
)
self
.
log
(
'
failed to get track data
'
+
str
(
e
),
xbmc
.
LOGERROR
)
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment