From 0c3433c27371c20519e6cab3da484d57b4fadab7 Mon Sep 17 00:00:00 2001 From: d-k-bo <47948262+d-k-bo@users.noreply.github.com> Date: Mon, 21 Oct 2024 22:57:03 +0200 Subject: [PATCH 01/10] Add integrated player --- .reuse/dep5 | 44 -- Cargo.lock | 791 +++++++++++++---------- Cargo.toml | 5 + REUSE.toml | 58 ++ data/de.k_bo.Televido.Player.gschema.xml | 18 + data/de.k_bo.Televido.gschema.xml | 3 + data/meson.build | 14 +- src/application.rs | 107 +-- src/live/card.blp | 2 +- src/live/card.rs | 23 +- src/main.rs | 3 + src/mediathek/card.rs | 23 +- src/player.blp | 77 +++ src/player.rs | 103 +++ src/preferences/dialog.blp | 6 + src/preferences/dialog.rs | 9 +- src/settings.rs | 22 + 17 files changed, 846 insertions(+), 462 deletions(-) delete mode 100644 .reuse/dep5 create mode 100644 REUSE.toml create mode 100644 data/de.k_bo.Televido.Player.gschema.xml create mode 100644 src/player.blp create mode 100644 src/player.rs diff --git a/.reuse/dep5 b/.reuse/dep5 deleted file mode 100644 index cd1f1c7..0000000 --- a/.reuse/dep5 +++ /dev/null @@ -1,44 +0,0 @@ -Format: https://www.debian.org/doc/packaging-manuals/copyright-format/1.0/ -Upstream-Name: televido -Upstream-Contact: David Cabot -Source: https://github.com/d-k-bo/televido - -Files: - data/icons/hicolor/*/apps/*.svg - data/de.k_bo.Televido.Source.svg -Copyright: David Cabot -License: GPL-3.0-or-later - -Files: - build-aux/de.k_bo.Televido.Devel.json - data/de.k_bo.Televido.desktop.in - data/de.k_bo.Televido.gschema.xml - data/de.k_bo.Televido.metainfo.xml.in - data/screenshots/1.png - data/screenshots/2.png - data/screenshots/3.png - data/screenshots/4.png - Cargo.lock -Copyright: David Cabot -License: CC0-1.0 - -Files: data/resources/icons/scalable/actions/*.svg -Copyright: GNOME Icon Development Kit Contributors -License: CC0-1.0 - -Files: data/resources/icons/scalable/channels/*/*.svg -Copyright: 2016 cemrich -License: MIT - -Files: - data/resources/icons/scalable/channels/*/ard.svg - data/resources/icons/scalable/channels/*/orf.svg - data/resources/icons/scalable/channels/*/srf.svg -Copyright: Wikimedia Commons Contributors -License: CC0-1.0 - -Files: - build-aux/dist-vendor.sh -Copyright: Bilal Elmoussaoui -License: MIT - diff --git a/Cargo.lock b/Cargo.lock index 20bebc0..003c492 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -4,18 +4,18 @@ version = 3 [[package]] name = "addr2line" -version = "0.22.0" +version = "0.24.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6e4503c46a5c0c7844e948c9a4d6acd9f50cccb4de1c48eb9e291ea17470c678" +checksum = "dfbe277e56a376000877090da837660b4427aad530e3028d44e0bffe4f89a1c1" dependencies = [ "gimli", ] [[package]] -name = "adler" -version = "1.0.2" +name = "adler2" +version = "2.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f26201604c87b1e01bd3d98f8d5d9a8fcbb815e8cedb41ffccbeb4bf593a35fe" +checksum = "512761e0bb2578dd7380c6baaa0f4ce03e84f95e960231d1dec8bf4d7d6e2627" [[package]] name = "aho-corasick" @@ -41,15 +41,15 @@ dependencies = [ [[package]] name = "anyhow" -version = "1.0.86" +version = "1.0.89" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b3d1d046238990b9cf5bcde22a3fb3584ee5cf65fb2765f454ed428c7a0063da" +checksum = "86fdf8605db99b54d3cd748a44c6d04df638eb5dafb219b135d0149bd0db01f6" [[package]] name = "arrayvec" -version = "0.7.4" +version = "0.7.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "96d30a06541fbafbc7f82ed10c06164cfbd2c401138f6addd8404629c4b16711" +checksum = "7c02d123df017efcdfbd739ef81735b36c5ba83ec3c59c80a9d7ecc718f92e50" [[package]] name = "async-broadcast" @@ -77,9 +77,9 @@ dependencies = [ [[package]] name = "async-io" -version = "2.3.3" +version = "2.3.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0d6baa8f0178795da0e71bc42c9e5d13261aac7ee549853162e66a241ba17964" +checksum = "444b0228950ee6501b3568d3c93bf1176a1fdbc3b758dcd9475046d30f4dc7e8" dependencies = [ "async-lock", "cfg-if", @@ -91,7 +91,7 @@ dependencies = [ "rustix", "slab", "tracing", - "windows-sys", + "windows-sys 0.59.0", ] [[package]] @@ -107,9 +107,9 @@ dependencies = [ [[package]] name = "async-process" -version = "2.2.3" +version = "2.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f7eda79bbd84e29c2b308d1dc099d7de8dcc7035e48f4bf5dc4a531a44ff5e2a" +checksum = "63255f1dc2381611000436537bbedfe83183faa303a5a0edaf191edef06526bb" dependencies = [ "async-channel", "async-io", @@ -122,7 +122,6 @@ dependencies = [ "futures-lite", "rustix", "tracing", - "windows-sys", ] [[package]] @@ -138,9 +137,9 @@ dependencies = [ [[package]] name = "async-signal" -version = "0.2.8" +version = "0.2.10" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "794f185324c2f00e771cd9f1ae8b5ac68be2ca7abb129a87afd6e86d228bc54d" +checksum = "637e00349800c0bdf8bfc21ebbc0b6524abea702b0da4168ac00d070d0c0b9f3" dependencies = [ "async-io", "async-lock", @@ -151,7 +150,7 @@ dependencies = [ "rustix", "signal-hook-registry", "slab", - "windows-sys", + "windows-sys 0.59.0", ] [[package]] @@ -162,9 +161,9 @@ checksum = "8b75356056920673b02621b35afd0f7dda9306d03c79a30f5c56c44cf256e3de" [[package]] name = "async-trait" -version = "0.1.80" +version = "0.1.83" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c6fa2087f2753a7da8cc1c0dbfcf89579dd57458e36769de5ac750b4671737ca" +checksum = "721cae7de5c34fbb2acd27e21e6d2cf7b886dce0c27388d46c4e6c47ea4318dd" dependencies = [ "proc-macro2", "quote", @@ -179,23 +178,23 @@ checksum = "1505bd5d3d116872e7271a6d4e16d81d0c8570876c8de68093a09ac269d8aac0" [[package]] name = "autocfg" -version = "1.3.0" +version = "1.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0c4b4d0bd25bd0b74681c0ad21497610ce1b7c91b1022cd21c80c6fbdd9476b0" +checksum = "ace50bade8e6234aa140d9a2f552bbee1db4d353f69b8217bc503490fc1a9f26" [[package]] name = "backtrace" -version = "0.3.73" +version = "0.3.74" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5cc23269a4f8976d0a4d2e7109211a419fe30e8d88d677cd60b6bc79c5732e0a" +checksum = "8d82cb332cdfaed17ae235a638438ac4d4839913cc2af585c3c6746e8f8bee1a" dependencies = [ "addr2line", - "cc", "cfg-if", "libc", "miniz_oxide", "object", "rustc-demangle", + "windows-targets", ] [[package]] @@ -204,12 +203,6 @@ version = "0.22.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "72b3254f16251a8381aa12e40e3c4d2f0199f8c6508fbecb9d91f575e0fbb8c6" -[[package]] -name = "bitflags" -version = "1.3.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bef38d45163c2f1dde094a7dfd33ccf595c92905c8f8f4fdc18d06fb1037718a" - [[package]] name = "bitflags" version = "2.6.0" @@ -258,9 +251,9 @@ checksum = "1fd0f2584146f6f2ef48085050886acf353beff7305ebd1ae69500e27c67f64b" [[package]] name = "bytes" -version = "1.6.0" +version = "1.7.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "514de17de45fdb8dc022b1a7975556c53c86f9f0aa5f534b98977b171857c2c9" +checksum = "428d9aa8fbc0670b7b8d6030a7fadd0f86151cae55e4dbbece15f3780a3dfaf3" [[package]] name = "cairo-rs" @@ -268,7 +261,7 @@ version = "0.20.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "e8a0ea147c94108c9613235388f540e4d14c327f7081c9e471fc8ee8a2533e69" dependencies = [ - "bitflags 2.6.0", + "bitflags", "cairo-sys-rs", "glib", "libc", @@ -282,14 +275,27 @@ checksum = "428290f914b9b86089f60f5d8a9f6e440508e1bcff23b25afd51502b0a2da88f" dependencies = [ "glib-sys", "libc", - "system-deps", + "system-deps 7.0.3", ] [[package]] name = "cc" -version = "1.0.99" +version = "1.1.30" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "96c51067fd44124faa7f870b4b1c969379ad32b2ba805aa959430ceaa384f695" +checksum = "b16803a61b81d9eabb7eae2588776c4c1e584b738ede45fdbb4c972cec1e9945" +dependencies = [ + "shlex", +] + +[[package]] +name = "cfg-expr" +version = "0.15.8" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d067ad48b8650848b989a59a86c6c36a995d02d2bf778d45c3c5d57bc2718f02" +dependencies = [ + "smallvec", + "target-lexicon", +] [[package]] name = "cfg-expr" @@ -313,6 +319,60 @@ version = "0.2.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "613afe47fcd5fac7ccf1db93babcb082c5994d996f20b8b159f2ad1658eb5724" +[[package]] +name = "clapper" +version = "0.1.0" +source = "git+https://gitlab.gnome.org/JanGernert/clapper-rs.git#530b6fd53a60563d8038f7a1d9d735d6dc496adb" +dependencies = [ + "bitflags", + "clapper-sys", + "gio", + "glib", + "gstreamer", + "libc", +] + +[[package]] +name = "clapper-gtk" +version = "0.1.0" +source = "git+https://gitlab.gnome.org/JanGernert/clapper-rs.git#530b6fd53a60563d8038f7a1d9d735d6dc496adb" +dependencies = [ + "bitflags", + "clapper", + "clapper-gtk-sys", + "gdk4", + "gio", + "glib", + "gtk4", + "libc", +] + +[[package]] +name = "clapper-gtk-sys" +version = "0.0.1" +source = "git+https://gitlab.gnome.org/JanGernert/clapper-rs.git#530b6fd53a60563d8038f7a1d9d735d6dc496adb" +dependencies = [ + "clapper-sys", + "gio-sys", + "glib-sys", + "gtk4-sys", + "libc", + "system-deps 7.0.3", +] + +[[package]] +name = "clapper-sys" +version = "0.0.1" +source = "git+https://gitlab.gnome.org/JanGernert/clapper-rs.git#530b6fd53a60563d8038f7a1d9d735d6dc496adb" +dependencies = [ + "gio-sys", + "glib-sys", + "gobject-sys", + "gstreamer-sys", + "libc", + "system-deps 6.2.2", +] + [[package]] name = "concurrent-queue" version = "2.5.0" @@ -334,24 +394,24 @@ dependencies = [ [[package]] name = "core-foundation-sys" -version = "0.8.6" +version = "0.8.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "06ea2b9bc92be3c2baa9334a323ebca2d6f074ff852cd1d7b11064035cd3868f" +checksum = "773648b94d0e5d620f64f280777445740e61fe701025087ec8b57f45c791888b" [[package]] name = "cpufeatures" -version = "0.2.12" +version = "0.2.14" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "53fe5e26ff1b7aef8bca9c6080520cfb8d9333c7568e1829cef191a9723e5504" +checksum = "608697df725056feaccfa42cffdaeeec3fccc4ffc38358ecd19b243e716a78e0" dependencies = [ "libc", ] [[package]] name = "crc32fast" -version = "1.4.0" +version = "1.4.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b3855a8a784b474f333699ef2bbca9db2c4a1f6d9088a90a2d25b1eb53111eaa" +checksum = "a97769d94ddab943e4510d138150169a2758b5ef3eb191a9ee688de3e23ef7b3" dependencies = [ "cfg-if", ] @@ -433,6 +493,12 @@ dependencies = [ "crypto-common", ] +[[package]] +name = "either" +version = "1.13.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "60b1af1c220855b6ceac025d3f6ecdd2b7c4894bfe9cd9bda4fbb4bc7c0d4cf0" + [[package]] name = "encoding_rs" version = "0.8.34" @@ -482,7 +548,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "534c5cf6194dfab3db3242765c03bbe257cf92f22b38f6bc0c58d59108a820ba" dependencies = [ "libc", - "windows-sys", + "windows-sys 0.52.0", ] [[package]] @@ -518,9 +584,9 @@ dependencies = [ [[package]] name = "fastrand" -version = "2.1.0" +version = "2.1.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9fc0510504f03c51ada170672ac806f1f105a88aa97a5281117e1ddc3368e51a" +checksum = "e8c02a5121d4ea3eb16a80748c74f5549a5665e4c21333c6098f283870fbdea6" [[package]] name = "field-offset" @@ -534,9 +600,9 @@ dependencies = [ [[package]] name = "flate2" -version = "1.0.28" +version = "1.0.34" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "46303f565772937ffe1d394a4fac6f411c6013172fadde9dcdb1e147a086940e" +checksum = "a1b589b4dc103969ad3cf85c950899926ec64300a1a46d76c03a6072957036f0" dependencies = [ "crc32fast", "miniz_oxide", @@ -584,9 +650,9 @@ dependencies = [ [[package]] name = "futures-channel" -version = "0.3.30" +version = "0.3.31" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "eac8f7d7865dcb88bd4373ab671c8cf4508703796caa2b1985a9ca867b3fcb78" +checksum = "2dff15bf788c671c1934e366d07e30c1814a8ef514e1af724a602e8a2fbe1b10" dependencies = [ "futures-core", ] @@ -599,9 +665,9 @@ checksum = "05f29059c0c2090612e8d742178b0580d2dc940c837851ad723096f87af6663e" [[package]] name = "futures-executor" -version = "0.3.30" +version = "0.3.31" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a576fc72ae164fca6b9db127eaa9a9dda0d61316034f33a0a0d4eda41f02b01d" +checksum = "1e28d1d997f585e54aebc3f97d39e72338912123a67330d723fdbb564d646c9f" dependencies = [ "futures-core", "futures-task", @@ -610,9 +676,9 @@ dependencies = [ [[package]] name = "futures-io" -version = "0.3.30" +version = "0.3.31" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a44623e20b9681a318efdd71c299b6b222ed6f231972bfe2f224ebad6311f0c1" +checksum = "9e5c1b78ca4aae1ac06c48a526a655760685149f0d465d21f37abfe57ce075c6" [[package]] name = "futures-lite" @@ -687,7 +753,7 @@ dependencies = [ "glib-sys", "gobject-sys", "libc", - "system-deps", + "system-deps 7.0.3", ] [[package]] @@ -719,7 +785,7 @@ dependencies = [ "libc", "pango-sys", "pkg-config", - "system-deps", + "system-deps 7.0.3", ] [[package]] @@ -745,9 +811,9 @@ dependencies = [ [[package]] name = "gettext-rs" -version = "0.7.0" +version = "0.7.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e49ea8a8fad198aaa1f9655a2524b64b70eb06b2f3ff37da407566c93054f364" +checksum = "a44e92f7dc08430aca7ed55de161253a22276dfd69c5526e5c5e95d1f7cf338a" dependencies = [ "gettext-sys", "locale_config", @@ -755,9 +821,9 @@ dependencies = [ [[package]] name = "gettext-sys" -version = "0.21.3" +version = "0.22.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c63ce2e00f56a206778276704bbe38564c8695249fdc8f354b4ef71c57c3839d" +checksum = "bb45773f5b8945f12aecd04558f545964f943dacda1b1155b3d738f5469ef661" dependencies = [ "cc", "temp-dir", @@ -765,9 +831,9 @@ dependencies = [ [[package]] name = "gimli" -version = "0.29.0" +version = "0.31.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "40ecd4077b5ae9fd2e9e169b102c6c330d0605168eb0e8bf79952b256dbefffd" +checksum = "07e28edb80900c19c28f1072f2e8aeca7fa06b23cd4169cefe1af5aa3260783f" [[package]] name = "gio" @@ -795,8 +861,8 @@ dependencies = [ "glib-sys", "gobject-sys", "libc", - "system-deps", - "windows-sys", + "system-deps 7.0.3", + "windows-sys 0.52.0", ] [[package]] @@ -805,7 +871,7 @@ version = "0.20.4" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "adcf1ec6d3650bf9fdbc6cee242d4fcebc6f6bfd9bea5b929b6a8b7344eb85ff" dependencies = [ - "bitflags 2.6.0", + "bitflags", "futures-channel", "futures-core", "futures-executor", @@ -827,7 +893,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "a6bf88f70cd5720a6197639dcabcb378dd528d0cb68cb1f45e3b358bcb841cd7" dependencies = [ "heck 0.5.0", - "proc-macro-crate 3.1.0", + "proc-macro-crate 3.2.0", "proc-macro2", "quote", "syn 2.0.79", @@ -840,7 +906,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "5f9eca5d88cfa6a453b00d203287c34a2b7cac3a7831779aa2bb0b3c7233752b" dependencies = [ "libc", - "system-deps", + "system-deps 7.0.3", ] [[package]] @@ -851,7 +917,7 @@ checksum = "a4c674d2ff8478cf0ec29d2be730ed779fef54415a2fb4b565c52def62696462" dependencies = [ "glib-sys", "libc", - "system-deps", + "system-deps 7.0.3", ] [[package]] @@ -874,7 +940,7 @@ dependencies = [ "glib-sys", "libc", "pkg-config", - "system-deps", + "system-deps 7.0.3", ] [[package]] @@ -921,7 +987,44 @@ dependencies = [ "graphene-sys", "libc", "pango-sys", - "system-deps", + "system-deps 7.0.3", +] + +[[package]] +name = "gstreamer" +version = "0.23.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "49ecf3bcfc2ceb82ce02437f53ff2fcaee5e7d45ae697ab64a018408749779b9" +dependencies = [ + "cfg-if", + "futures-channel", + "futures-core", + "futures-util", + "glib", + "gstreamer-sys", + "itertools", + "libc", + "muldiv", + "num-integer", + "num-rational", + "once_cell", + "option-operations", + "paste", + "pin-project-lite", + "smallvec", + "thiserror", +] + +[[package]] +name = "gstreamer-sys" +version = "0.23.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "cb3859929db32f26a35818d0d9ed82f0887c9221ca402ddefaea2bb99833d535" +dependencies = [ + "glib-sys", + "gobject-sys", + "libc", + "system-deps 7.0.3", ] [[package]] @@ -951,7 +1054,7 @@ version = "0.9.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "e9e7b362c8fccd2712297903717d65d30defdab2b509bc9d209cbe5ffb9fabaf" dependencies = [ - "proc-macro-crate 3.1.0", + "proc-macro-crate 3.2.0", "proc-macro2", "quote", "syn 2.0.79", @@ -973,7 +1076,7 @@ dependencies = [ "gsk4-sys", "libc", "pango-sys", - "system-deps", + "system-deps 7.0.3", ] [[package]] @@ -1005,9 +1108,9 @@ dependencies = [ [[package]] name = "h2" -version = "0.4.5" +version = "0.4.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fa82e28a107a8cc405f0839610bdc9b15f1e25ec7d696aa5cf173edbcb1486ab" +checksum = "524e8ac6999421f49a846c2d4411f337e53497d8ec55d67753beffa43c5d9205" dependencies = [ "atomic-waker", "bytes", @@ -1101,9 +1204,9 @@ dependencies = [ [[package]] name = "http-body" -version = "1.0.0" +version = "1.0.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1cac85db508abc24a2e48553ba12a996e87244a0395ce011e62b37158745d643" +checksum = "1efedce1fb8e6913f23e0c92de8e62cd5b772a67e7b3946df930a62566c93184" dependencies = [ "bytes", "http", @@ -1124,15 +1227,15 @@ dependencies = [ [[package]] name = "httparse" -version = "1.9.4" +version = "1.9.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0fcc0b4a115bf80b728eb8ea024ad5bd707b615bfed49e0665b6e0f86fd082d9" +checksum = "7d71d3574edd2771538b901e6549113b4006ece66150fb69c0fb6d9a2adae946" [[package]] name = "hyper" -version = "1.3.1" +version = "1.4.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fe575dd17d0862a9a33781c8c4696a55c320909004a67a00fb286ba8b1bc496d" +checksum = "50dfd22e0e76d0f662d429a5f80fcaf3855009297eab6a0a9f8543834744ba05" dependencies = [ "bytes", "futures-channel", @@ -1150,9 +1253,9 @@ dependencies = [ [[package]] name = "hyper-rustls" -version = "0.27.2" +version = "0.27.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5ee4be2c948921a1a5320b629c4193916ed787a7f7f293fd3f7f5a6c9de74155" +checksum = "08afdbb5c31130e3034af566421053ab03787c640246a446327f550d11bcb333" dependencies = [ "futures-util", "http", @@ -1183,9 +1286,9 @@ dependencies = [ [[package]] name = "hyper-util" -version = "0.1.5" +version = "0.1.9" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7b875924a60b96e5d7b9ae7b066540b1dd1cbd90d1828f54c92e02a283351c56" +checksum = "41296eb09f183ac68eec06e03cdbea2e759633d4067b2f6552fc2e009bcad08b" dependencies = [ "bytes", "futures-channel", @@ -1196,7 +1299,6 @@ dependencies = [ "pin-project-lite", "socket2", "tokio", - "tower", "tower-service", "tracing", ] @@ -1236,9 +1338,18 @@ dependencies = [ [[package]] name = "ipnet" -version = "2.9.0" +version = "2.10.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ddc24109865250148c2e0f3d25d4f0f479571723792d3802153c60922a4fb708" + +[[package]] +name = "itertools" +version = "0.13.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8f518f335dce6725a761382244631d86cf0ccb2863413590b31338feb467f9c3" +checksum = "413ee7dfc52ee1a4949ceeb7dbc8a33f2d6c088194d9f922fb8318faf1f01186" +dependencies = [ + "either", +] [[package]] name = "itoa" @@ -1248,9 +1359,9 @@ checksum = "49f1f14873335454500d59611f1cf4a4b0f786f9ac11f4312a78e4cf2566695b" [[package]] name = "js-sys" -version = "0.3.69" +version = "0.3.72" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "29c15563dc2726973df627357ce0c9ddddbea194836909d655df6a75d2cf296d" +checksum = "6a88f1bda2bd75b0452a14784937d796722fdebfe50df998aeb3f0b7603019a9" dependencies = [ "wasm-bindgen", ] @@ -1289,14 +1400,14 @@ dependencies = [ "gtk4-sys", "libc", "pango-sys", - "system-deps", + "system-deps 7.0.3", ] [[package]] name = "libc" -version = "0.2.155" +version = "0.2.159" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "97b3888a4aecf77e811145cadf6eef5901f4782c53886191b2f693f24761847c" +checksum = "561d97a539a36e26a9a5fad1ea11a3039a67714694aaa379433e580854bc3dc5" [[package]] name = "linkify" @@ -1337,9 +1448,9 @@ dependencies = [ [[package]] name = "lock_api" -version = "0.4.11" +version = "0.4.12" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3c168f8615b12bc01f9c17e2eb0cc07dcae1940121185446edc3744920e8ef45" +checksum = "07af8b9cdd281b7915f413fa73f29ebd5d55d0d3f0155584dade1ff18cea1b17" dependencies = [ "autocfg", "scopeguard", @@ -1347,9 +1458,9 @@ dependencies = [ [[package]] name = "log" -version = "0.4.21" +version = "0.4.22" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "90ed8c1e510134f979dbc4f070f87d4313098b704861a105fe34231c70a3901c" +checksum = "a7a70ba024b9dc04c27ea2f0c0548feb474ec5c54bba33a7f72f873a39d07b24" [[package]] name = "mac" @@ -1440,11 +1551,11 @@ checksum = "6877bb514081ee2a7ff5ef9de3281f14a4dd4bceac4c09388074a6b5df8a139a" [[package]] name = "miniz_oxide" -version = "0.7.4" +version = "0.8.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b8a240ddb74feaf34a79a7add65a741f3167852fba007066dcac1ca548d89c08" +checksum = "e2d80299ef12ff69b16a84bb182e3b9df68b5a91574d3d4fa6e41b65deec4df1" dependencies = [ - "adler", + "adler2", ] [[package]] @@ -1456,9 +1567,15 @@ dependencies = [ "hermit-abi 0.3.9", "libc", "wasi", - "windows-sys", + "windows-sys 0.52.0", ] +[[package]] +name = "muldiv" +version = "1.0.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "956787520e75e9bd233246045d19f42fb73242759cc57fba9611d940ae96d4b0" + [[package]] name = "native-tls" version = "0.2.12" @@ -1488,7 +1605,7 @@ version = "0.29.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "71e2746dc3a24dd78b3cfcb7be93368c6de9963d30f43a6a73998a9cf4b17b46" dependencies = [ - "bitflags 2.6.0", + "bitflags", "cfg-if", "cfg_aliases", "libc", @@ -1511,6 +1628,34 @@ version = "0.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "51d515d32fb182ee37cda2ccdcb92950d6a3c2893aa280e540671c2cd0f3b1d9" +[[package]] +name = "num-integer" +version = "0.1.46" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7969661fd2958a5cb096e56c8e1ad0444ac2bbcd0061bd28660485a44879858f" +dependencies = [ + "num-traits", +] + +[[package]] +name = "num-rational" +version = "0.4.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f83d14da390562dca69fc84082e73e548e1ad308d24accdedd2720017cb37824" +dependencies = [ + "num-integer", + "num-traits", +] + +[[package]] +name = "num-traits" +version = "0.2.19" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "071dfc062690e90b734c0b2273ce72ad0ffa95f0c74596bc250dcfd960262841" +dependencies = [ + "autocfg", +] + [[package]] name = "objc" version = "0.2.7" @@ -1542,9 +1687,9 @@ dependencies = [ [[package]] name = "object" -version = "0.36.0" +version = "0.36.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "576dfe1fc8f9df304abb159d767a29d0476f7750fbf8aa7ad07816004a207434" +checksum = "aedf0a2d09c573ed1d8d85b30c119153926a2b36dce0ab28322c09a117a4683e" dependencies = [ "memchr", ] @@ -1557,11 +1702,11 @@ checksum = "1261fe7e33c73b354eab43b1273a57c8f967d0391e80353e51f764ac02cf6775" [[package]] name = "openssl" -version = "0.10.64" +version = "0.10.66" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "95a0481286a310808298130d22dd1fef0fa571e05a8f44ec801801e84b216b1f" +checksum = "9529f4786b70a3e8c61e11179af17ab6188ad8d0ded78c5529441ed39d4bd9c1" dependencies = [ - "bitflags 2.6.0", + "bitflags", "cfg-if", "foreign-types", "libc", @@ -1589,9 +1734,9 @@ checksum = "ff011a302c396a5197692431fc1948019154afc178baf7d8e37367442a4601cf" [[package]] name = "openssl-sys" -version = "0.9.102" +version = "0.9.103" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c597637d56fbc83893a35eb0dd04b2b8e7a50c91e64e9493e398b5df4fb45fa2" +checksum = "7f9e8deee91df40a943c71b917e5874b951d32a802526c85721ce3b776c929d6" dependencies = [ "cc", "libc", @@ -1599,6 +1744,15 @@ dependencies = [ "vcpkg", ] +[[package]] +name = "option-operations" +version = "0.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7c26d27bb1aeab65138e4bf7666045169d1717febcc9ff870166be8348b223d0" +dependencies = [ + "paste", +] + [[package]] name = "ordered-stream" version = "0.2.0" @@ -1636,20 +1790,20 @@ dependencies = [ "glib-sys", "gobject-sys", "libc", - "system-deps", + "system-deps 7.0.3", ] [[package]] name = "parking" -version = "2.2.0" +version = "2.2.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bb813b8af86854136c6922af0598d719255ecb2179515e6e7730d468f05c9cae" +checksum = "f38d5652c16fde515bb1ecef450ab0f6a219d619a7274976324d5e377f7dceba" [[package]] name = "parking_lot" -version = "0.12.1" +version = "0.12.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3742b2c103b9f06bc9fff0a37ff4912935851bee6d36f3c02bcc755bcfec228f" +checksum = "f1bf18183cf54e8d6059647fc3063646a1801cf30896933ec2311622cc4b9a27" dependencies = [ "lock_api", "parking_lot_core", @@ -1657,17 +1811,23 @@ dependencies = [ [[package]] name = "parking_lot_core" -version = "0.9.9" +version = "0.9.10" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4c42a9226546d68acdd9c0a280d17ce19bfe27a46bf68784e4066115788d008e" +checksum = "1e401f977ab385c9e4e3ab30627d6f26d00e2c73eef317493c4ec6d468726cf8" dependencies = [ "cfg-if", "libc", "redox_syscall", "smallvec", - "windows-targets 0.48.5", + "windows-targets", ] +[[package]] +name = "paste" +version = "1.0.15" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "57c0d7b74b563b49d38dae00a0c37d4d6de9b432382b2892f0574ddcae73fd0a" + [[package]] name = "percent-encoding" version = "2.3.1" @@ -1754,26 +1914,6 @@ dependencies = [ "siphasher", ] -[[package]] -name = "pin-project" -version = "1.1.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b6bf43b791c5b9e34c3d182969b4abb522f9343702850a2e57f460d00d09b4b3" -dependencies = [ - "pin-project-internal", -] - -[[package]] -name = "pin-project-internal" -version = "1.1.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2f38a4412a78282e09a2cf38d195ea5420d15ba0602cb375210efbc877243965" -dependencies = [ - "proc-macro2", - "quote", - "syn 2.0.79", -] - [[package]] name = "pin-project-lite" version = "0.2.14" @@ -1788,9 +1928,9 @@ checksum = "8b870d8c151b6f2fb93e84a13146138f05d02ed11c7e7c54f8826aaaf7c9f184" [[package]] name = "piper" -version = "0.2.3" +version = "0.2.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ae1d5c74c9876f070d3e8fd503d748c7d974c3e48da8f41350fa5222ef9b4391" +checksum = "96c8c490f422ef9a4efd2cb5b42b76c8613d7e7dfc1caf667b8a3350a5acc066" dependencies = [ "atomic-waker", "fastrand", @@ -1799,15 +1939,15 @@ dependencies = [ [[package]] name = "pkg-config" -version = "0.3.30" +version = "0.3.31" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d231b230927b5e4ad203db57bbcbee2802f6bce620b1e4a9024a07d94e2907ec" +checksum = "953ec861398dccce10c670dfeaf3ec4911ca479e9c02154b3a215178c5f566f2" [[package]] name = "polling" -version = "3.7.2" +version = "3.7.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a3ed00ed3fbf728b5816498ecd316d1716eecaced9c0c8d2c5a6740ca214985b" +checksum = "cc2790cd301dec6cd3b7a025e4815cf825724a51c98dccfe6a3e55f05ffb6511" dependencies = [ "cfg-if", "concurrent-queue", @@ -1815,7 +1955,7 @@ dependencies = [ "pin-project-lite", "rustix", "tracing", - "windows-sys", + "windows-sys 0.59.0", ] [[package]] @@ -1826,9 +1966,12 @@ checksum = "439ee305def115ba05938db6eb1644ff94165c5ab5e9420d1c1bcedbba909391" [[package]] name = "ppv-lite86" -version = "0.2.17" +version = "0.2.20" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5b40af805b3121feab8a3c29f04d8ad262fa8e0561883e7653e024ae4479e6de" +checksum = "77957b295656769bb8ad2b6a6b09d897d94f05c41b069aede1fcdaa675eaea04" +dependencies = [ + "zerocopy", +] [[package]] name = "precomputed-hash" @@ -1848,11 +1991,11 @@ dependencies = [ [[package]] name = "proc-macro-crate" -version = "3.1.0" +version = "3.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6d37c51ca738a55da99dc0c4a34860fd675453b8b36209178c2249bb13651284" +checksum = "8ecf48c7ca261d60b74ab1a7b20da18bede46776b2e55535cb958eb595c5fa7b" dependencies = [ - "toml_edit 0.21.1", + "toml_edit 0.22.22", ] [[package]] @@ -1881,9 +2024,9 @@ dependencies = [ [[package]] name = "proc-macro2" -version = "1.0.86" +version = "1.0.87" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5e719e8df665df0d1c8fbfd238015744736151d4445ec0836b8e628aae103b77" +checksum = "b3e4daa0dcf6feba26f985457cdf104d4b4256fc5a09547140f3631bb076b19a" dependencies = [ "unicode-ident", ] @@ -1900,9 +2043,9 @@ dependencies = [ [[package]] name = "quote" -version = "1.0.36" +version = "1.0.37" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0fa76aaf39101c457836aec0ce2316dbdc3ab723cdda1c6bd4e6ad4208acaca7" +checksum = "b5b9d34b8991d19d98081b46eacdd8eb58c6f2b201139f7c5f643cc155a633af" dependencies = [ "proc-macro2", ] @@ -1939,23 +2082,23 @@ dependencies = [ [[package]] name = "redox_syscall" -version = "0.4.1" +version = "0.5.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4722d768eff46b75989dd134e5c353f0d6296e5aaa3132e776cbdb56be7731aa" +checksum = "9b6dfecf2c74bce2466cabf93f6664d6998a69eb21e39f4207930065b27b771f" dependencies = [ - "bitflags 1.3.2", + "bitflags", ] [[package]] name = "regex" -version = "1.10.4" +version = "1.11.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c117dbdfde9c8308975b6a18d71f3f385c89461f7b3fb054288ecf2a2058ba4c" +checksum = "38200e5ee88914975b69f657f0801b6f6dccafd44fd9326302a4aaeecfacb1d8" dependencies = [ "aho-corasick", "memchr", - "regex-automata 0.4.6", - "regex-syntax 0.8.2", + "regex-automata 0.4.8", + "regex-syntax 0.8.5", ] [[package]] @@ -1969,13 +2112,13 @@ dependencies = [ [[package]] name = "regex-automata" -version = "0.4.6" +version = "0.4.8" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "86b83b8b9847f9bf95ef68afb0b8e6cdb80f498442f5179a29fad448fcc1eaea" +checksum = "368758f23274712b504848e9d5a6f010445cc8b87a7cdb4d7cbee666c1288da3" dependencies = [ "aho-corasick", "memchr", - "regex-syntax 0.8.2", + "regex-syntax 0.8.5", ] [[package]] @@ -1986,9 +2129,9 @@ checksum = "f162c6dd7b008981e4d40210aca20b4bd0f9b60ca9271061b07f78537722f2e1" [[package]] name = "regex-syntax" -version = "0.8.2" +version = "0.8.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c08c74e62047bb2de4ff487b251e4a92e24f48745648451635cec7d591162d9f" +checksum = "2b15c43186be67a4fd63bee50d0303afffcef381492ebe2c5d87f324e1b8815c" [[package]] name = "reqwest" @@ -2045,7 +2188,7 @@ dependencies = [ "libc", "spin", "untrusted", - "windows-sys", + "windows-sys 0.52.0", ] [[package]] @@ -2056,31 +2199,31 @@ checksum = "719b953e2095829ee67db738b3bfa9fa368c94900df327b3f07fe6e794d2fe1f" [[package]] name = "rustc_version" -version = "0.4.0" +version = "0.4.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bfa0f585226d2e68097d4f95d113b15b83a82e819ab25717ec0590d9584ef366" +checksum = "cfcb3a22ef46e85b45de6ee7e79d063319ebb6594faafcf1c225ea92ab6e9b92" dependencies = [ "semver", ] [[package]] name = "rustix" -version = "0.38.34" +version = "0.38.37" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "70dc5ec042f7a43c4a73241207cecc9873a06d45debb38b329f8541d85c2730f" +checksum = "8acb788b847c24f28525660c4d7758620a7210875711f79e7f663cc152726811" dependencies = [ - "bitflags 2.6.0", + "bitflags", "errno", "libc", "linux-raw-sys", - "windows-sys", + "windows-sys 0.52.0", ] [[package]] name = "rustls" -version = "0.23.10" +version = "0.23.14" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "05cff451f60db80f490f3c182b77c35260baace73209e9cdbbe526bfe3a4d402" +checksum = "415d9944693cb90382053259f89fbb077ea730ad7273047ec63b19bc9b160ba8" dependencies = [ "once_cell", "rustls-pki-types", @@ -2091,25 +2234,24 @@ dependencies = [ [[package]] name = "rustls-pemfile" -version = "2.1.2" +version = "2.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "29993a25686778eb88d4189742cd713c9bce943bc54251a33509dc63cbacf73d" +checksum = "dce314e5fee3f39953d46bb63bb8a46d40c2f8fb7cc5a3b6cab2bde9721d6e50" dependencies = [ - "base64", "rustls-pki-types", ] [[package]] name = "rustls-pki-types" -version = "1.7.0" +version = "1.9.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "976295e77ce332211c0d24d92c0e83e50f5c5f046d11082cea19f3df13a3562d" +checksum = "0e696e35370c65c9c541198af4543ccd580cf17fc25d8e05c5a242b202488c55" [[package]] name = "rustls-webpki" -version = "0.102.4" +version = "0.102.8" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ff448f7e92e913c4b7d4c6d8e4540a1724b319b4152b8aef6d4cf8339712b33e" +checksum = "64ca1bc8749bd4cf37b5ce386cc146580777b4e8572c7b97baf22c83f444bee9" dependencies = [ "ring", "rustls-pki-types", @@ -2133,11 +2275,11 @@ dependencies = [ [[package]] name = "schannel" -version = "0.1.23" +version = "0.1.26" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fbc91545643bcf3a0bbb6569265615222618bdf33ce4ffbbd13c4bbd4c093534" +checksum = "01227be5826fa0690321a2ba6c5cd57a19cf3f6a09e76973b58e61de6ab9d1c1" dependencies = [ - "windows-sys", + "windows-sys 0.59.0", ] [[package]] @@ -2148,11 +2290,11 @@ checksum = "94143f37725109f92c262ed2cf5e59bce7498c01bcc1502d7b9afe439a4e9f49" [[package]] name = "security-framework" -version = "2.11.0" +version = "2.11.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c627723fd09706bacdb5cf41499e95098555af3c3c29d014dc3c458ef6be11c0" +checksum = "897b2245f0b511c87893af39b033e5ca9cce68824c4d7e7630b5a1d339658d02" dependencies = [ - "bitflags 2.6.0", + "bitflags", "core-foundation", "core-foundation-sys", "libc", @@ -2161,9 +2303,9 @@ dependencies = [ [[package]] name = "security-framework-sys" -version = "2.11.0" +version = "2.12.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "317936bbbd05227752583946b9e66d7ce3b489f84e11a94a510b4437fef407d7" +checksum = "ea4a292869320c0272d7bc55a5a6aafaff59b4f63404a003887b679a2e05b4b6" dependencies = [ "core-foundation-sys", "libc", @@ -2220,9 +2362,9 @@ dependencies = [ [[package]] name = "serde_spanned" -version = "0.6.6" +version = "0.6.8" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "79e674e01f999af37c49f70a6ede167a8a60b2503e56c5599532a65baa5969a0" +checksum = "87607cb1398ed59d48732e575a4c28a7a8ebf2454b964fe3f224f2afc07909e1" dependencies = [ "serde", ] @@ -2259,6 +2401,12 @@ dependencies = [ "lazy_static", ] +[[package]] +name = "shlex" +version = "1.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0fda2ff0d084019ba4d7c6f371c95d8fd75ce3524c3cb8fb653a3023f6323e64" + [[package]] name = "signal-hook-registry" version = "1.4.2" @@ -2307,7 +2455,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "ce305eb0b4296696835b71df73eb912e0f1ffd2556a501fcede6e0c50349191c" dependencies = [ "libc", - "windows-sys", + "windows-sys 0.52.0", ] [[package]] @@ -2356,9 +2504,9 @@ checksum = "73473c0e59e6d5812c5dfe2a064a6444949f089e20eec9a2e5506596494e4623" [[package]] name = "subtle" -version = "2.6.0" +version = "2.6.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0d0208408ba0c3df17ed26eb06992cb1a1268d41b2c0e12e65203fbe3972cee5" +checksum = "13c2bddecc57b384dee18652358fb23172facb8a2c51ccc10d74c157bdea3292" [[package]] name = "syn" @@ -2397,7 +2545,7 @@ version = "0.6.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "3c879d448e9d986b661742763247d3693ed13609438cf3d006f51f5368a5ba6b" dependencies = [ - "bitflags 2.6.0", + "bitflags", "core-foundation", "system-configuration-sys", ] @@ -2412,13 +2560,26 @@ dependencies = [ "libc", ] +[[package]] +name = "system-deps" +version = "6.2.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a3e535eb8dded36d55ec13eddacd30dec501792ff23a0b1682c38601b8cf2349" +dependencies = [ + "cfg-expr 0.15.8", + "heck 0.5.0", + "pkg-config", + "toml", + "version-compare", +] + [[package]] name = "system-deps" version = "7.0.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "66d23aaf9f331227789a99e8de4c91bf46703add012bdfd45fdecdfb2975a005" dependencies = [ - "cfg-expr", + "cfg-expr 0.17.0", "heck 0.5.0", "pkg-config", "toml", @@ -2435,6 +2596,8 @@ checksum = "61c41af27dd6d1e27b1b16b489db798443478cef1f06a660c96db617ba5de3b1" name = "televido" version = "0.4.0" dependencies = [ + "clapper", + "clapper-gtk", "eyre", "futures-util", "gettext-rs", @@ -2460,20 +2623,21 @@ dependencies = [ [[package]] name = "temp-dir" -version = "0.1.13" +version = "0.1.14" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1f227968ec00f0e5322f9b8173c7a0cbcff6181a0a5b28e9892491c286277231" +checksum = "bc1ee6eef34f12f765cb94725905c6312b6610ab2b0940889cfe58dae7bc3c72" [[package]] name = "tempfile" -version = "3.10.1" +version = "3.13.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "85b77fafb263dd9d05cbeac119526425676db3784113aa9295c88498cbf8bff1" +checksum = "f0f2c9fc62d0beef6951ccffd757e241266a2c833136efbe35af6cd2567dca5b" dependencies = [ "cfg-if", "fastrand", + "once_cell", "rustix", - "windows-sys", + "windows-sys 0.59.0", ] [[package]] @@ -2487,6 +2651,26 @@ dependencies = [ "utf-8", ] +[[package]] +name = "thiserror" +version = "1.0.64" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d50af8abc119fb8bb6dbabcfa89656f46f84aa0ac7688088608076ad2b459a84" +dependencies = [ + "thiserror-impl", +] + +[[package]] +name = "thiserror-impl" +version = "1.0.64" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "08904e7672f5eb876eaaf87e0ce17857500934f4981c4a0ab2b4aa98baac7fc3" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.79", +] + [[package]] name = "thread_local" version = "1.1.8" @@ -2529,9 +2713,9 @@ dependencies = [ [[package]] name = "tinyvec" -version = "1.6.0" +version = "1.8.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "87cc5ceb3875bb20c2890005a4e226a4651264a5c75edb2421b52861a0a0cb50" +checksum = "445e881f4f6d382d5f27c034e25eb92edd7c784ceab92a0937db7f2e9471b938" dependencies = [ "tinyvec_macros", ] @@ -2557,7 +2741,7 @@ dependencies = [ "socket2", "tokio-macros", "tracing", - "windows-sys", + "windows-sys 0.52.0", ] [[package]] @@ -2594,9 +2778,9 @@ dependencies = [ [[package]] name = "tokio-util" -version = "0.7.11" +version = "0.7.12" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9cf6b47b3771c49ac75ad09a6162f53ad4b8088b76ac60e8ec1455b31a189fe1" +checksum = "61e7c3654c13bcd040d4a03abee2c75b1d14a37b423cf5a813ceae1cc903ec6a" dependencies = [ "bytes", "futures-core", @@ -2607,21 +2791,21 @@ dependencies = [ [[package]] name = "toml" -version = "0.8.14" +version = "0.8.19" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6f49eb2ab21d2f26bd6db7bf383edc527a7ebaee412d17af4d40fdccd442f335" +checksum = "a1ed1f98e3fdc28d6d910e6737ae6ab1a93bf1985935a1193e68f93eeb68d24e" dependencies = [ "serde", "serde_spanned", "toml_datetime", - "toml_edit 0.22.14", + "toml_edit 0.22.22", ] [[package]] name = "toml_datetime" -version = "0.6.6" +version = "0.6.8" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4badfd56924ae69bcc9039335b2e017639ce3f9b001c393c1b2d1ef846ce2cbf" +checksum = "0dd7358ecb8fc2f8d014bf86f6f638ce72ba252a2c3a2572f2a795f1d23efb41" dependencies = [ "serde", ] @@ -2639,54 +2823,22 @@ dependencies = [ [[package]] name = "toml_edit" -version = "0.21.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6a8534fd7f78b5405e860340ad6575217ce99f38d4d5c8f2442cb5ecb50090e1" -dependencies = [ - "indexmap", - "toml_datetime", - "winnow 0.5.40", -] - -[[package]] -name = "toml_edit" -version = "0.22.14" +version = "0.22.22" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f21c7aaf97f1bd9ca9d4f9e73b0a6c74bd5afef56f2bc931943a6e1c37e04e38" +checksum = "4ae48d6208a266e853d946088ed816055e556cc6028c5e8e2b84d9fa5dd7c7f5" dependencies = [ "indexmap", "serde", "serde_spanned", "toml_datetime", - "winnow 0.6.13", + "winnow 0.6.20", ] -[[package]] -name = "tower" -version = "0.4.13" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b8fa9be0de6cf49e536ce1851f987bd21a43b771b09473c3549a6c853db37c1c" -dependencies = [ - "futures-core", - "futures-util", - "pin-project", - "pin-project-lite", - "tokio", - "tower-layer", - "tower-service", -] - -[[package]] -name = "tower-layer" -version = "0.3.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c20c8dbed6283a09604c3e69b4b7eeb54e298b8a600d4d5ecb5ad39de609f1d0" - [[package]] name = "tower-service" -version = "0.3.2" +version = "0.3.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b6bc1c9ce2b5135ac7f93c72918fc37feb872bdc6a5533a8b85eb4b86bfdae52" +checksum = "8df9b6e13f2d32c91b9bd719c00d1958837bc7dec474d94952798cc8e69eeec3" [[package]] name = "tracing" @@ -2774,21 +2926,21 @@ dependencies = [ [[package]] name = "unicode-bidi" -version = "0.3.15" +version = "0.3.17" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "08f95100a766bf4f8f28f90d77e0a5461bbdb219042e7679bebe79004fed8d75" +checksum = "5ab17db44d7388991a428b2ee655ce0c212e862eff1768a455c58f9aad6e7893" [[package]] name = "unicode-ident" -version = "1.0.12" +version = "1.0.13" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3354b9ac3fae1ff6755cb6db53683adb661634f67557942dea4facebec0fee4b" +checksum = "e91b56cd4cadaeb79bbf1a5645f6b4f8dc5bde8834ad5894a8db35fda9efa1fe" [[package]] name = "unicode-normalization" -version = "0.1.23" +version = "0.1.24" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a56d1686db2308d901306f92a263857ef59ea39678a5458e7cb17f01415101f5" +checksum = "5033c97c4262335cded6d6fc3e5c18ab755e1a3dc96376350f3d8e9f009ad956" dependencies = [ "tinyvec", ] @@ -2836,9 +2988,9 @@ checksum = "852e951cb7832cb45cb1169900d19760cfa39b82bc0ea9c0e5a14ae88411c98b" [[package]] name = "version_check" -version = "0.9.4" +version = "0.9.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "49874b5167b65d7193b8aba1567f5c7d93d001cafc34600cee003eda787e483f" +checksum = "0b928f33d975fc6ad9f86c8f283853ad26bdd5b10b7f1542aa2fa15e2289105a" [[package]] name = "walkdir" @@ -2867,19 +3019,20 @@ checksum = "9c8d87e72b64a3b4db28d11ce29237c246188f4f51057d65a7eab63b7987e423" [[package]] name = "wasm-bindgen" -version = "0.2.92" +version = "0.2.95" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4be2531df63900aeb2bca0daaaddec08491ee64ceecbee5076636a3b026795a8" +checksum = "128d1e363af62632b8eb57219c8fd7877144af57558fb2ef0368d0087bddeb2e" dependencies = [ "cfg-if", + "once_cell", "wasm-bindgen-macro", ] [[package]] name = "wasm-bindgen-backend" -version = "0.2.92" +version = "0.2.95" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "614d787b966d3989fa7bb98a654e369c762374fd3213d212cfc0251257e747da" +checksum = "cb6dd4d3ca0ddffd1dd1c9c04f94b868c37ff5fac97c30b97cff2d74fce3a358" dependencies = [ "bumpalo", "log", @@ -2892,9 +3045,9 @@ dependencies = [ [[package]] name = "wasm-bindgen-futures" -version = "0.4.42" +version = "0.4.45" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "76bc14366121efc8dbb487ab05bcc9d346b3b5ec0eaa76e46594cabbe51762c0" +checksum = "cc7ec4f8827a71586374db3e87abdb5a2bb3a15afed140221307c3ec06b1f63b" dependencies = [ "cfg-if", "js-sys", @@ -2904,9 +3057,9 @@ dependencies = [ [[package]] name = "wasm-bindgen-macro" -version = "0.2.92" +version = "0.2.95" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a1f8823de937b71b9460c0c34e25f3da88250760bec0ebac694b49997550d726" +checksum = "e79384be7f8f5a9dd5d7167216f022090cf1f9ec128e6e6a482a2cb5c5422c56" dependencies = [ "quote", "wasm-bindgen-macro-support", @@ -2914,9 +3067,9 @@ dependencies = [ [[package]] name = "wasm-bindgen-macro-support" -version = "0.2.92" +version = "0.2.95" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e94f17b526d0a461a191c78ea52bbce64071ed5c04c9ffe424dcb38f74171bb7" +checksum = "26c6ab57572f7a24a4985830b120de1594465e5d500f24afe89e16b4e833ef68" dependencies = [ "proc-macro2", "quote", @@ -2927,15 +3080,15 @@ dependencies = [ [[package]] name = "wasm-bindgen-shared" -version = "0.2.92" +version = "0.2.95" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "af190c94f2773fdb3729c55b007a722abb5384da03bc0986df4c289bf5567e96" +checksum = "65fc09f10666a9f147042251e0dda9c18f166ff7de300607007e96bdebc1068d" [[package]] name = "web-sys" -version = "0.3.69" +version = "0.3.72" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "77afa9a11836342370f4817622a2f0f418b134426d91a82dfb48f532d2ec13ef" +checksum = "f6488b90108c040df0fe62fa815cbdee25124641df01814dd7282749234c6112" dependencies = [ "js-sys", "wasm-bindgen", @@ -2959,11 +3112,11 @@ checksum = "ac3b87c63620426dd9b991e5ce0329eff545bccbbb34f3be09ff6fb6ab51b7b6" [[package]] name = "winapi-util" -version = "0.1.6" +version = "0.1.9" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f29e6f9198ba0d26b4c9f07dbe6f9ed633e1f3d5b8b414090084349e46a52596" +checksum = "cf221c93e13a30d793f7645a0e7762c55d169dbb0a49671918a2319d289b10bb" dependencies = [ - "winapi", + "windows-sys 0.59.0", ] [[package]] @@ -2980,7 +3133,7 @@ checksum = "e400001bb720a623c1c69032f8e3e4cf09984deec740f007dd2b03ec864804b0" dependencies = [ "windows-result", "windows-strings", - "windows-targets 0.52.6", + "windows-targets", ] [[package]] @@ -2989,7 +3142,7 @@ version = "0.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "1d1043d8214f791817bab27572aaa8af63732e11bf84aa21a45a78d6c317ae0e" dependencies = [ - "windows-targets 0.52.6", + "windows-targets", ] [[package]] @@ -2999,7 +3152,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "4cd9b125c486025df0eabcb585e62173c6c9eddcec5d117d3b6e8c30e2ee4d10" dependencies = [ "windows-result", - "windows-targets 0.52.6", + "windows-targets", ] [[package]] @@ -3008,22 +3161,16 @@ version = "0.52.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "282be5f36a8ce781fad8c8ae18fa3f9beff57ec1b52cb3de0789201425d9a33d" dependencies = [ - "windows-targets 0.52.6", + "windows-targets", ] [[package]] -name = "windows-targets" -version = "0.48.5" +name = "windows-sys" +version = "0.59.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9a2fa6e2155d7247be68c096456083145c183cbbbc2764150dda45a87197940c" +checksum = "1e38bc4d79ed67fd075bcc251a1c39b32a1776bbe92e5bef1f0bf1f8c531853b" dependencies = [ - "windows_aarch64_gnullvm 0.48.5", - "windows_aarch64_msvc 0.48.5", - "windows_i686_gnu 0.48.5", - "windows_i686_msvc 0.48.5", - "windows_x86_64_gnu 0.48.5", - "windows_x86_64_gnullvm 0.48.5", - "windows_x86_64_msvc 0.48.5", + "windows-targets", ] [[package]] @@ -3032,46 +3179,28 @@ version = "0.52.6" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "9b724f72796e036ab90c1021d4780d4d3d648aca59e491e6b98e725b84e99973" dependencies = [ - "windows_aarch64_gnullvm 0.52.6", - "windows_aarch64_msvc 0.52.6", - "windows_i686_gnu 0.52.6", + "windows_aarch64_gnullvm", + "windows_aarch64_msvc", + "windows_i686_gnu", "windows_i686_gnullvm", - "windows_i686_msvc 0.52.6", - "windows_x86_64_gnu 0.52.6", - "windows_x86_64_gnullvm 0.52.6", - "windows_x86_64_msvc 0.52.6", + "windows_i686_msvc", + "windows_x86_64_gnu", + "windows_x86_64_gnullvm", + "windows_x86_64_msvc", ] -[[package]] -name = "windows_aarch64_gnullvm" -version = "0.48.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2b38e32f0abccf9987a4e3079dfb67dcd799fb61361e53e2882c3cbaf0d905d8" - [[package]] name = "windows_aarch64_gnullvm" version = "0.52.6" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "32a4622180e7a0ec044bb555404c800bc9fd9ec262ec147edd5989ccd0c02cd3" -[[package]] -name = "windows_aarch64_msvc" -version = "0.48.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "dc35310971f3b2dbbf3f0690a219f40e2d9afcf64f9ab7cc1be722937c26b4bc" - [[package]] name = "windows_aarch64_msvc" version = "0.52.6" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "09ec2a7bb152e2252b53fa7803150007879548bc709c039df7627cabbd05d469" -[[package]] -name = "windows_i686_gnu" -version = "0.48.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a75915e7def60c94dcef72200b9a8e58e5091744960da64ec734a6c6e9b3743e" - [[package]] name = "windows_i686_gnu" version = "0.52.6" @@ -3084,48 +3213,24 @@ version = "0.52.6" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "0eee52d38c090b3caa76c563b86c3a4bd71ef1a819287c19d586d7334ae8ed66" -[[package]] -name = "windows_i686_msvc" -version = "0.48.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8f55c233f70c4b27f66c523580f78f1004e8b5a8b659e05a4eb49d4166cca406" - [[package]] name = "windows_i686_msvc" version = "0.52.6" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "240948bc05c5e7c6dabba28bf89d89ffce3e303022809e73deaefe4f6ec56c66" -[[package]] -name = "windows_x86_64_gnu" -version = "0.48.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "53d40abd2583d23e4718fddf1ebec84dbff8381c07cae67ff7768bbf19c6718e" - [[package]] name = "windows_x86_64_gnu" version = "0.52.6" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "147a5c80aabfbf0c7d901cb5895d1de30ef2907eb21fbbab29ca94c5b08b1a78" -[[package]] -name = "windows_x86_64_gnullvm" -version = "0.48.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0b7b52767868a23d5bab768e390dc5f5c55825b6d30b86c844ff2dc7414044cc" - [[package]] name = "windows_x86_64_gnullvm" version = "0.52.6" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "24d5b23dc417412679681396f2b49f3de8c1473deb516bd34410872eff51ed0d" -[[package]] -name = "windows_x86_64_msvc" -version = "0.48.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ed94fce61571a4006852b7389a063ab983c02eb1bb37b47f8272ce92d06d9538" - [[package]] name = "windows_x86_64_msvc" version = "0.52.6" @@ -3143,21 +3248,21 @@ dependencies = [ [[package]] name = "winnow" -version = "0.6.13" +version = "0.6.20" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "59b5e5f6c299a3c7890b876a2a587f3115162487e704907d9b6cd29473052ba1" +checksum = "36c1fec1a2bb5866f07c25f68c26e565c4c200aebb96d7e55710c19d3e8ac49b" dependencies = [ "memchr", ] [[package]] name = "xdg-home" -version = "1.2.0" +version = "1.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ca91dcf8f93db085f3a0a29358cd0b9d670915468f4290e8b85d118a34211ab8" +checksum = "ec1cdab258fb55c0da61328dc52c8764709b249011b2cad0454c72f0bf10a1f6" dependencies = [ "libc", - "windows-sys", + "windows-sys 0.59.0", ] [[package]] @@ -3197,7 +3302,7 @@ dependencies = [ "tokio", "tracing", "uds_windows", - "windows-sys", + "windows-sys 0.52.0", "xdg-home", "zbus_macros", "zbus_names", @@ -3210,7 +3315,7 @@ version = "4.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "267db9407081e90bbfa46d841d3cbc60f59c0351838c4bc65199ecd79ab1983e" dependencies = [ - "proc-macro-crate 3.1.0", + "proc-macro-crate 3.2.0", "proc-macro2", "quote", "syn 2.0.79", @@ -3274,7 +3379,7 @@ version = "4.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "73e2ba546bda683a90652bac4a279bc146adad1386f25379cf73200d2002c449" dependencies = [ - "proc-macro-crate 3.1.0", + "proc-macro-crate 3.2.0", "proc-macro2", "quote", "syn 2.0.79", diff --git a/Cargo.toml b/Cargo.toml index 21af5d5..20e41d0 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -9,6 +9,8 @@ publish = false [dependencies] adw = { package = "libadwaita", version = "0.7.0", features = ["v1_5"] } +clapper = { git = "https://gitlab.gnome.org/JanGernert/clapper-rs.git", version = "0.1.0" } +clapper-gtk = { git = "https://gitlab.gnome.org/JanGernert/clapper-rs.git", version = "0.1.0" } eyre = "0.6.12" futures-util = "0.3.31" gettext-rs = { version = "0.7", features = ["gettext-system"] } @@ -29,3 +31,6 @@ tokio = { version = "1.40.0", features = ["time", "rt-multi-thread", "macros"] } tracing = "0.1.40" tracing-subscriber = { version = "0.3.18", features = ["env-filter"] } zbus = { version = "4.4.0", default-features = false, features = ["tokio"] } + +[profile.dev.build-override] +opt-level = 3 diff --git a/REUSE.toml b/REUSE.toml new file mode 100644 index 0000000..ec06016 --- /dev/null +++ b/REUSE.toml @@ -0,0 +1,58 @@ +# SPDX-FileCopyrightText: David Cabot +# SPDX-License-Identifier: CC0-1.0 + +version = 1 +SPDX-PackageName = "televido" +SPDX-PackageSupplier = "David Cabot " +SPDX-PackageDownloadLocation = "https://github.com/d-k-bo/televido" + +[[annotations]] +path = ["data/icons/hicolor/**/apps/**.svg", "data/de.k_bo.Televido.Source.svg"] +precedence = "aggregate" +SPDX-FileCopyrightText = "David Cabot " +SPDX-License-Identifier = "GPL-3.0-or-later" + +[[annotations]] +path = [ + "build-aux/de.k_bo.Televido.Devel.json", + "data/de.k_bo.Televido.desktop.in", + "data/de.k_bo.Televido.gschema.xml", + "data/de.k_bo.Televido.metainfo.xml.in", + "data/de.k_bo.Televido.Player.gschema.xml", + "data/screenshots/1.png", + "data/screenshots/2.png", + "data/screenshots/3.png", + "data/screenshots/4.png", + "Cargo.lock", +] +precedence = "aggregate" +SPDX-FileCopyrightText = "David Cabot " +SPDX-License-Identifier = "CC0-1.0" + +[[annotations]] +path = "data/resources/icons/scalable/actions/**.svg" +precedence = "aggregate" +SPDX-FileCopyrightText = "GNOME Icon Development Kit Contributors" +SPDX-License-Identifier = "CC0-1.0" + +[[annotations]] +path = "data/resources/icons/scalable/channels/**/**.svg" +precedence = "aggregate" +SPDX-FileCopyrightText = "2016 cemrich" +SPDX-License-Identifier = "MIT" + +[[annotations]] +path = [ + "data/resources/icons/scalable/channels/**/ard.svg", + "data/resources/icons/scalable/channels/**/orf.svg", + "data/resources/icons/scalable/channels/**/srf.svg", +] +precedence = "aggregate" +SPDX-FileCopyrightText = "Wikimedia Commons Contributors" +SPDX-License-Identifier = "CC0-1.0" + +[[annotations]] +path = "build-aux/dist-vendor.sh" +precedence = "aggregate" +SPDX-FileCopyrightText = "Bilal Elmoussaoui" +SPDX-License-Identifier = "MIT" diff --git a/data/de.k_bo.Televido.Player.gschema.xml b/data/de.k_bo.Televido.Player.gschema.xml new file mode 100644 index 0000000..b3cf348 --- /dev/null +++ b/data/de.k_bo.Televido.Player.gschema.xml @@ -0,0 +1,18 @@ + + + + + + 720 + + + 480 + + + false + + + false + + + \ No newline at end of file diff --git a/data/de.k_bo.Televido.gschema.xml b/data/de.k_bo.Televido.gschema.xml index d166a50..9e98a23 100644 --- a/data/de.k_bo.Televido.gschema.xml +++ b/data/de.k_bo.Televido.gschema.xml @@ -29,6 +29,9 @@ "descending" + + false + "" diff --git a/data/meson.build b/data/meson.build index ec665f2..82c95fa 100644 --- a/data/meson.build +++ b/data/meson.build @@ -7,7 +7,7 @@ desktop_file = i18n.merge_file( type: 'desktop', po_dir: '../po', install: true, - install_dir: get_option('datadir') / 'applications' + install_dir: get_option('datadir') / 'applications', ) desktop_utils = find_program('desktop-file-validate', required: false) @@ -20,7 +20,7 @@ appstream_file = i18n.merge_file( output: BASE_APP_ID + '.metainfo.xml', po_dir: '../po', install: true, - install_dir: get_option('datadir') / 'metainfo' + install_dir: get_option('datadir') / 'metainfo', ) appstreamcli = find_program('appstreamcli', required: false, disabler: true) @@ -28,13 +28,17 @@ if appstreamcli.found() test( 'Validate appstream file', appstreamcli, - args: ['validate', '--no-net', '--explain', appstream_file] + args: ['validate', '--no-net', '--explain', appstream_file], ) endif install_data( BASE_APP_ID + '.gschema.xml', - install_dir: get_option('datadir') / 'glib-2.0' / 'schemas' + install_dir: get_option('datadir') / 'glib-2.0' / 'schemas', +) +install_data( + BASE_APP_ID + '.Player' + '.gschema.xml', + install_dir: get_option('datadir') / 'glib-2.0' / 'schemas', ) gnome.compile_schemas(depend_files: meson.current_source_dir()) @@ -44,7 +48,7 @@ if compile_schemas.found() test( 'Validate schema file', compile_schemas, - args: ['--strict', '--dry-run', meson.current_source_dir()] + args: ['--strict', '--dry-run', meson.current_source_dir()], ) endif diff --git a/src/application.rs b/src/application.rs index 2939283..991aaf1 100644 --- a/src/application.rs +++ b/src/application.rs @@ -2,7 +2,7 @@ // SPDX-License-Identifier: GPL-3.0-or-later use std::{ - cell::OnceCell, + cell::{OnceCell, RefCell}, rc::Rc, sync::{Arc, OnceLock}, }; @@ -15,6 +15,7 @@ use smart_default::SmartDefault; use crate::{ config::{APP_ID, APP_NAME, AUTHOR, ISSUE_URL, PROJECT_URL, VERSION}, launcher::{ExternalProgram, ExternalProgramType, ProgramSelector}, + player::TvPlayer, preferences::TvPreferencesDialog, settings::TvSettings, utils::{show_error, spawn, spawn_clone, tokio, AsyncResource}, @@ -23,6 +24,7 @@ use crate::{ }; mod imp { + use super::*; #[derive(Debug, SmartDefault)] @@ -30,6 +32,8 @@ mod imp { #[default(Arc::new(Zapp::new().expect("failed to initialize Zapp client")))] pub(super) zapp: Arc, pub(super) live_channels: AsyncResource>, + pub(super) window: RefCell>>, + pub(super) player: RefCell>>, } #[glib::object_subclass] @@ -130,11 +134,29 @@ impl TvApplication { } pub fn window(&self) -> TvWindow { - self.active_window().and_downcast().unwrap_or_else(|| { - let win = TvWindow::new(self); - win.present(); - win - }) + let mut window = self.imp().window.borrow_mut(); + + match window.as_ref().and_then(|p| p.upgrade()) { + Some(window) => window, + None => { + let new_window = TvWindow::new(self); + *window = Some(glib::clone::Downgrade::downgrade(&new_window)); + new_window + } + } + } + + pub fn player(&self) -> TvPlayer { + let mut player = self.imp().player.borrow_mut(); + + match player.as_ref().and_then(|p| p.upgrade()) { + Some(player) => player, + None => { + let new_player = TvPlayer::new(self); + *player = Some(glib::clone::Downgrade::downgrade(&new_player)); + new_player + } + } } pub fn zapp(&self) -> Arc { @@ -145,42 +167,50 @@ impl TvApplication { self.imp().live_channels.clone() } - pub async fn play(&self, uri: String) { + pub async fn play(&self, uri: &str, title: &str, subtitle_uri: Option<&str>) { let settings = TvSettings::get(); - let player_name = settings.video_player_name(); - let player_id = settings.video_player_id(); - let player = if player_id.is_empty() { - None - } else { - match ExternalProgram::find(player_name, player_id.clone()).await { - Ok(player) => player, - Err(e) => { - show_error(e); - None + if settings.use_external_player() { + let player_name = settings.video_player_name(); + let player_id = settings.video_player_id(); + + let player = if player_id.is_empty() { + None + } else { + match ExternalProgram::find(player_name, player_id.clone()).await { + Ok(player) => player, + Err(e) => { + show_error(e); + None + } } - } - }; + }; - let player = match player { - Some(player) => player, - None => { - match ProgramSelector::select_program(ExternalProgramType::Player, player_id).await - { - Some(player) => { - settings.set_video_player_name(&player.name); - settings.set_video_player_id(&player.id); + let player = match player { + Some(player) => player, + None => { + match ProgramSelector::select_program(ExternalProgramType::Player, player_id) + .await + { + Some(player) => { + settings.set_video_player_name(&player.name); + settings.set_video_player_id(&player.id); - player + player + } + None => return, } - None => return, } - } - }; + }; - match player.open(uri).await { - Ok(()) => (), - Err(e) => show_error(e.wrap_err(gettext("Failed to play video stream"))), + match player.open(uri).await { + Ok(()) => (), + Err(e) => show_error(e.wrap_err(gettext("Failed to play video stream"))), + } + } else { + let player = self.player(); + player.play(title, uri, subtitle_uri); + player.present(); } } @@ -239,14 +269,6 @@ impl TvApplication { TvPreferencesDialog::new().present(Some(&app.window())) }) .build(); - let play_action = gio::ActionEntry::builder("play") - .parameter_type(Some(glib::VariantTy::STRING)) - .activate(move |app: &Self, _, variant| { - if let Some(stream_url) = variant.and_then(|v| v.get()) { - spawn_clone!(app => app.play(stream_url)) - } - }) - .build(); let download_action = gio::ActionEntry::builder("download") .parameter_type(Some(glib::VariantTy::STRING)) .activate(move |app: &Self, _, variant| { @@ -260,7 +282,6 @@ impl TvApplication { quit_action, about_action, preferences_action, - play_action, download_action, ]); diff --git a/src/live/card.blp b/src/live/card.blp index 2a7345c..ab8baab 100644 --- a/src/live/card.blp +++ b/src/live/card.blp @@ -46,7 +46,7 @@ template $TvLiveCard: Gtk.ListBoxRow { Gtk.Button play_button { icon-name: "play-symbolic"; tooltip-text: _("Play"); - action-name: "app.play"; + action-name: "card.play"; styles [ "circular" diff --git a/src/live/card.rs b/src/live/card.rs index 950fca8..f28dd22 100644 --- a/src/live/card.rs +++ b/src/live/card.rs @@ -11,6 +11,7 @@ use adw::{glib, gtk, prelude::*, subclass::prelude::*}; use crate::{ channel_icons::load_channel_icon, utils::{spawn, tokio}, + TvApplication, }; use super::channels::ChannelObject; @@ -61,12 +62,14 @@ mod imp { fn class_init(klass: &mut Self::Class) { klass.bind_template(); - klass.install_action("card.play", None, |slf, _, _| { - slf.activate_action( - "app.play", - Some(&slf.channel().unwrap().stream_url().to_variant()), - ) - .unwrap() + klass.install_action_async("card.play", None, |slf, _, _| async move { + TvApplication::get() + .play( + &slf.channel().unwrap().stream_url(), + &slf.channel().unwrap().name(), + None, + ) + .await }); } @@ -94,14 +97,6 @@ mod imp { revealer.set_visible(revealer.is_child_revealed()) }); - self.obj().connect_channel_notify(|slf| { - if let Some(channel) = slf.channel() { - slf.imp() - .play_button - .set_action_target_value(Some(&channel.stream_url().to_variant())); - } - }); - // update progress bar every 10 seconds let slf = self.downgrade(); spawn(async move { diff --git a/src/main.rs b/src/main.rs index c5c9df5..069ab80 100644 --- a/src/main.rs +++ b/src/main.rs @@ -9,6 +9,7 @@ mod config; mod launcher; mod live; mod mediathek; +mod player; mod preferences; mod settings; mod utils; @@ -41,5 +42,7 @@ fn main() -> glib::ExitCode { &gio::Resource::from_data(&glib::Bytes::from_static(GRESOURCE_BYTES)).unwrap(), ); + clapper::init().expect("failed to initialize libclapper"); + TvApplication::new().run() } diff --git a/src/mediathek/card.rs b/src/mediathek/card.rs index ac1d7ea..0cd41b0 100644 --- a/src/mediathek/card.rs +++ b/src/mediathek/card.rs @@ -82,17 +82,18 @@ glib::wrapper! { impl TvMediathekCard { fn play(&self, quality: VideoQuality) { - self.activate_action( - "app.play", - Some( - &self - .show() - .and_then(|show| show.video_url(quality)) - .expect("action must only be enabled if url is not None") - .to_variant(), - ), - ) - .unwrap() + let show = self + .show() + .expect("action must only be enabled if show is not None"); + let url = show + .video_url(quality) + .expect("action must only be enabled if url is not None"); + + spawn(async move { + TvApplication::get() + .play(&url, &show.title(), show.subtitle_url().as_deref()) + .await + }); } fn copy_video_url(&self, quality: VideoQuality) { self.clipboard().set( diff --git a/src/player.blp b/src/player.blp new file mode 100644 index 0000000..e4b9971 --- /dev/null +++ b/src/player.blp @@ -0,0 +1,77 @@ +// SPDX-FileCopyrightText: David Cabot +// SPDX-License-Identifier: GPL-3.0-or-later +using Gtk 4.0; +using Adw 1; +using ClapperGtk 0.0; + +template $TvPlayer: Adw.Window { + default-height: 480; + default-width: 720; + // todo: sometimes the window gets minimized to 1x1 – I don't know why + height-request: 180; + width-request: 320; + + Gtk.WindowHandle { + ClapperGtk.Video video { + auto-inhibit: true; + + [fading-overlay] + Gtk.Box { + orientation: horizontal; + valign: start; + margin-start: 6; + margin-top: 6; + margin-end: 6; + spacing: 6; + + [center] + ClapperGtk.LeadContainer { + halign: center; + hexpand: true; + + Gtk.Box { + styles [ + "osd", + "rounded", + ] + + Adw.Clamp { + tightening-threshold: 600; + maximum-size: 600; + + Gtk.Label { + label: bind template.title; + justify: center; + ellipsize: end; + margin-start: 6; + margin-end: 6; + + styles [ + "heading", + ] + } + } + } + } + + [end] + Gtk.Button { + halign: end; + icon-name: "window-close-symbolic"; + action-name: "window.close"; + + styles [ + "osd", + "flat", + "circular", + ] + } + } + + [fading-overlay] + ClapperGtk.SimpleControls { + valign: end; + } + } + } +} diff --git a/src/player.rs b/src/player.rs new file mode 100644 index 0000000..f000231 --- /dev/null +++ b/src/player.rs @@ -0,0 +1,103 @@ +// SPDX-FileCopyrightText: David Cabot +// SPDX-License-Identifier: GPL-3.0-or-later + +use std::cell::RefCell; + +use adw::{glib, gtk, prelude::*, subclass::prelude::*}; + +use crate::{ + application::TvApplication, + config::{APP_ID, APP_NAME}, + settings::TvPlayerSettings, +}; + +mod imp { + use super::*; + + #[derive(Default, gtk::CompositeTemplate, glib::Properties)] + #[template(file = "src/player.blp")] + #[properties(wrapper_type=super::TvPlayer)] + pub struct TvPlayer { + #[template_child] + pub(super) video: TemplateChild, + + #[property(get, set)] + title: RefCell, + } + + #[glib::object_subclass] + impl ObjectSubclass for TvPlayer { + const NAME: &'static str = "TvPlayer"; + type Type = super::TvPlayer; + type ParentType = adw::Window; + + fn class_init(klass: &mut Self::Class) { + klass.bind_template(); + } + + fn instance_init(obj: &glib::subclass::InitializingObject) { + obj.init_template(); + } + } + + #[glib::derived_properties] + impl ObjectImpl for TvPlayer { + fn constructed(&self) { + self.parent_constructed(); + + self.video + .player() + .expect("should not be nullable") + .add_feature(&clapper::Mpris::new( + &format!("org.mpris.MediaPlayer2.{APP_ID}"), + APP_NAME, + Some(APP_ID), + )); + + let slf = self.obj(); + self.video.connect_toggle_fullscreen(glib::clone!( + #[weak] + slf, + move |_| slf.set_fullscreened(!slf.is_fullscreen()) + )); + + let settings = TvPlayerSettings::get(); + + settings.bind_width(&*slf, "default-width").build(); + settings.bind_height(&*slf, "default-height").build(); + settings.bind_is_maximized(&*slf, "maximized").build(); + settings.bind_is_fullscreen(&*slf, "fullscreened").build(); + } + } + impl WidgetImpl for TvPlayer {} + impl WindowImpl for TvPlayer {} + impl AdwWindowImpl for TvPlayer {} +} + +glib::wrapper! { + pub struct TvPlayer(ObjectSubclass) + @extends gtk::Widget, gtk::Window, adw::Window; +} + +impl TvPlayer { + pub fn new(application: &TvApplication) -> Self { + glib::Object::builder() + .property("application", application) + .build() + } + pub fn play(&self, title: &str, uri: &str, subtitle_uri: Option<&str>) { + let player = self.imp().video.player().expect("should not be nullable"); + let queue = player.queue().expect("should not be nullable"); + + let item = clapper::MediaItem::new(uri); + + if let Some(subtitle_uri) = subtitle_uri { + item.set_suburi(subtitle_uri); + } + + queue.add_item(&item); + queue.select_item(Some(&item)); + player.play(); + self.set_title(title); + } +} diff --git a/src/preferences/dialog.blp b/src/preferences/dialog.blp index 5cd4abc..eff8ec6 100644 --- a/src/preferences/dialog.blp +++ b/src/preferences/dialog.blp @@ -9,9 +9,15 @@ template $TvPreferencesDialog: Adw.PreferencesDialog { title: _("External Programs"); name: "external-programs"; + Adw.SwitchRow { + title: _("Use external video player"); + active: bind template.use-external-player bidirectional; + } + Adw.ActionRow video_player_row { title: _("Video Player"); subtitle: bind template.video-player-display-name; + visible: bind template.use-external-player; Gtk.Button { label: _("Change"); diff --git a/src/preferences/dialog.rs b/src/preferences/dialog.rs index 93dc6a2..acba3ed 100644 --- a/src/preferences/dialog.rs +++ b/src/preferences/dialog.rs @@ -1,7 +1,7 @@ // SPDX-FileCopyrightText: David Cabot // SPDX-License-Identifier: GPL-3.0-or-later -use std::cell::RefCell; +use std::cell::{Cell, RefCell}; use adw::{glib, gtk, prelude::*, subclass::prelude::*}; @@ -24,11 +24,14 @@ mod imp { #[template_child] video_downloader_row: TemplateChild, + #[property(get, set)] + use_external_player: Cell, #[property(get)] video_player_display_name: RefCell, #[property(get)] video_downloader_display_name: RefCell, + #[property(get)] settings: TvSettings, } @@ -112,6 +115,10 @@ mod imp { fn constructed(&self) { self.parent_constructed(); + self.settings + .bind_use_external_player(&*self.obj(), "use-external-player") + .build(); + self.update_video_player_display_name(); self.settings .connect_video_player_name_changed(glib::clone!( diff --git a/src/settings.rs b/src/settings.rs index a842c31..509f9c4 100644 --- a/src/settings.rs +++ b/src/settings.rs @@ -35,6 +35,28 @@ impl Default for TvSettings { } } +#[gen_settings(file = "data/de.k_bo.Televido.Player.gschema.xml")] +pub struct TvPlayerSettings; + +impl TvPlayerSettings { + pub fn get() -> Self { + thread_local! { + static SETTINGS: OnceCell = const { OnceCell::new() }; + } + SETTINGS.with(|settings| { + settings + .get_or_init(|| TvPlayerSettings::new("de.k_bo.Televido.Player")) + .clone() + }) + } +} + +impl Default for TvPlayerSettings { + fn default() -> Self { + Self::get() + } +} + impl StaticVariantType for ChannelId { fn static_variant_type() -> std::borrow::Cow<'static, glib::VariantTy> { String::static_variant_type() From 363981106ce4d45678aa32cb32b61e772f7a6777 Mon Sep 17 00:00:00 2001 From: d-k-bo <47948262+d-k-bo@users.noreply.github.com> Date: Mon, 21 Oct 2024 23:17:21 +0200 Subject: [PATCH 02/10] Update REUSE workflow --- .github/workflows/reuse.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/reuse.yaml b/.github/workflows/reuse.yaml index 022b830..67c64d5 100644 --- a/.github/workflows/reuse.yaml +++ b/.github/workflows/reuse.yaml @@ -16,4 +16,4 @@ jobs: steps: - uses: actions/checkout@v4 - name: REUSE Compliance Check - uses: fsfe/reuse-action@v2 \ No newline at end of file + uses: fsfe/reuse-action@v4 \ No newline at end of file From 31f8130d5c47a7f39d49587201e8c06ff8167c5a Mon Sep 17 00:00:00 2001 From: d-k-bo <47948262+d-k-bo@users.noreply.github.com> Date: Mon, 21 Oct 2024 23:16:07 +0200 Subject: [PATCH 03/10] Add clapper dependency to flatpak manifest --- build-aux/de.k_bo.Televido.Devel.json | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) diff --git a/build-aux/de.k_bo.Televido.Devel.json b/build-aux/de.k_bo.Televido.Devel.json index e4ae47e..f9d37e0 100644 --- a/build-aux/de.k_bo.Televido.Devel.json +++ b/build-aux/de.k_bo.Televido.Devel.json @@ -44,6 +44,28 @@ "*.a" ], "modules": [ + { + "name": "clapper", + "buildsystem": "meson", + "config-opts": [ + "-Dclapper=enabled", + "-Dclapper-gtk=enabled", + "-Dclapper-app=disabled", + "-Dintrospection=enabled", + "-Dvapi=enabled" + ], + "cleanup": [ + "/include", + "/lib/pkgconfig" + ], + "sources": [ + { + "type": "git", + "url": "https://github.com/Rafostar/clapper.git", + "tag": "0.6.1" + } + ] + }, { "name": "blueprint-compiler", "buildsystem": "meson", From 9aca4b207a39978378e6242888b71e0c0aa56862 Mon Sep 17 00:00:00 2001 From: d-k-bo <47948262+d-k-bo@users.noreply.github.com> Date: Wed, 23 Oct 2024 20:35:24 +0200 Subject: [PATCH 04/10] Set video title using taginject element --- Cargo.lock | 1 + Cargo.toml | 1 + src/player.rs | 15 +++++++++++++++ 3 files changed, 17 insertions(+) diff --git a/Cargo.lock b/Cargo.lock index 003c492..648189a 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -2602,6 +2602,7 @@ dependencies = [ "futures-util", "gettext-rs", "gsettings-macro", + "gstreamer", "gtk4", "gvdb-macros", "html2pango", diff --git a/Cargo.toml b/Cargo.toml index 20e41d0..513f249 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -15,6 +15,7 @@ eyre = "0.6.12" futures-util = "0.3.31" gettext-rs = { version = "0.7", features = ["gettext-system"] } gsettings-macro = "0.2.1" +gst = { version = "0.23.2", package = "gstreamer", features = ["v1_24"] } gtk = { version = "0.9.2", package = "gtk4", features = ["gnome_46", "blueprint"] } gvdb-macros = "0.1.13" html2pango = "0.6.0" diff --git a/src/player.rs b/src/player.rs index f000231..4bb5dfe 100644 --- a/src/player.rs +++ b/src/player.rs @@ -55,6 +55,21 @@ mod imp { )); let slf = self.obj(); + + let taginject = gst::ElementFactory::make("taginject") + .property("scope", gst::TagScope::Global) + .build() + .expect("failed to create `taginject` element"); + self.video + .player() + .expect("should not be nullable") + .set_video_filter(Some(&taginject)); + slf.connect_title_notify(glib::clone!( + #[weak] + taginject, + move |slf| taginject.set_property("tags", format!("title={}", slf.title())) + )); + self.video.connect_toggle_fullscreen(glib::clone!( #[weak] slf, From e5b537ab18a0d890bb99a31980037989ea52e172 Mon Sep 17 00:00:00 2001 From: d-k-bo <47948262+d-k-bo@users.noreply.github.com> Date: Wed, 23 Oct 2024 21:24:34 +0200 Subject: [PATCH 05/10] Update runtime version --- .github/workflows/ci.yaml | 2 +- build-aux/de.k_bo.Televido.Devel.json | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml index a39e3fe..768e1c1 100644 --- a/.github/workflows/ci.yaml +++ b/.github/workflows/ci.yaml @@ -13,7 +13,7 @@ jobs: name: "Flatpak" runs-on: ubuntu-latest container: - image: bilelmoussaoui/flatpak-github-actions:gnome-45 + image: bilelmoussaoui/flatpak-github-actions:gnome-47 options: --privileged steps: - uses: actions/checkout@v4 diff --git a/build-aux/de.k_bo.Televido.Devel.json b/build-aux/de.k_bo.Televido.Devel.json index f9d37e0..d680485 100644 --- a/build-aux/de.k_bo.Televido.Devel.json +++ b/build-aux/de.k_bo.Televido.Devel.json @@ -1,11 +1,11 @@ { "id": "de.k_bo.Televido.Devel", "runtime": "org.gnome.Platform", - "runtime-version": "46", + "runtime-version": "47", "sdk": "org.gnome.Sdk", "sdk-extensions": [ "org.freedesktop.Sdk.Extension.rust-stable", - "org.freedesktop.Sdk.Extension.llvm16" + "org.freedesktop.Sdk.Extension.llvm19" ], "command": "televido", "finish-args": [ @@ -21,7 +21,7 @@ "--talk-name=org.nickvision.tubeconverter" ], "build-options": { - "append-path": "/usr/lib/sdk/rust-stable/bin:/usr/lib/sdk/llvm16/bin", + "append-path": "/usr/lib/sdk/rust-stable/bin:/usr/lib/sdk/llvm19/bin", "build-args": ["--share=network"], "env": { "CARGO_TARGET_X86_64_UNKNOWN_LINUX_GNU_LINKER": "clang", From 1d3de6ebe9b2dfa288d741eba0d60886a2cb66a9 Mon Sep 17 00:00:00 2001 From: d-k-bo <47948262+d-k-bo@users.noreply.github.com> Date: Wed, 23 Oct 2024 21:36:47 +0200 Subject: [PATCH 06/10] Add pulseaudio permission --- build-aux/de.k_bo.Televido.Devel.json | 1 + 1 file changed, 1 insertion(+) diff --git a/build-aux/de.k_bo.Televido.Devel.json b/build-aux/de.k_bo.Televido.Devel.json index d680485..3ea1117 100644 --- a/build-aux/de.k_bo.Televido.Devel.json +++ b/build-aux/de.k_bo.Televido.Devel.json @@ -13,6 +13,7 @@ "--share=ipc", "--socket=fallback-x11", "--device=dri", + "--socket=pulseaudio", "--socket=wayland", "--talk-name=org.gnome.Totem", "--talk-name=io.github.celluloid_player.Celluloid", From 5afafc93048b74b1ce2fc1c68e22e44305a2168c Mon Sep 17 00:00:00 2001 From: d-k-bo <47948262+d-k-bo@users.noreply.github.com> Date: Wed, 23 Oct 2024 23:17:48 +0200 Subject: [PATCH 07/10] Remove unnecessary build flags for clapper --- build-aux/de.k_bo.Televido.Devel.json | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/build-aux/de.k_bo.Televido.Devel.json b/build-aux/de.k_bo.Televido.Devel.json index 3ea1117..2555f5f 100644 --- a/build-aux/de.k_bo.Televido.Devel.json +++ b/build-aux/de.k_bo.Televido.Devel.json @@ -51,9 +51,7 @@ "config-opts": [ "-Dclapper=enabled", "-Dclapper-gtk=enabled", - "-Dclapper-app=disabled", - "-Dintrospection=enabled", - "-Dvapi=enabled" + "-Dclapper-app=disabled" ], "cleanup": [ "/include", From 00927ffd7c9d80a86250e0b7f46660fa9eedfe56 Mon Sep 17 00:00:00 2001 From: d-k-bo <47948262+d-k-bo@users.noreply.github.com> Date: Thu, 31 Oct 2024 16:32:55 +0100 Subject: [PATCH 08/10] Use playbin3 --- src/main.rs | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/main.rs b/src/main.rs index 069ab80..44ed7c4 100644 --- a/src/main.rs +++ b/src/main.rs @@ -42,6 +42,8 @@ fn main() -> glib::ExitCode { &gio::Resource::from_data(&glib::Bytes::from_static(GRESOURCE_BYTES)).unwrap(), ); + glib::setenv("CLAPPER_USE_PLAYBIN3", "1", false) + .expect("failed to set CLAPPER_USE_PLAYBIN3 environment variable"); clapper::init().expect("failed to initialize libclapper"); TvApplication::new().run() From abf6873804cb8b8b83d87145435721c7f7e6bc97 Mon Sep 17 00:00:00 2001 From: d-k-bo <47948262+d-k-bo@users.noreply.github.com> Date: Thu, 31 Oct 2024 16:40:36 +0100 Subject: [PATCH 09/10] Use ClapperGtk.TitleHeader --- src/player.blp | 33 +++------------------------------ 1 file changed, 3 insertions(+), 30 deletions(-) diff --git a/src/player.blp b/src/player.blp index e4b9971..bf25cb3 100644 --- a/src/player.blp +++ b/src/player.blp @@ -19,44 +19,17 @@ template $TvPlayer: Adw.Window { Gtk.Box { orientation: horizontal; valign: start; - margin-start: 6; - margin-top: 6; - margin-end: 6; - spacing: 6; [center] - ClapperGtk.LeadContainer { - halign: center; + ClapperGtk.TitleHeader { hexpand: true; - - Gtk.Box { - styles [ - "osd", - "rounded", - ] - - Adw.Clamp { - tightening-threshold: 600; - maximum-size: 600; - - Gtk.Label { - label: bind template.title; - justify: center; - ellipsize: end; - margin-start: 6; - margin-end: 6; - - styles [ - "heading", - ] - } - } - } } [end] Gtk.Button { + margin-end: 6; halign: end; + valign: center; icon-name: "window-close-symbolic"; action-name: "window.close"; From 2ac5d098ba8ba43317512c1f1e9090a3663f603b Mon Sep 17 00:00:00 2001 From: d-k-bo <47948262+d-k-bo@users.noreply.github.com> Date: Thu, 31 Oct 2024 16:41:37 +0100 Subject: [PATCH 10/10] Set injected video tags from a GstTagList This way, any special characters in the video title are properly escaped. --- src/player.rs | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/src/player.rs b/src/player.rs index 4bb5dfe..ff59c5a 100644 --- a/src/player.rs +++ b/src/player.rs @@ -67,7 +67,17 @@ mod imp { slf.connect_title_notify(glib::clone!( #[weak] taginject, - move |slf| taginject.set_property("tags", format!("title={}", slf.title())) + move |slf| { + let mut tags = gst::TagList::new(); + tags.make_mut() + .add::(&&*slf.title(), gst::TagMergeMode::Replace); + taginject.set_property( + "tags", + tags.to_string() + .strip_prefix("taglist, ") + .expect("serialized GstTagList should start with `taglist, `"), + ) + } )); self.video.connect_toggle_fullscreen(glib::clone!(