From 7d4ffe22de1620a7d11750b19d720c3aaba73314 Mon Sep 17 00:00:00 2001 From: ci7lus <7887955+ci7lus@users.noreply.github.com> Date: Thu, 26 Aug 2021 00:40:46 +0900 Subject: [PATCH] :speech_balloon: Modify user-agent --- .github/workflows/ci.yml | 2 ++ patches/core.c.patch | 17 +++++++++++++++++ 2 files changed, 19 insertions(+) create mode 100644 patches/core.c.patch diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 4b98da3..d40cf85 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -45,6 +45,7 @@ jobs: patch -p1 < vlc-build/patches/aribsub.c.patch patch -p1 < vlc-build/patches/mpegts.c.patch patch -p1 < vlc-build/patches/configure.ac.patch + patch -p1 < vlc-build/patches/core.c.patch mkdir build - name: Build run: | @@ -104,6 +105,7 @@ jobs: patch -p1 < vlc-build/patches/aribsub.c.patch patch -p1 < vlc-build/patches/mpegts.c.patch patch -p1 < vlc-build/patches/configure.ac.patch + patch -p1 < vlc-build/patches/core.c.patch mkdir build - name: Build run: | diff --git a/patches/core.c.patch b/patches/core.c.patch new file mode 100644 index 0000000..0d390a6 --- /dev/null +++ b/patches/core.c.patch @@ -0,0 +1,17 @@ +diff --git a/lib/core.c b/lib/core.c +index 5e8c614c83..34d26c7cf7 100644 +--- a/lib/core.c ++++ b/lib/core.c +@@ -136,10 +136,11 @@ void libvlc_set_user_agent (libvlc_instance_t *p_i, + { + libvlc_int_t *p_libvlc = p_i->p_libvlc_int; + char *str; ++ const char *plus = "(+https://github.com/vivid-lapin/vlc-miraktest)"; + + var_SetString (p_libvlc, "user-agent", name); + if ((http != NULL) +- && (asprintf (&str, "%s LibVLC/"PACKAGE_VERSION, http) != -1)) ++ && (asprintf (&str, "%s LibVLC/"PACKAGE_VERSION" %s", http, plus) != -1)) + { + var_SetString (p_libvlc, "http-user-agent", str); + free (str);