mpris: use sha1 for caching

This commit is contained in:
Aylur
2023-10-23 02:20:15 +02:00
parent b903646420
commit 1c0b049eec
+1 -5
View File
@@ -179,11 +179,7 @@ class MprisPlayer extends Service {
private _cacheCoverArt() {
this.updateProperty('cover-path', MEDIA_CACHE_PATH + '/' +
`${this._trackArtists.join(', ')}-${this._trackTitle}`
.replace(/[\,\*\?\"\<\>\|\#\:\?\/\'\(\)]/g, ''));
if (this._coverPath.length > 255)
this._coverPath = this._coverPath.substring(0, 255);
GLib.compute_checksum_for_string(GLib.ChecksumType.SHA1, this.track_cover_url, -1));
if (this._trackCoverUrl === '' || this._coverPath === '')
return;