Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
What's new
7
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Switch to GitLab Next
Sign in / Register
Toggle navigation
Open sidebar
Sublime Music
Sublime Music
Commits
fb4c3a09
Verified
Commit
fb4c3a09
authored
Feb 11, 2020
by
Senan Kelly
Browse files
Show a default cover art when `coverArt` not present in views
parent
a8ad114b
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
105 additions
and
0 deletions
+105
-0
setup.py
setup.py
+1
-0
sublime/cache_manager.py
sublime/cache_manager.py
+5
-0
sublime/ui/images/default-album-art.png
sublime/ui/images/default-album-art.png
+0
-0
sublime/ui/images/default-album-art.svg
sublime/ui/images/default-album-art.svg
+99
-0
No files found.
setup.py
View file @
fb4c3a09
...
...
@@ -47,6 +47,7 @@ setup(
'sublime'
:
[
'ui/app_styles.css'
,
'ui/images/play-queue-play.png'
,
'ui/images/default-album-art.png'
,
'ui/mpris_specs/org.mpris.MediaPlayer2.xml'
,
'ui/mpris_specs/org.mpris.MediaPlayer2.Player.xml'
,
'ui/mpris_specs/org.mpris.MediaPlayer2.Playlists.xml'
,
...
...
sublime/cache_manager.py
View file @
fb4c3a09
...
...
@@ -876,6 +876,11 @@ class CacheManager(metaclass=Singleton):
force
:
bool
=
False
,
allow_download
:
bool
=
True
,
)
->
'CacheManager.Result[Optional[str]]'
:
if
id
is
None
:
art_path
=
'ui/images/default-album-art.png'
return
CacheManager
.
Result
.
from_data
(
str
(
Path
(
__file__
).
joinpath
(
art_path
)
))
return
self
.
return_cached_or_download
(
f
'cover_art/
{
id
}
_
{
size
}
'
,
lambda
:
self
.
server
.
get_cover_art
(
id
,
str
(
size
)),
...
...
sublime/ui/images/default-album-art.png
0 → 100644
View file @
fb4c3a09
3.75 KB
sublime/ui/images/default-album-art.svg
0 → 100644
View file @
fb4c3a09
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<svg
xmlns:dc=
"http://purl.org/dc/elements/1.1/"
xmlns:cc=
"http://creativecommons.org/ns#"
xmlns:rdf=
"http://www.w3.org/1999/02/22-rdf-syntax-ns#"
xmlns:svg=
"http://www.w3.org/2000/svg"
xmlns=
"http://www.w3.org/2000/svg"
xmlns:sodipodi=
"http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
xmlns:inkscape=
"http://www.inkscape.org/namespaces/inkscape"
fill=
"#000000"
viewBox=
"0 0 24 24"
width=
"384px"
height=
"384px"
version=
"1.1"
id=
"svg6"
sodipodi:docname=
"icons8-music.svg"
inkscape:version=
"0.92.4 5da689c313, 2019-01-14"
>
<metadata
id=
"metadata12"
>
<rdf:RDF>
<cc:Work
rdf:about=
""
>
<dc:format>
image/svg+xml
</dc:format>
<dc:type
rdf:resource=
"http://purl.org/dc/dcmitype/StillImage"
/>
</cc:Work>
</rdf:RDF>
</metadata>
<defs
id=
"defs10"
/>
<sodipodi:namedview
pagecolor=
"#ffffff"
bordercolor=
"#666666"
borderopacity=
"1"
objecttolerance=
"10"
gridtolerance=
"10"
guidetolerance=
"10"
inkscape:pageopacity=
"0"
inkscape:pageshadow=
"2"
inkscape:window-width=
"1366"
inkscape:window-height=
"729"
id=
"namedview8"
showgrid=
"false"
inkscape:zoom=
"0.61458333"
inkscape:cx=
"192"
inkscape:cy=
"192"
inkscape:window-x=
"0"
inkscape:window-y=
"0"
inkscape:window-maximized=
"1"
inkscape:current-layer=
"svg6"
>
<sodipodi:guide
position=
"0,0"
orientation=
"0,384"
id=
"guide14"
inkscape:locked=
"false"
/>
<sodipodi:guide
position=
"24,0"
orientation=
"-384,0"
id=
"guide16"
inkscape:locked=
"false"
/>
<sodipodi:guide
position=
"24,24"
orientation=
"0,-384"
id=
"guide18"
inkscape:locked=
"false"
/>
<sodipodi:guide
position=
"0,24"
orientation=
"384,0"
id=
"guide20"
inkscape:locked=
"false"
/>
</sodipodi:namedview>
<rect
id=
"rect22"
width=
"24"
height=
"24"
x=
"0"
y=
"0"
style=
"stroke-width:0.0625;fill:#e6e6e6"
/>
<g
id=
"g26"
style=
"stroke:#b3b3b3"
>
<path
id=
"path2"
d=
"M9 15A3 3 0 1 0 9 21A3 3 0 1 0 9 15Z"
stroke-width=
"2"
stroke-miterlimit=
"10"
stroke=
"#000000"
fill=
"none"
style=
"stroke:#b3b3b3"
/>
<path
id=
"path4"
d=
"M12 18L12 4 18 4 18 8 13 8"
stroke-width=
"2"
stroke-miterlimit=
"10"
stroke=
"#000000"
fill=
"none"
style=
"stroke:#b3b3b3"
/>
</g>
</svg>
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