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
!= "")
32 string artist
= Hit
.GetFirstProperty ("fixme:artist");
33 if (artist
!= null && artist
!= "")
36 //AddAction (new TileAction (Catalog.GetString ("Add to Library"), AddToLibrary));
39 // FIXME: Check if Banshee exists and supports this?
40 public void AddToLibrary ()