FAQ Search Today's Posts Mark Forums Read
» Video Reviews

» Linux Archive

Linux-archive is a website aiming to archive linux email lists and to make them easily accessible for linux users/developers.

» Sponsor

» Partners

» Sponsor

Go Back   Linux Archive > Ubuntu > Ubuntu User

LinkBack Thread Tools
Old 08-07-2008, 11:25 AM
Jo Shields
Default Wishlist: allow user to set file extensions to serve

Package: tangerine
Version: 0.3.0+dfsg-2~dhx2
Severity: wishlist
Tags: patch

Tangerine does a very good job of serving files over daap, and is
significantly more reliable than the more common mt-daapd. However, one visible
difference between the two is the number of files offered - on my music
collection Tangerine offers about 500 files more than mt-daapd. This is caused
by Tangerine's policy of serving ALL files it can - so if your music folder
contains any album art, then those album art files are offered up as invalid
music files.

My attached patch allows a user to configure an extra config line in their
~/.tangerine, specifying which file extensions are permitted. The default
behaviour is to serve all files - the new behaviour requires specific
enabling in the config file.

The attached images show a small music collection being served as standard,
and being served by a patched Tangerine with the following stanza added to
filetypes = .ogg,.mp3

Multiply the effect by a few hundred albums, and the effect is striking.

-- 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 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:59:14.000000000 +0100
+++ tangerine-0.3.0+dfsg/plugins/file/FilePlugin.cs 2008-08-07 11:48:03.000000000 +0100
@@ -20,6 +20,7 @@
private DateTime lastChange = DateTime.MinValue;
private string[] directories;
private bool running = true;
+ private string[] fileTypes;

private ObjectContainer odb;

@@ -38,6 +32,10 @@
directories = new string[] { defaultDir };
} else {
directories = Daemon.ConfigSource.Configs["FilePlugin"].Get ("directories", defaultDir).Split (',');
+ fileTypes = Daemon.ConfigSource.Configs["FilePlugin"].Get ("filetypes", String.Empty).Split (',');
+ if (fileTypes[0] == String.Empty) {
+ fileTypes = new string[] {};
+ }

server = Daemon.Server;
@@ -156,7 +161,15 @@
if (Path.GetExtension (file) == ".m3u") {
playlistFiles.Add (file);
} else {
- AddTrack (file);
+ if (fileTypes.Length == 0) {
+ AddTrack (file);
+ } else {
+ foreach (string extension in fileTypes) {
+ if (Path.GetExtension (file) == extension) {
+ AddTrack (file);
+ }
+ }
+ }

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

Thread Tools

All times are GMT. The time now is 08:37 AM.

VBulletin, Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO ©2007, Crawlability, Inc.
Copyright 2007 - 2008, www.linux-archive.org