diff --git a/com.spotify.Client.desktop b/com.spotify.Client.desktop index f324dc9..78f786c 100644 --- a/com.spotify.Client.desktop +++ b/com.spotify.Client.desktop @@ -2,11 +2,10 @@ Type=Application Name=Spotify GenericName=Music Player -Icon=com.spotify.Client +Icon=/usr/share/spotify/icons/spotify-linux-128.png TryExec=spotify Exec=spotify %U Terminal=false MimeType=x-scheme-handler/spotify; Categories=Audio;Music;Player;AudioVideo; StartupWMClass=spotify -X-GNOME-UsesNotifications=true diff --git a/com.spotify.Client.json b/com.spotify.Client.json index 7ebfce7..b047997 100644 --- a/com.spotify.Client.json +++ b/com.spotify.Client.json @@ -23,124 +23,17 @@ "--env=LD_LIBRARY_PATH=/app/lib", "--env=TMPDIR=/tmp" ], - "cleanup": [ - "/include", - "/lib/pkgconfig", - "/share/pkgconfig", - "/share/aclocal", - "/man", - "/share/man", - "/share/gtk-doc", - "/share/doc", - "*.la", - "*.a" - ], "modules": [ + "shared-modules/libayatana-appindicator/libayatana-appindicator-gtk3.json", "shared-modules/lzo/lzo.json", "shared-modules/squashfs-tools/squashfs-tools.json", - { - "name": "libayatana-appindicator", - "buildsystem": "cmake-ninja", - "config-opts": [ - "-DENABLE_BINDINGS_MONO=NO", - "-DENABLE_BINDINGS_VALA=NO", - "-DENABLE_GTKDOC=NO" - ], - "modules": [ - "shared-modules/intltool/intltool-0.51.json", - { - "name": "libdbusmenu-gtk3", - "buildsystem": "autotools", - "build-options": { - "cflags": "-Wno-error", - "env": { - "HAVE_VALGRIND_FALSE": "#", - "HAVE_VALGRIND_TRUE": "" - } - }, - "config-opts": [ - "--with-gtk=3", - "--disable-dumper", - "--disable-static", - "--disable-tests", - "--disable-gtk-doc", - "--enable-introspection=no", - "--disable-vala" - ], - "sources": [ - { - "type": "archive", - "url": "https://launchpad.net/libdbusmenu/16.04/16.04.0/+download/libdbusmenu-16.04.0.tar.gz", - "sha256": "b9cc4a2acd74509435892823607d966d424bd9ad5d0b00938f27240a1bfa878a" - } - ], - "cleanup": [ - "/include", - "/libexec", - "/lib/pkgconfig", - "/lib/*.la", - "/share/doc", - "/share/libdbusmenu", - "/share/gtk-doc", - "/share/gir-1.0" - ] - }, - { - "name": "ayatana-ido", - "buildsystem": "cmake-ninja", - "sources": [ - { - "type": "git", - "url": "https://github.com/AyatanaIndicators/ayatana-ido.git", - "tag": "0.10.4", - "commit": "f968079b09e2310fefc3fc307359025f1c74b3eb", - "x-checker-data": { - "type": "git", - "tag-pattern": "^([\\d.]+)$" - } - }, - { - "type": "shell", - "//": "Remove unused Vala/GIR files", - "commands": [ - "sed -i 's/Vala REQUIRED/Vala /' src/CMakeLists.txt", - "sed -i '/install.*AyatanaIdo3-0.4.*/d' src/CMakeLists.txt" - ] - } - ] - }, - { - "name": "libayatana-indicator", - "buildsystem": "cmake-ninja", - "sources": [ - { - "type": "git", - "url": "https://github.com/AyatanaIndicators/libayatana-indicator.git", - "tag": "0.9.4", - "commit": "611bb384b73fa6311777ba4c41381a06f5b99dad", - "x-checker-data": { - "type": "git", - "tag-pattern": "^([\\d.]+)$" - } - } - ] - } - ], - "sources": [ - { - "type": "git", - "url": "https://github.com/AyatanaIndicators/libayatana-appindicator.git", - "tag": "0.5.93", - "commit": "238c8b02718fa5b4af95ede72beeed762094f4cc", - "x-checker-data": { - "type": "git", - "tag-pattern": "^([\\d.]+)$" - } - } - ] - }, { "name": "ffmpeg-4.4", + "cleanup": [ + "/include", + "/lib/pkgconfig", + "/share" + ], "config-opts": [ "--enable-shared", "--disable-static", @@ -208,19 +101,21 @@ "install apply_extra /app/bin", "install get-scale-factor.py xsettings.py /app/bin", "install spotify-bin /app/bin/spotify", - "install -Dm644 com.spotify.Client.appdata.xml /app/share/appdata/com.spotify.Client.appdata.xml", + "install -Dm644 com.spotify.Client.metainfo.xml /app/share/metainfo/com.spotify.Client.metainfo.xml", "install -Dm644 com.spotify.Client.svg /app/share/icons/hicolor/scalable/apps/com.spotify.Client.svg", "install -Dm644 com.spotify.Client-symbolic.svg /app/share/icons/hicolor/symbolic/apps/com.spotify.Client-symbolic.svg", - "install -Dm644 com.spotify.Client.desktop /app/share/applications/com.spotify.Client.desktop" + "install -Dm644 com.spotify.Client.desktop /app/share/applications/com.spotify.Client.desktop", + "desktop-file-edit --set-icon=\"com.spotify.Client\" /app/share/applications/com.spotify.Client.desktop", + "desktop-file-edit --set-key=\"X-GNOME-UsesNotifications\" --set-value=\"true\" /app/share/applications/com.spotify.Client.desktop" ], "sources": [ { "type": "script", "dest-filename": "apply_extra", "commands": [ - "unsquashfs -quiet -no-progress spotify.snap usr/bin usr/share/spotify", - "mv squashfs-root/usr/* .", - "rm -r spotify.snap squashfs-root share/spotify/apt-keys share/spotify/spotify.desktop" + "unsquashfs -quiet -no-progress spotify.snap usr/share/spotify", + "mv squashfs-root/usr/share/spotify/* .", + "rm -r apt-keys spotify.desktop spotify.snap squashfs-root" ] }, { @@ -229,7 +124,7 @@ }, { "type": "file", - "path": "com.spotify.Client.appdata.xml" + "path": "com.spotify.Client.metainfo.xml" }, { "type": "file", diff --git a/com.spotify.Client.appdata.xml b/com.spotify.Client.metainfo.xml similarity index 54% rename from com.spotify.Client.appdata.xml rename to com.spotify.Client.metainfo.xml index 1485433..47c48fd 100644 --- a/com.spotify.Client.appdata.xml +++ b/com.spotify.Client.metainfo.xml @@ -1,37 +1,74 @@ - + com.spotify.Client - com.spotify.Client.desktop com.spotify.Client.desktop Spotify - Spotify + + Spotify AB + Online music streaming service CC0-1.0 LicenseRef-proprietary=https://www.spotify.com/us/legal/end-user-agreement/ https://www.spotify.com https://community.spotify.com/t5/Desktop-Linux/bd-p/desktop_linux -

Access all of your favorite music, discover new songs, and share music online with your friends - all in one place. - Create shared playlists or share individual songs with your Facebook friends with just a click of a button. - Follow your favorite artists or friends to know what they are listening to, and then save the songs to your own playlists. - Spotify is the best way to have access to millions of songs, and all the latest hits.

+

+ Stream the tracks you love instantly, browse the charts or fire up curated + playlists in every genre and mood. Discover new music too, with awesome + playlists built just for you. +

+

+ Spotify also offers 5+ million podcast titles, including originals and + exclusives that you can't find anywhere else. +

+

+ Listen free, or get ad-free music listening with Premium. +

+

Spotify Free features:

+
    +
  • Play songs, albums, playlists and podcasts
  • +
  • Listen to your favorite artists
  • +
  • Create playlists with your favorite music
  • +
  • Enjoy your personal Discover Weekly playlist every week
  • +
  • Collaborate on playlists and see what your friends are playing
  • +
  • Find nearby events and gigs by your favorite artists
  • +
+

Spotify Premium features:

+
    +
  • Download music for offline listening
  • +
  • Enjoy high-quality audio
  • +
  • Enjoy unlimited skips and full on-demand playback
  • +
  • Listen to the music you love, ad-free
  • +
  • No commitment - cancel any time you like
  • +
  • Get 15 hours of audiobooks every month. Audiobooks in Premium are currently + available in Australia, New Zealand, the UK, Ireland, the US & Canada. Discover + 350,000+, 15 hours/month of available listening for Premium Individual + subscribers and Duo & Family plan managers.
  • +
+

+ Note: Spotify for Linux is a labor of love from our engineers that wanted to + listen to Spotify on their Linux development machines. They work on it in their + spare time and it is currently not a platform that we actively support. The + experience may differ from our other Spotify Desktop clients, such as Windows + and Mac. +

Artist - https://raw.githubusercontent.com/flathub/com.spotify.Client/master/screenshots/Artist.png + https://raw.githubusercontent.com/flathub/com.spotify.Client/master/screenshots/Artist.png Playlist - https://raw.githubusercontent.com/flathub/com.spotify.Client/master/screenshots/Playlist.png + https://raw.githubusercontent.com/flathub/com.spotify.Client/master/screenshots/Playlist.png Podcast - https://raw.githubusercontent.com/flathub/com.spotify.Client/master/screenshots/Podcast.png + https://raw.githubusercontent.com/flathub/com.spotify.Client/master/screenshots/Podcast.png Fullscreen - https://raw.githubusercontent.com/flathub/com.spotify.Client/master/screenshots/Fullscreen.png + https://raw.githubusercontent.com/flathub/com.spotify.Client/master/screenshots/Fullscreen.png @@ -74,6 +111,20 @@ - + + intense + + + x-scheme-handler/spotify + + + 768 + always + + + keyboard + pointing + touch + tingping_at_fedoraproject.org
diff --git a/flathub.json b/flathub.json index a1aca5a..c75b742 100644 --- a/flathub.json +++ b/flathub.json @@ -1,4 +1,3 @@ { - "only-arches": ["x86_64"], - "require-important-update": true + "only-arches": ["x86_64"] } diff --git a/screenshots/Artist.png b/screenshots/Artist.png index ef7f939..273610c 100644 Binary files a/screenshots/Artist.png and b/screenshots/Artist.png differ diff --git a/screenshots/Fullscreen.png b/screenshots/Fullscreen.png index fd0e5ff..f5c4842 100644 Binary files a/screenshots/Fullscreen.png and b/screenshots/Fullscreen.png differ diff --git a/screenshots/Playlist.png b/screenshots/Playlist.png index d73e492..155967e 100644 Binary files a/screenshots/Playlist.png and b/screenshots/Playlist.png differ diff --git a/screenshots/Podcast.png b/screenshots/Podcast.png index c3bcc72..38c8094 100644 Binary files a/screenshots/Podcast.png and b/screenshots/Podcast.png differ diff --git a/shared-modules b/shared-modules index 88c7813..9a5230d 160000 --- a/shared-modules +++ b/shared-modules @@ -1 +1 @@ -Subproject commit 88c7813518bd360ccd0b12babcce5848476f59dc +Subproject commit 9a5230d7a90761d214e1e074530489c3de0b3b5d diff --git a/spotify-bin b/spotify-bin index 5e460c8..4a4e703 100755 --- a/spotify-bin +++ b/spotify-bin @@ -55,7 +55,7 @@ if [[ -e "${XDG_RUNTIME_DIR}/${WAYLAND_SOCKET}" || -e "${WAYLAND_DISPLAY}" ]]; t EXTRA_FLAGS+=("--enable-wayland-ime" "--ozone-platform-hint=auto") fi -env PULSE_PROP_application.icon_name="com.spotify.Client" LD_PRELOAD=/app/lib/spotify-preload.so${LD_PRELOAD:+:$LD_PRELOAD} /app/extra/bin/spotify "${EXTRA_FLAGS[@]}" "$@" & +env PULSE_PROP_application.icon_name="com.spotify.Client" LD_PRELOAD=/app/lib/spotify-preload.so${LD_PRELOAD:+:$LD_PRELOAD} /app/extra/spotify "${EXTRA_FLAGS[@]}" "$@" & if [ $URI_HANDLED -eq 1 ]; then waitandopenuri "$@" diff --git a/update-release.py b/update-release.py deleted file mode 100755 index 65d1648..0000000 --- a/update-release.py +++ /dev/null @@ -1,102 +0,0 @@ -#!/usr/bin/env python3 - -from datetime import datetime -import json -import hashlib -import requests -import sys -from lxml import etree - -ENDPOINT = "https://api.snapcraft.io/v2/snaps/info/spotify" -MANIFEST = "com.spotify.Client.json" -APPDATA = "com.spotify.Client.appdata.xml" -HEADERS = {"Snap-Device-Series": "16"} - - -def fetch_snap_info(endpoint, headers): - response = requests.get(endpoint, headers=headers) - if response.status_code == 200: - return response.json() - else: - print(f"Failed to get snap info, status code: {response.status_code}") - print(f"Response: {response.text}") - sys.exit() - - -def calculate_sha256(url): - sha256_hash = hashlib.sha256() - response = requests.get(url, stream=True) - if response.status_code == 200: - for chunk in response.iter_content(chunk_size=1024): - sha256_hash.update(chunk) - return sha256_hash.hexdigest() - else: - print(f"Failed to download the file, status code: {response.status_code}") - print(f"Response: {response.text}") - sys.exit() - - -def update_manifest(extracted_data, channel): - with open(MANIFEST, "r") as f: - data = json.load(f) - - for module in data.get("modules", []): - if module.get("name") == "spotify": - for source in module.get("sources", []): - if source.get("type") == "extra-data": - if source["url"] == extracted_data[channel]["url"]: - print("Already up to date") - sys.exit() - source["url"] = extracted_data[channel]["url"] - source["sha256"] = calculate_sha256(extracted_data[channel]["url"]) - source["size"] = extracted_data[channel]["size"] - break - - with open(MANIFEST, "w") as f: - json.dump(data, f, indent=4) - print(f"Updated manifest for {channel}, please test") - update_appdata(extracted_data, channel) - - -def update_appdata(extracted_data, channel): - parser = etree.XMLParser(remove_comments=False) - tree = etree.parse(APPDATA, parser=parser) - date_str = extracted_data[channel]["date"] - parsed_date = datetime.fromisoformat(date_str) - formatted_date = parsed_date.strftime("%Y-%m-%d") - release = etree.Element( - "release", - { - "version": extracted_data[channel]["version"], - "date": formatted_date, # Use the formatted date - }, - ) - releases = tree.find("releases") - release.tail = "\n " - releases.insert(0, release) - tree.write(APPDATA, xml_declaration=True, encoding="utf-8") - print(f"Updated appdata for {channel}, ensure its correct") - - -def main(channel="stable"): - snap_info = fetch_snap_info(ENDPOINT, HEADERS) - extracted_data = {} - for channel_info in snap_info["channel-map"]: - risk = channel_info["channel"]["risk"] - extracted_data[risk] = { - "date": channel_info["channel"]["released-at"], - "sha3-384": channel_info["download"]["sha3-384"], - "url": channel_info["download"]["url"], - "size": channel_info["download"]["size"], - "version": channel_info["version"], - } - if channel not in extracted_data: - print(f"The channel {channel} is not found.") - sys.exit() - - update_manifest(extracted_data, channel) - - -if __name__ == "__main__": - # You could replace 'stable' with another channel if needed. - main(channel="stable")