Skip to content

Commit

Permalink
💬 Modify user-agent
Browse files Browse the repository at this point in the history
  • Loading branch information
ci7lus committed Aug 25, 2021
1 parent cb2a426 commit 7d4ffe2
Show file tree
Hide file tree
Showing 2 changed files with 19 additions and 0 deletions.
2 changes: 2 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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: |
Expand Down Expand Up @@ -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: |
Expand Down
17 changes: 17 additions & 0 deletions patches/core.c.patch
Original file line number Diff line number Diff line change
@@ -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);

0 comments on commit 7d4ffe2

Please sign in to comment.