Re: [Banshee-List] [banshee] Set track cover art if available. (bgo#627945)



Alan and Jensen,

Please prefix your commit messages with a relevant [tag] -- either the
namespace or class the change involves, or similar -- see git log for
examples.

Thanks!

Gabriel

On Sun, Aug 29, 2010 at 5:49 PM, Alan McGovern <alanmc src gnome org> wrote:
> commit f415b0c78823f635b738c37c56be7f66ff78349f
> Author: Jensen Somers <jensen somers gmail com>
> Date:   Sun Aug 29 23:51:19 2010 +0200
>
>    Set track cover art if available. (bgo#627945)
>
>  .../AppleDeviceTrackInfo.cs                        |   35 ++++---------------
>  1 files changed, 8 insertions(+), 27 deletions(-)
> ---
> diff --git a/src/Dap/Banshee.Dap.AppleDevice/Banshee.Dap.AppleDevice/AppleDeviceTrackInfo.cs b/src/Dap/Banshee.Dap.AppleDevice/Banshee.Dap.AppleDevice/AppleDeviceTrackInfo.cs
> index 3445ec9..d9d71bc 100644
> --- a/src/Dap/Banshee.Dap.AppleDevice/Banshee.Dap.AppleDevice/AppleDeviceTrackInfo.cs
> +++ b/src/Dap/Banshee.Dap.AppleDevice/Banshee.Dap.AppleDevice/AppleDeviceTrackInfo.cs
> @@ -255,34 +255,15 @@ namespace Banshee.Dap.AppleDevice
>                 database.CopyTrackToIPod (track, Uri.LocalPath);
>                 ExternalId = (long) IpodTrack.DBID;
>             }
> -//            if (CoverArtSpec.CoverExists (ArtworkId)) {
> -//                SetIpodCoverArt (device, track, CoverArtSpec.GetPath (ArtworkId));
> -//            }
> -        }
>
> -        // FIXME: No reason for this to use GdkPixbuf - the file is on disk already in
> -        // the artwork cache as a JPEG, so just shove the bytes from disk into the track
> -        public static void SetIpodCoverArt (GPod.Device device, GPod.Track track, string path)
> -        {
> -//            try {
> -//                Gdk.Pixbuf pixbuf = null;
> -//                foreach (IPod.ArtworkFormat format in device.LookupArtworkFormats (IPod.ArtworkUsage.Cover)) {
> -//                    if (!track.HasCoverArt (format)) {
> -//                        // Lazily load the pixbuf
> -//                        if (pixbuf == null) {
> -//                            pixbuf = new Gdk.Pixbuf (path);
> -//                        }
> -//
> -//                        track.SetCoverArt (format, IPod.ArtworkHelpers.ToBytes (format, pixbuf));
> -//                    }
> -//                }
> -//
> -//                if (pixbuf != null) {
> -//                    pixbuf.Dispose ();
> -//                }
> -//            } catch (Exception e) {
> -//                Log.Exception (String.Format ("Failed to set cover art on iPod from {0}", path), e);
> -//            }
> +            if (CoverArtSpec.CoverExists (ArtworkId)) {
> +                string path = CoverArtSpec.GetPath (ArtworkId);
> +                if (!track.ThumbnailsSet (path)) {
> +                    Log.Error (String.Format ("Could not set cover art for {0}.", path));
> +                }
> +            } else {
> +                track.ThumbnailsRemoveAll ();
> +            }
>         }
>     }
>  }
> _______________________________________________
> commits-list mailing list (read only)
> http://mail.gnome.org/mailman/listinfo/commits-list
>
> Want to limit the commits to a few modules? Go to above URL, log in to edit your options and select the modules ('topics') you want.
>


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]