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
Compare revisions
22b9dc3efb53bfd34e10bd0d293b13b9ce3d14fa to c9be347696aadc434157ad3842052a78c76ab8d0
Compare revisions
Changes are shown as if the
source
revision was being merged into the
target
revision.
Learn more about comparing revisions.
Source
kodi/script.spotify.screensaver
Select target project
No results found
c9be347696aadc434157ad3842052a78c76ab8d0
Select Git revision
Branches
master
Swap
Target
kodi/script.spotify.screensaver
Select target project
kodi/script.spotify.screensaver
1 result
22b9dc3efb53bfd34e10bd0d293b13b9ce3d14fa
Select Git revision
Branches
master
Show changes
Only incoming changes from source
Include changes to target since source was created
Compare
Commits on Source (2)
Fix get track data
· d794c3c8
Benoît Harrault
authored
3 years ago
d794c3c8
Merge branch '15-fix-fail-on-get-track-name' into 'master'
· c9be3476
Benoît Harrault
authored
3 years ago
Resolve "Fix fail on get track name" Closes
#15
See merge request
!11
c9be3476
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
View file @
c9be3476
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<addon
id=
"script.spotify.screensaver"
name=
"Spotify Screensaver"
version=
"0.0.
6
"
version=
"0.0.
7
"
provider-name=
"Benoît Harrault"
>
<requires>
<import
addon=
"xbmc.python"
version=
"2.25.0"
/>
...
...
This diff is collapsed.
Click to expand it.
gui.py
View file @
c9be3476
...
...
@@ -153,16 +153,21 @@ class GUI(xbmcgui.WindowXMLDialog):
)
data
=
response
.
json
()
track_name
=
data
[
'
name
'
]
track_name
=
data
.
get
(
'
name
'
,
''
)
# album/track image
album
=
data
[
'
album
'
]
images
=
album
[
'
images
'
]
image_url
=
images
[
0
][
'
url
'
]
imageLST
.
append
(
xbmcgui
.
ListItem
(
track_name
,
thumbnailImage
=
image_url
)
)
album
=
data
.
get
(
'
album
'
)
if
album
is
not
None
:
images
=
album
.
get
(
'
images
'
)
if
images
is
not
None
:
image
=
images
[
0
]
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
:
self
.
log
(
'
failed to get track data
'
+
str
(
e
),
xbmc
.
LOGERROR
)
...
...
This diff is collapsed.
Click to expand it.