Linux Archive

Linux Archive (http://www.linux-archive.org/)
-   Ubuntu User (http://www.linux-archive.org/ubuntu-user/)
-   -   tangerine: Impossible to set multiple music directories (http://www.linux-archive.org/ubuntu-user/139739-tangerine-impossible-set-multiple-music-directories.html)

Jo Shields 08-07-2008 11:18 AM

tangerine: Impossible to set multiple music directories
 
Package: tangerine
Version: 0.3.0+dfsg-2~dhx2
Severity: normal
Tags: patch


Tangerine, although it does not expose it via the tangerine-properties GUI, is
capable of using multiple different folders for storing music. You can allow
this by using a semicolon-delimited list of folders in the ~/.tangerine config
file. This is defined in plugins/file/FilePlugin.cs by this line:

directories = Daemon.ConfigSource.Configs["FilePlugin"].Get ("directories", defaultDir).Split (';');

Unfortunately, Tangerine uses "Nini" - a .ini file handling library - to handle
configuration data. One quirk of .ini files is their comment character - the
semicolon. As a result, as soon as a user puts their first delimiter into the
config file, everything else on that line is ignored - meaning only the first
item in the list is processed.

The attached patch switches the semicolon for a comma. Commas work fine.

-- System Information:
Debian Release: lenny/sid
APT prefers hardy-updates
APT policy: (500, 'hardy-updates'), (500, 'hardy-security'), (500, 'hardy-backports'), (500, 'hardy')
Architecture: amd64 (x86_64)

Kernel: Linux 2.6.24-19-rt (SMP w/2 CPU cores; PREEMPT)
Locale: LANG=en_GB.UTF-8, LC_CTYPE=en_GB.UTF-8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/dash

Versions of packages tangerine depends on:
ii libavahi1.0-cil 0.6.19-1 CLI bindings for Avahi
ii libc6 2.7-10ubuntu3 GNU C Library: Shared libraries
ii libdb4o6.0-cil 6.1.604+dfsg-2 native OODBMS for CLI
ii libexif12 0.6.16-2.1 library to parse EXIF files
ii libglade2.0-cil 2.12.0-2ubuntu3 CLI binding for the Glade librarie
ii libglib2.0-0 2.16.4-0ubuntu2 The GLib library of C routines
ii libglib2.0-cil 2.12.0-2ubuntu3 CLI binding for the GLib utility l
ii libgtk2.0-0 2.12.9-3ubuntu4 The GTK+ graphical user interface
ii libgtk2.0-cil 2.12.0-2ubuntu3 CLI binding for the GTK+ toolkit 2
ii liblog4net1.2-c 1.2.9beta-0ubuntu3 highly configurable logging API fo
ii libmono-corlib2 1.9.1+dfsg-2ubuntu2~dhx1 Mono core library (2.0)
ii libmono-sharpzi 1.9.1+dfsg-2ubuntu2~dhx1 Mono SharpZipLib library
ii libmono-sqlite2 1.9.1+dfsg-2ubuntu2~dhx1 Mono Sqlite library
ii libmono-system- 1.9.1+dfsg-2ubuntu2~dhx1 Mono System.Data Library
ii libmono-system- 1.9.1+dfsg-2ubuntu2~dhx1 Mono System.Web Library
ii libmono-system2 1.9.1+dfsg-2ubuntu2~dhx1 Mono System libraries (2.0)
ii libmono2.0-cil 1.9.1+dfsg-2ubuntu2~dhx1 Mono libraries (2.0)
ii libndesk-dbus1. 0.6.0-1 CLI implementation of D-Bus
ii libnini1.1-cil 1.1.0+dfsg-2 CLI library for managing configura
ii libsm6 2:1.0.3-1 X11 Session Management library
ii libtaglib2.0-ci 2.0.3.0-1 CLI library for accessing audio an
ii mono-runtime 1.9.1+dfsg-2ubuntu2~dhx1 Mono runtime

tangerine recommends no packages.

-- no debconf information
diff -urNad tangerine-0.3.0+dfsg~/plugins/file/FilePlugin.cs tangerine-0.3.0+dfsg/plugins/file/FilePlugin.cs
--- tangerine-0.3.0+dfsg~/plugins/file/FilePlugin.cs 2008-08-07 11:58:58.000000000 +0100
+++ tangerine-0.3.0+dfsg/plugins/file/FilePlugin.cs 2008-08-07 11:59:14.000000000 +0100
@@ -37,7 +37,7 @@
if (Daemon.ConfigSource.Configs["FilePlugin"] == null) {
directories = new string[] { defaultDir };
} else {
- directories = Daemon.ConfigSource.Configs["FilePlugin"].Get ("directories", defaultDir).Split (';');
+ directories = Daemon.ConfigSource.Configs["FilePlugin"].Get ("directories", defaultDir).Split (',');
}

server = Daemon.Server;
--
ubuntu-users mailing list
ubuntu-users@lists.ubuntu.com
Modify settings or unsubscribe at: https://lists.ubuntu.com/mailman/listinfo/ubuntu-users

"David Fox" 08-08-2008 10:35 PM

tangerine: Impossible to set multiple music directories
 
On Thu, Aug 7, 2008 at 4:18 AM, Jo Shields <directhex@apebox.org> wrote:
> Unfortunately, Tangerine uses "Nini" - a .ini file handling library - to handle
> configuration data. One quirk of .ini files is their comment character - the

Why should it require its own ini file handling? Does any other
package depend on hini?


> semicolon. As a result, as soon as a user puts their first delimiter into the
> config file, everything else on that line is ignored - meaning only the first
> item in the list is processed.

If that's the case, then it is so non-standard that the entire library
should be deprecated, as '#' has been the universal standard for
comment characters in configuration files as long as I can remember.

--
ubuntu-users mailing list
ubuntu-users@lists.ubuntu.com
Modify settings or unsubscribe at: https://lists.ubuntu.com/mailman/listinfo/ubuntu-users


All times are GMT. The time now is 11:38 AM.

VBulletin, Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO ©2007, Crawlability, Inc.