From: Zeeshan Ali (Khattak) Date: Thu, 23 Dec 2010 14:57:42 +0000 (+0200) Subject: core,external: No need for special album art class X-Git-Tag: RYGEL_0_9_5~23 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=66a447fd8c141c36460941193fd6d9ce93de6b88;p=profile%2Fivi%2Frygel.git core,external: No need for special album art class Thumbnail class is enough, no need for a special subclass for album art. --- diff --git a/src/plugins/external/rygel-external-album-art-factory.vala b/src/plugins/external/rygel-external-album-art-factory.vala index b9665f4..60917cd 100644 --- a/src/plugins/external/rygel-external-album-art-factory.vala +++ b/src/plugins/external/rygel-external-album-art-factory.vala @@ -44,7 +44,7 @@ public class Rygel.External.AlbumArtFactory { private Thumbnail create_from_props (HashTable props, string host_ip) { - var thumbnail = new AlbumArt (); + var thumbnail = new Thumbnail (); var value = props.lookup ("MIMEType"); thumbnail.mime_type = (string) value; diff --git a/src/rygel/Makefile.am b/src/rygel/Makefile.am index 182673e..c779988 100644 --- a/src/rygel/Makefile.am +++ b/src/rygel/Makefile.am @@ -92,7 +92,6 @@ VAPI_SOURCE_FILES = rygel-configuration.vala \ rygel-photo-item.vala \ rygel-thumbnail.vala \ rygel-thumbnailer.vala \ - rygel-album-art.vala \ rygel-media-art-store.vala \ rygel-subtitle.vala \ rygel-subtitle-manager.vala \ diff --git a/src/rygel/rygel-album-art.vala b/src/rygel/rygel-album-art.vala deleted file mode 100644 index 39023c9..0000000 --- a/src/rygel/rygel-album-art.vala +++ /dev/null @@ -1,39 +0,0 @@ -/* - * Copyright (C) 2010 Jens Georg . - * - * Author: Jens Georg - * - * This file is part of Rygel. - * - * Rygel is free software; you can redistribute it and/or modify - * it under the terms of the GNU Lesser General Public License as published by - * the Free Software Foundation; either version 2 of the License, or - * (at your option) any later version. - * - * Rygel is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public License - * along with this program; if not, write to the Free Software Foundation, - * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. - */ - -using GUPnP; - -public class Rygel.AlbumArt : Thumbnail { - public AlbumArt() { - base (); - } - - /* This doesn't really add a resource. Blame UPnP/DLNA for treating - * thumbnails and album-art differently for no apparent reason. - */ - internal override DIDLLiteResource? add_resource (DIDLLiteItem didl_item, - string protocol) { - didl_item.album_art = this.uri; - - return null; - } -} diff --git a/src/rygel/rygel-media-art-store.vala b/src/rygel/rygel-media-art-store.vala index 4c8a024..295f758 100644 --- a/src/rygel/rygel-media-art-store.vala +++ b/src/rygel/rygel-media-art-store.vala @@ -80,7 +80,7 @@ public class Rygel.MediaArtStore : GLib.Object { return null; } - var thumb = new AlbumArt (); + var thumb = new Thumbnail (); thumb.uri = file.get_uri (); thumb.size = (int64) info.get_size (); diff --git a/src/rygel/rygel-music-item.vala b/src/rygel/rygel-music-item.vala index 84bbd65..6742f60 100644 --- a/src/rygel/rygel-music-item.vala +++ b/src/rygel/rygel-music-item.vala @@ -67,7 +67,7 @@ public class Rygel.MusicItem : AudioItem { var protocol = this.get_protocol_for_uri (this.album_art.uri); if (allow_internal || protocol != "internal") { - album_art.add_resource (didl_item, protocol); + didl_item.album_art = this.album_art.uri; } } }