Add methods and messages to retrieve specific information from beagle-info. Clients...
[beagle.git] / search / Tiles / Audio.cs
blobeacae64d7096b04a6ae3c74d3f95798da180580e
1 using System;
2 using Mono.Unix;
4 namespace Search.Tiles {
6 public class AudioActivator : TileActivator {
8 public AudioActivator () : base ()
10 AddSupportedFlavor (new HitFlavor (null, "File", "audio/*"));
11 AddSupportedFlavor (new HitFlavor (null, "File", "application/ogg")); // FIXME: What about videos?
14 public override Tile BuildTile (Beagle.Hit hit, Beagle.Query query)
16 return new Audio (hit, query);
20 public class Audio : TileFile {
22 public Audio (Beagle.Hit hit, Beagle.Query query) : base (hit, query)
24 Group = TileGroup.Audio;
26 // FIXME: Show album art if any. Needs implementation in Beagle.Util
28 string title = Hit.GetFirstProperty ("fixme:title");
29 if (title != null && title != "")
30 Title = title;
32 string artist = Hit.GetFirstProperty ("fixme:artist");
33 if (artist != null && artist != "")
34 Description = artist;
36 //AddAction (new TileAction (Catalog.GetString ("Add to Library"), AddToLibrary));
39 // FIXME: Check if Banshee exists and supports this?
40 public void AddToLibrary ()