Skip to content

Commit

Permalink
feat: use Clapper enhancers & make default (#1308)
Browse files Browse the repository at this point in the history
  • Loading branch information
GeopJr authored Feb 5, 2025
1 parent b705832 commit 0a2d9e5
Show file tree
Hide file tree
Showing 11 changed files with 210 additions and 276 deletions.
93 changes: 0 additions & 93 deletions build-aux/dev.geopjr.Tuba.Clapper.json

This file was deleted.

78 changes: 76 additions & 2 deletions build-aux/dev.geopjr.Tuba.Devel.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,22 @@
"runtime": "org.gnome.Platform",
"runtime-version": "47",
"sdk": "org.gnome.Sdk",
"add-extensions": {
"org.freedesktop.Platform.ffmpeg-full": {
"version": "24.08",
"directory": "lib/ffmpeg",
"add-ld-path": ".",
"no-autodownload": false,
"autodelete": false
},
"com.github.rafostar.Clapper.Enhancers": {
"version": "stable",
"directory": "extensions/clapper/enhancers",
"add-ld-path": "lib",
"no-autodownload": false,
"autodelete": false
}
},
"sdk-extensions": [ "org.freedesktop.Sdk.Extension.llvm19" ],
"command": "dev.geopjr.Tuba",
"finish-args": [
Expand All @@ -11,7 +27,10 @@
"--share=network",
"--socket=fallback-x11",
"--socket=wayland",
"--socket=pulseaudio"
"--socket=pulseaudio",
"--own-name=org.mpris.MediaPlayer2.Tuba.*",
"--env=CLAPPER_ENHANCERS_PATH=/app/extensions/clapper/enhancers/plugins",
"--env=PYTHONPATH=/app/extensions/clapper/enhancers/python/site-packages"
],
"cleanup": [
"/include",
Expand All @@ -25,7 +44,61 @@
"*.la",
"*.a"
],
"cleanup-commands": [
"mkdir -p /app/lib/ffmpeg",
"mkdir -p /app/extensions/clapper/enhancers"
],
"modules": [
{
"name": "libpeas",
"buildsystem": "meson",
"config-opts": [
"--wrap-mode=nodownload",
"-Dgjs=false",
"-Dlua51=false",
"-Dintrospection=false"
],
"sources": [
{
"type": "archive",
"url": "https://download.gnome.org/sources/libpeas/2.0/libpeas-2.0.5.tar.xz",
"sha256": "376f2f73d731b54e13ddbab1d91b6382cf6a980524def44df62add15489de6dd",
"x-checker-data": {
"type": "gnome",
"name": "libpeas"
}
}
]
},
{
"name": "clapper",
"buildsystem": "meson",
"config-opts": [
"-Dclapper=enabled",
"-Dclapper-gtk=enabled",
"-Dclapper-app=disabled",
"-Dintrospection=enabled",
"-Dvapi=enabled"
],
"build-options": {
"arch": {
"aarch64": {
"append-path": "/usr/lib/sdk/llvm19/bin",
"prepend-ld-library-path": "/usr/lib/sdk/llvm19/lib",
"env": {
"CC": "clang"
}
}
}
},
"sources": [
{
"type": "git",
"url": "https://github.com/Rafostar/clapper.git",
"tag": "0.8.0"
}
]
},
{
"name": "libspelling",
"buildsystem": "meson",
Expand Down Expand Up @@ -56,7 +129,8 @@
"builddir": true,
"buildsystem": "meson",
"config-opts": [
"-Ddevel=true"
"-Ddevel=true",
"-Dclapper=true"
],
"build-options": {
"arch": {
Expand Down
6 changes: 1 addition & 5 deletions meson.build
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,7 @@ libadwaita_dep = dependency('libadwaita-1', version: '>=1.5', required: true)
gtksourceview_dep = dependency('gtksourceview-5', required: true, version: '>=5.6.0')
libwebp_dep = dependency('libwebp', required: false)
libspelling = dependency('libspelling-1', required: false)
clapper_dep = dependency('clapper-0.0', required: false)
clapper_dep = dependency('clapper-0.0', required: false, version: '>=0.8.0')
clapper_gtk_dep = dependency('clapper-gtk-0.0', required: false)
gstreamer_dep = dependency('gstreamer-1.0', required: false)

Expand All @@ -109,10 +109,6 @@ if clapper_support and clapper_dep.found () and clapper_dep.version().version_co
if (clapper_dep.get_variable('features').split().contains('mpris'))
add_project_arguments(['--define=CLAPPER_MPRIS'], language: 'vala')
endif

if clapper_dep.version().version_compare('>=0.8.0')
add_project_arguments(['--define=CLAPPER_0_8'], language: 'vala')
endif
endif

sources = files()
Expand Down
2 changes: 1 addition & 1 deletion meson_options.txt
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
option('devel', type: 'boolean', value: false)
option('distro', type: 'boolean', value: false)
option('clapper', type: 'boolean', value: false)
option('clapper', type: 'boolean', value: true)
7 changes: 4 additions & 3 deletions src/API/Funkwhale.vala
Original file line number Diff line number Diff line change
@@ -1,17 +1,18 @@
public class Tuba.API.Funkwhale : Entity {
public Gee.ArrayList<API.FunkwhaleTrack>? uploads { get; set; default=null; }

public void get_track (string special_host, out string res_url, out bool failed) {
public bool get_track (string special_host, out string res_url) {
res_url = "";
failed = true;
if (this.uploads != null && this.uploads.size > 0) {
var funkwhale_track = this.uploads.get (0);

if (funkwhale_track.listen_url != "") {
failed = false;
res_url = @"https://$(special_host)$(funkwhale_track.listen_url)";
return true;
}
}

return false;
}

public override Type deserialize_array_type (string prop) {
Expand Down
41 changes: 0 additions & 41 deletions src/API/PeerTube.vala

This file was deleted.

Loading

0 comments on commit 0a2d9e5

Please sign in to comment.