[audacious] - Strip off parameters of HTTP/HTTPS URLs to fix file name extension detection (#632367, Hans de G

Michael Schwendt mschwendt at fedoraproject.org
Mon Sep 13 16:24:29 UTC 2010


commit 9c567a38b652e8436330c0e9b7377bdfce888e32
Author: Michael Schwendt <mschwendt at fedoraproject.org>
Date:   Mon Sep 13 18:24:22 2010 +0200

    - Strip off parameters of HTTP/HTTPS URLs to fix file name extension
      detection (#632367, Hans de Goede).

 audacious-2.4.0-file-ext-in-url.patch |   20 ++++++++++++++++++++
 audacious.spec                        |   10 +++++++++-
 2 files changed, 29 insertions(+), 1 deletions(-)
---
diff --git a/audacious-2.4.0-file-ext-in-url.patch b/audacious-2.4.0-file-ext-in-url.patch
new file mode 100644
index 0000000..b86a8ef
--- /dev/null
+++ b/audacious-2.4.0-file-ext-in-url.patch
@@ -0,0 +1,20 @@
+--- audacious-2.4.0/src/audacious/probe.c	2010-08-26 01:04:25.000000000 +0200
++++ audacious-2.4.0.new/src/audacious/probe.c	2010-09-09 10:36:39.218207000 +0200
+@@ -147,6 +147,17 @@
+ 
+     AUDDBG ("Probing by extension.\n");
+     s = g_ascii_strdown (s + 1, -1);
++
++    /* Filename_split_subtune will only remove subtune http get parameters,
++       strip other parameters before checking the extension */
++    if (!strncmp(state->filename, "http://", 7) ||
++        !strncmp(state->filename, "https://", 8))
++    {
++        gchar *pos = strrchr(s, '?');
++        if (pos)
++            *pos = '\0';
++    }
++
+     input_plugin_for_key (INPUT_KEY_EXTENSION, s, (PluginForEachFunc)
+      probe_func_fast, state);
+     g_free (s);
diff --git a/audacious.spec b/audacious.spec
index e6d34fd..8d83b2c 100644
--- a/audacious.spec
+++ b/audacious.spec
@@ -5,7 +5,7 @@
 
 Name: audacious
 Version: 2.4.0
-Release: 1%{?dist}
+Release: 2%{?dist}
 
 License: GPLv3
 Summary: Advanced audio player
@@ -14,6 +14,9 @@ Group: Applications/Multimedia
 
 Source0: http://distfiles.atheme.org/audacious-%{version}.tgz
 
+# submitted upstream by email
+Patch0: audacious-2.4.0-file-ext-in-url.patch
+
 BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
 
 BuildRequires: gettext
@@ -75,6 +78,7 @@ Files needed when building software for the Audacious audio player.
 
 %prep
 %setup -q -n %{name}-%{version}
+%patch0 -p1 -b .filext-in-url
 sed -i '\,^.SILENT:,d' buildsys.mk.in
 
 # From .desktop files remove MIME types the base build of the
@@ -183,6 +187,10 @@ gtk-update-icon-cache %{_datadir}/icons/hicolor &>/dev/null || :
 
 
 %changelog
+* Mon Sep 13 2010 Michael Schwendt <mschwendt at fedoraproject.org> - 2.4.0-2
+- Strip off parameters of HTTP/HTTPS URLs to fix file name extension
+  detection (#632367, Hans de Goede).
+
 * Thu Aug 26 2010 Michael Schwendt <mschwendt at fedoraproject.org> - 2.4.0-1
 - Update to 2.4.0 final.
 - Update spec file comments, summary, description, also because


More information about the scm-commits mailing list