diff -Nru unity-lens-music-6.8.0/ChangeLog unity-lens-music-6.8.1/ChangeLog --- unity-lens-music-6.8.0/ChangeLog 2012-09-19 06:27:28.000000000 +0000 +++ unity-lens-music-6.8.1/ChangeLog 2012-10-01 13:10:28.000000000 +0000 @@ -1,5 +1,66 @@ # Generated by Makefile. Do not edit. +2012-10-01 Timo Jyrinki + + Release 6.8.1 + +2012-09-28 Michal Hruby + + Revert r111. Fixes: . Approved by Neil J. Patel. + +2012-09-28 Michal Hruby + + Revert r111 + +2012-09-28 Pawel Stolowski + + Implemented support for banshee tracks/albums previews.. Fixes: https://bugs.launchpad.net/bugs/1054720. Approved by Michal Hruby. + +2012-09-28 Pawel Stolowski + + Check number of elements when splitting uri in preview & show_in_folder methods. + +2012-09-27 Pawel Stolowski + + Support for banshee previews. + +2012-09-26 Didier Roche + + add conditional search activation to the remote scope (LP: #1054746). Fixes: https://bugs.launchpad.net/bugs/1054746. Approved by Michal Hruby. + +2012-09-26 Didier Roche + + listen to remote change and remove message + +2012-09-26 Didier Roche + + comply to latest API + +2012-09-26 Didier Roche + + add manual test + +2012-09-26 Didier Roche + + dep on correct libunity version + +2012-09-26 Didier Roche + + add conditional search activation to the remote scope (LP: #1054746) + +2012-09-24 Pawel Stolowski + + Ignore iradio tag (radio stations) when parsing Rhythmbox database; check if track uri is a local file, this prevents unexpected network queries when radio stations are enabled back in the future.. Fixes: https://bugs.launchpad.net/bugs/1049075. Approved by Omer Akram, Jussi Pakkanen. + +2012-09-20 Pawel Stolowski + + Added comment to radio stations test. + +2012-09-20 Pawel Stolowski + + Ignore iradio tag (radio stations) when parsing Rhythmbox database; check if track uri is a local file, this prevents unexpected network queries + when radio stations are enabled back in teh future. + 2012-09-19 timo.jyrinki@canonical.com Release 6.8.0 diff -Nru unity-lens-music-6.8.0/Makefile.in unity-lens-music-6.8.1/Makefile.in --- unity-lens-music-6.8.0/Makefile.in 2012-09-19 06:27:09.000000000 +0000 +++ unity-lens-music-6.8.1/Makefile.in 2012-10-01 13:09:48.000000000 +0000 @@ -1,4 +1,4 @@ -# Makefile.in generated by automake 1.11.5 from Makefile.am. +# Makefile.in generated by automake 1.11.6 from Makefile.am. # @configure_input@ # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, @@ -718,7 +718,7 @@ *.zip*) \ unzip $(distdir).zip ;;\ esac - chmod -R a-w $(distdir); chmod a+w $(distdir) + chmod -R a-w $(distdir); chmod u+w $(distdir) mkdir $(distdir)/_build mkdir $(distdir)/_inst chmod a-w $(distdir) diff -Nru unity-lens-music-6.8.0/aclocal.m4 unity-lens-music-6.8.1/aclocal.m4 --- unity-lens-music-6.8.0/aclocal.m4 2012-09-19 06:27:07.000000000 +0000 +++ unity-lens-music-6.8.1/aclocal.m4 2012-10-01 13:09:46.000000000 +0000 @@ -1,4 +1,4 @@ -# generated automatically by aclocal 1.11.5 -*- Autoconf -*- +# generated automatically by aclocal 1.11.6 -*- Autoconf -*- # Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, # 2005, 2006, 2007, 2008, 2009, 2010, 2011 Free Software Foundation, @@ -668,7 +668,7 @@ [am__api_version='1.11' dnl Some users find AM_AUTOMAKE_VERSION and mistake it for a way to dnl require some minimum version. Point them to the right macro. -m4_if([$1], [1.11.5], [], +m4_if([$1], [1.11.6], [], [AC_FATAL([Do not call $0, use AM_INIT_AUTOMAKE([$1]).])])dnl ]) @@ -684,7 +684,7 @@ # Call AM_AUTOMAKE_VERSION and AM_AUTOMAKE_VERSION so they can be traced. # This function is AC_REQUIREd by AM_INIT_AUTOMAKE. AC_DEFUN([AM_SET_CURRENT_AUTOMAKE_VERSION], -[AM_AUTOMAKE_VERSION([1.11.5])dnl +[AM_AUTOMAKE_VERSION([1.11.6])dnl m4_ifndef([AC_AUTOCONF_VERSION], [m4_copy([m4_PACKAGE_VERSION], [AC_AUTOCONF_VERSION])])dnl _AM_AUTOCONF_VERSION(m4_defn([AC_AUTOCONF_VERSION]))]) diff -Nru unity-lens-music-6.8.0/configure unity-lens-music-6.8.1/configure --- unity-lens-music-6.8.0/configure 2012-09-19 06:27:08.000000000 +0000 +++ unity-lens-music-6.8.1/configure 2012-10-01 13:09:47.000000000 +0000 @@ -1,6 +1,6 @@ #! /bin/sh # Guess values for system-dependent variables and create Makefiles. -# Generated by GNU Autoconf 2.69 for unity-lens-music 6.8.0. +# Generated by GNU Autoconf 2.69 for unity-lens-music 6.8.1. # # Report bugs to . # @@ -652,8 +652,8 @@ # Identity of this package. PACKAGE_NAME='unity-lens-music' PACKAGE_TARNAME='unity-lens-music' -PACKAGE_VERSION='6.8.0' -PACKAGE_STRING='unity-lens-music 6.8.0' +PACKAGE_VERSION='6.8.1' +PACKAGE_STRING='unity-lens-music 6.8.1' PACKAGE_BUGREPORT='https://launchpad.net/unity-lens-music' PACKAGE_URL='' @@ -1448,7 +1448,7 @@ # Omit some internal or obsolete options to make the list less imposing. # This message is too long to be a string in the A/UX 3.1 sh. cat <<_ACEOF -\`configure' configures unity-lens-music 6.8.0 to adapt to many kinds of systems. +\`configure' configures unity-lens-music 6.8.1 to adapt to many kinds of systems. Usage: $0 [OPTION]... [VAR=VALUE]... @@ -1519,7 +1519,7 @@ if test -n "$ac_init_help"; then case $ac_init_help in - short | recursive ) echo "Configuration of unity-lens-music 6.8.0:";; + short | recursive ) echo "Configuration of unity-lens-music 6.8.1:";; esac cat <<\_ACEOF @@ -1640,7 +1640,7 @@ test -n "$ac_init_help" && exit $ac_status if $ac_init_version; then cat <<\_ACEOF -unity-lens-music configure 6.8.0 +unity-lens-music configure 6.8.1 generated by GNU Autoconf 2.69 Copyright (C) 2012 Free Software Foundation, Inc. @@ -2011,7 +2011,7 @@ This file contains any messages produced by compilers while running configure, to aid debugging if configure makes a mistake. -It was created by unity-lens-music $as_me 6.8.0, which was +It was created by unity-lens-music $as_me 6.8.1, which was generated by GNU Autoconf 2.69. Invocation command line was $ $0 $@ @@ -2828,7 +2828,7 @@ # Define the identity of the package. PACKAGE=unity-lens-music - VERSION=6.8.0 + VERSION=6.8.1 cat >>confdefs.h <<_ACEOF @@ -13190,7 +13190,7 @@ sqlite3 >= 3.7.7 gee-1.0 json-glib-1.0 - unity >= 4.99.0 + unity >= 6.7 tdb >= 1.2.6\""; } >&5 ($PKG_CONFIG --exists --print-errors "glib-2.0 >= $GLIB_REQUIRED gobject-2.0 >= $GLIB_REQUIRED @@ -13200,7 +13200,7 @@ sqlite3 >= 3.7.7 gee-1.0 json-glib-1.0 - unity >= 4.99.0 + unity >= 6.7 tdb >= 1.2.6") 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 @@ -13213,7 +13213,7 @@ sqlite3 >= 3.7.7 gee-1.0 json-glib-1.0 - unity >= 4.99.0 + unity >= 6.7 tdb >= 1.2.6" 2>/dev/null` test "x$?" != "x0" && pkg_failed=yes else @@ -13234,7 +13234,7 @@ sqlite3 >= 3.7.7 gee-1.0 json-glib-1.0 - unity >= 4.99.0 + unity >= 6.7 tdb >= 1.2.6\""; } >&5 ($PKG_CONFIG --exists --print-errors "glib-2.0 >= $GLIB_REQUIRED gobject-2.0 >= $GLIB_REQUIRED @@ -13244,7 +13244,7 @@ sqlite3 >= 3.7.7 gee-1.0 json-glib-1.0 - unity >= 4.99.0 + unity >= 6.7 tdb >= 1.2.6") 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 @@ -13257,7 +13257,7 @@ sqlite3 >= 3.7.7 gee-1.0 json-glib-1.0 - unity >= 4.99.0 + unity >= 6.7 tdb >= 1.2.6" 2>/dev/null` test "x$?" != "x0" && pkg_failed=yes else @@ -13287,7 +13287,7 @@ sqlite3 >= 3.7.7 gee-1.0 json-glib-1.0 - unity >= 4.99.0 + unity >= 6.7 tdb >= 1.2.6" 2>&1` else LENS_DAEMON_PKG_ERRORS=`$PKG_CONFIG --print-errors --cflags --libs "glib-2.0 >= $GLIB_REQUIRED @@ -13298,7 +13298,7 @@ sqlite3 >= 3.7.7 gee-1.0 json-glib-1.0 - unity >= 4.99.0 + unity >= 6.7 tdb >= 1.2.6" 2>&1` fi # Put the nasty error message in config.log where it belongs @@ -13312,7 +13312,7 @@ sqlite3 >= 3.7.7 gee-1.0 json-glib-1.0 - unity >= 4.99.0 + unity >= 6.7 tdb >= 1.2.6) were not met: $LENS_DAEMON_PKG_ERRORS @@ -14131,7 +14131,7 @@ # report actual input values of CONFIG_FILES etc. instead of their # values after options handling. ac_log=" -This file was extended by unity-lens-music $as_me 6.8.0, which was +This file was extended by unity-lens-music $as_me 6.8.1, which was generated by GNU Autoconf 2.69. Invocation command line was CONFIG_FILES = $CONFIG_FILES @@ -14197,7 +14197,7 @@ cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`" ac_cs_version="\\ -unity-lens-music config.status 6.8.0 +unity-lens-music config.status 6.8.1 configured by $0, generated by GNU Autoconf 2.69, with options \\"\$ac_cs_config\\" diff -Nru unity-lens-music-6.8.0/configure.ac unity-lens-music-6.8.1/configure.ac --- unity-lens-music-6.8.0/configure.ac 2012-09-19 06:25:47.000000000 +0000 +++ unity-lens-music-6.8.1/configure.ac 2012-10-01 13:09:35.000000000 +0000 @@ -1,4 +1,4 @@ -AC_INIT(unity-lens-music, 6.8.0, https://launchpad.net/unity-lens-music) +AC_INIT(unity-lens-music, 6.8.1, https://launchpad.net/unity-lens-music) AC_COPYRIGHT([Copyright 2011-2012 Canonical]) AM_INIT_AUTOMAKE(AC_PACKAGE_NAME, AC_PACKAGE_VERSION) @@ -64,7 +64,7 @@ sqlite3 >= 3.7.7 gee-1.0 json-glib-1.0 - unity >= 4.99.0 + unity >= 6.7 tdb >= 1.2.6) PKG_CHECK_MODULES(PREVIEW_PLAYER, diff -Nru unity-lens-music-6.8.0/data/Makefile.in unity-lens-music-6.8.1/data/Makefile.in --- unity-lens-music-6.8.0/data/Makefile.in 2012-09-19 06:27:08.000000000 +0000 +++ unity-lens-music-6.8.1/data/Makefile.in 2012-10-01 13:09:48.000000000 +0000 @@ -1,4 +1,4 @@ -# Makefile.in generated by automake 1.11.5 from Makefile.am. +# Makefile.in generated by automake 1.11.6 from Makefile.am. # @configure_input@ # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, diff -Nru unity-lens-music-6.8.0/debian/changelog unity-lens-music-6.8.1/debian/changelog --- unity-lens-music-6.8.0/debian/changelog 2012-10-05 05:24:19.000000000 +0000 +++ unity-lens-music-6.8.1/debian/changelog 2012-10-05 05:24:19.000000000 +0000 @@ -1,3 +1,15 @@ +unity-lens-music (6.8.1-0ubuntu1) quantal; urgency=low + + * New upstream release. + - Ignore iradio tag (radio stations) when parsing Rhythmbox database; + check if track uri is a local file, this prevents unexpected network + queries when radio stations are enabled back in the future + (LP: #1049075) + - Add conditional search activation to the remote scope (LP: #1054746) + * Bump libunity-dev dependency + + -- Timo Jyrinki Mon, 01 Oct 2012 16:10:51 +0300 + unity-lens-music (6.8.0-0ubuntu1) quantal-proposed; urgency=low [ Timo Jyrinki ] diff -Nru unity-lens-music-6.8.0/debian/control unity-lens-music-6.8.1/debian/control --- unity-lens-music-6.8.0/debian/control 2012-10-05 05:24:19.000000000 +0000 +++ unity-lens-music-6.8.1/debian/control 2012-10-05 05:24:19.000000000 +0000 @@ -11,7 +11,7 @@ libjson-glib-dev, libdee-dev (>= 1.0.7), libsqlite3-dev (>= 3.7.7), - libunity-dev (>= 6.5.2), + libunity-dev (>= 6.8.0), libtdb-dev (>= 1.2.6), libgstreamer0.10-dev (>= 0.10.36), libgstreamer-plugins-base0.10-dev (>= 0.10.36), diff -Nru unity-lens-music-6.8.0/src/Makefile.in unity-lens-music-6.8.1/src/Makefile.in --- unity-lens-music-6.8.0/src/Makefile.in 2012-09-19 06:27:09.000000000 +0000 +++ unity-lens-music-6.8.1/src/Makefile.in 2012-10-01 13:09:48.000000000 +0000 @@ -1,4 +1,4 @@ -# Makefile.in generated by automake 1.11.5 from Makefile.am. +# Makefile.in generated by automake 1.11.6 from Makefile.am. # @configure_input@ # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, diff -Nru unity-lens-music-6.8.0/src/config.c unity-lens-music-6.8.1/src/config.c --- unity-lens-music-6.8.0/src/config.c 2012-09-19 06:27:17.000000000 +0000 +++ unity-lens-music-6.8.1/src/config.c 2012-10-01 13:10:11.000000000 +0000 @@ -16,7 +16,7 @@ #define CONFIG_BINDIR "/usr/local/bin" #define CONFIG_LOCALEDIR "/usr/local/share/locale" #define CONFIG_PACKAGE "unity-lens-music" -#define CONFIG_VERSION "6.8.0" +#define CONFIG_VERSION "6.8.1" diff -Nru unity-lens-music-6.8.0/src/config.vala unity-lens-music-6.8.1/src/config.vala --- unity-lens-music-6.8.0/src/config.vala 2012-09-19 06:27:15.000000000 +0000 +++ unity-lens-music-6.8.1/src/config.vala 2012-10-01 13:09:53.000000000 +0000 @@ -12,5 +12,5 @@ const string PACKAGE = "unity-lens-music"; - const string VERSION = "6.8.0"; + const string VERSION = "6.8.1"; } diff -Nru unity-lens-music-6.8.0/src/musicstore-scope.c unity-lens-music-6.8.1/src/musicstore-scope.c --- unity-lens-music-6.8.0/src/musicstore-scope.c 2012-09-19 06:27:17.000000000 +0000 +++ unity-lens-music-6.8.1/src/musicstore-scope.c 2012-10-01 13:10:12.000000000 +0000 @@ -137,6 +137,7 @@ UnityMusicLensMusicStoreCollection* collection; UnityMusicLensPreviewPlayer* preview_player; UnityMusicPreview* music_preview; + UnityPreferencesManager* preferences; }; struct _UnityMusicLensMusicStoreScopeProxyPerformSearchData { @@ -152,26 +153,33 @@ GCancellable* cancellable; UnityLensSearch* _tmp0_; gboolean _tmp1_; - UnityLensSearch* _tmp2_; - DeeSerializableModel* _tmp3_; - DeeSerializableModel* _tmp4_; - guint _tmp5_; - UnityMusicLensMusicStoreCollection* _tmp6_; - UnityLensSearch* _tmp7_; - UnitySearchType _tmp8_; - GList* _tmp9_; - gint _tmp10_; - GCancellable* _tmp11_; - UnityLensSearch* _tmp12_; - DeeSerializableModel* _tmp13_; - DeeSerializableModel* _tmp14_; - guint _tmp15_; + UnityPreferencesManager* _tmp2_; + UnityPreferencesManagerRemoteContent _tmp3_; + UnityPreferencesManagerRemoteContent _tmp4_; + UnityLensSearch* _tmp5_; + DeeSerializableModel* _tmp6_; + DeeSerializableModel* _tmp7_; + UnityLensSearch* _tmp8_; + UnityLensSearch* _tmp9_; + DeeSerializableModel* _tmp10_; + DeeSerializableModel* _tmp11_; + guint _tmp12_; + UnityMusicLensMusicStoreCollection* _tmp13_; + UnityLensSearch* _tmp14_; + UnitySearchType _tmp15_; + GList* _tmp16_; + gint _tmp17_; + GCancellable* _tmp18_; + UnityLensSearch* _tmp19_; + DeeSerializableModel* _tmp20_; + DeeSerializableModel* _tmp21_; + guint _tmp22_; GError* e; - UnityLensSearch* _tmp16_; - const gchar* _tmp17_; - const gchar* _tmp18_; - GError* _tmp19_; - const gchar* _tmp20_; + UnityLensSearch* _tmp23_; + const gchar* _tmp24_; + const gchar* _tmp25_; + GError* _tmp26_; + const gchar* _tmp27_; GError * _inner_error_; }; @@ -202,6 +210,8 @@ void unity_music_lens_simple_scope_initialize (UnityMusicLensSimpleScope* self); UnityMusicLensMusicStoreCollection* unity_music_lens_music_store_collection_new (void); UnityMusicLensMusicStoreCollection* unity_music_lens_music_store_collection_construct (GType object_type); +static void __lambda6_ (UnityMusicLensMusicStoreScopeProxy* self, GObject* obj, GParamSpec* pspec); +static void ___lambda6__g_object_notify (GObject* _sender, GParamSpec* pspec, gpointer self); static void unity_music_lens_music_store_scope_proxy_on_progress_changed (UnityMusicLensMusicStoreScopeProxy* self, const gchar* uri, UnityMusicPreviewTrackState state, gdouble progress); void unity_music_lens_music_store_scope_proxy_closed (UnityMusicLensMusicStoreScopeProxy* self, UnityPreview* preview); void unity_music_lens_preview_player_close (UnityMusicLensPreviewPlayer* self, GAsyncReadyCallback _callback_, gpointer _user_data_); @@ -264,6 +274,22 @@ } +static void __lambda6_ (UnityMusicLensMusicStoreScopeProxy* self, GObject* obj, GParamSpec* pspec) { + UnityScope* _tmp0_; + UnityScope* _tmp1_; + g_return_if_fail (obj != NULL); + g_return_if_fail (pspec != NULL); + _tmp0_ = unity_music_lens_simple_scope_get_scope ((UnityMusicLensSimpleScope*) self); + _tmp1_ = _tmp0_; + unity_scope_queue_search_changed (_tmp1_, UNITY_SEARCH_TYPE_DEFAULT); +} + + +static void ___lambda6__g_object_notify (GObject* _sender, GParamSpec* pspec, gpointer self) { + __lambda6_ (self, _sender, pspec); +} + + UnityMusicLensMusicStoreScopeProxy* unity_music_lens_music_store_scope_proxy_construct (GType object_type) { UnityMusicLensMusicStoreScopeProxy * self = NULL; UnityScope* _tmp0_; @@ -277,6 +303,7 @@ UnityScope* _tmp8_; UnityScope* _tmp9_; UnityMusicLensMusicStoreCollection* _tmp10_; + UnityPreferencesManager* _tmp11_; GError * _inner_error_ = NULL; self = (UnityMusicLensMusicStoreScopeProxy*) unity_music_lens_simple_scope_construct (object_type); _tmp0_ = unity_scope_new ("/com/canonical/unity/scope/musicstore"); @@ -299,12 +326,14 @@ _tmp10_ = unity_music_lens_music_store_collection_new (); _g_object_unref0 (self->priv->collection); self->priv->collection = _tmp10_; + _tmp11_ = self->priv->preferences; + g_signal_connect_object ((GObject*) _tmp11_, "notify::remote-content-search", (GCallback) ___lambda6__g_object_notify, self, 0); { - UnityScope* _tmp11_; UnityScope* _tmp12_; - _tmp11_ = unity_music_lens_simple_scope_get_scope ((UnityMusicLensSimpleScope*) self); - _tmp12_ = _tmp11_; - unity_scope_export (_tmp12_, &_inner_error_); + UnityScope* _tmp13_; + _tmp12_ = unity_music_lens_simple_scope_get_scope ((UnityMusicLensSimpleScope*) self); + _tmp13_ = _tmp12_; + unity_scope_export (_tmp13_, &_inner_error_); if (_inner_error_ != NULL) { if (_inner_error_->domain == G_IO_ERROR) { goto __catch4_g_io_error; @@ -318,15 +347,15 @@ __catch4_g_io_error: { GError* e = NULL; - FILE* _tmp13_; - GError* _tmp14_; - const gchar* _tmp15_; + FILE* _tmp14_; + GError* _tmp15_; + const gchar* _tmp16_; e = _inner_error_; _inner_error_ = NULL; - _tmp13_ = stdout; - _tmp14_ = e; - _tmp15_ = _tmp14_->message; - fprintf (_tmp13_, "%s", _tmp15_); + _tmp14_ = stdout; + _tmp15_ = e; + _tmp16_ = _tmp15_->message; + fprintf (_tmp14_, "%s", _tmp16_); _g_error_free0 (e); } __finally4: @@ -371,7 +400,7 @@ _tmp1_ = uri; _tmp2_ = e; _tmp3_ = _tmp2_->message; - g_warning ("musicstore-scope.vala:61: Failed to open uri %s. %s", _tmp1_, _tmp3_); + g_warning ("musicstore-scope.vala:64: Failed to open uri %s. %s", _tmp1_, _tmp3_); _g_error_free0 (e); } __finally5: @@ -434,7 +463,7 @@ _inner_error_ = NULL; _tmp2_ = e; _tmp3_ = _tmp2_->message; - g_warning ("musicstore-scope.vala:86: Failed to close preview player: %s", _tmp3_); + g_warning ("musicstore-scope.vala:89: Failed to close preview player: %s", _tmp3_); _g_error_free0 (e); } __finally6: @@ -459,7 +488,7 @@ g_return_if_fail (preview != NULL); g_return_if_fail (uri != NULL); _tmp0_ = uri; - g_debug ("musicstore-scope.vala:93: play request: '%s'", _tmp0_); + g_debug ("musicstore-scope.vala:96: play request: '%s'", _tmp0_); { UnityMusicLensPreviewPlayer* _tmp1_; UnityMusicPreview* _tmp5_; @@ -504,7 +533,7 @@ _tmp11_ = uri; _tmp12_ = e; _tmp13_ = _tmp12_->message; - g_warning ("musicstore-scope.vala:113: Failed to play '%s': %s", _tmp11_, _tmp13_); + g_warning ("musicstore-scope.vala:116: Failed to play '%s': %s", _tmp11_, _tmp13_); _g_error_free0 (e); } __finally7: @@ -523,7 +552,7 @@ g_return_if_fail (preview != NULL); g_return_if_fail (uri != NULL); _tmp0_ = uri; - g_debug ("musicstore-scope.vala:119: pause request: '%s'", _tmp0_); + g_debug ("musicstore-scope.vala:122: pause request: '%s'", _tmp0_); { UnityMusicLensPreviewPlayer* _tmp1_; _tmp1_ = self->priv->preview_player; @@ -553,7 +582,7 @@ _tmp6_ = uri; _tmp7_ = e; _tmp8_ = _tmp7_->message; - g_warning ("musicstore-scope.vala:134: Failed to pause '%s': %s", _tmp6_, _tmp8_); + g_warning ("musicstore-scope.vala:137: Failed to pause '%s': %s", _tmp6_, _tmp8_); _g_error_free0 (e); } __finally8: @@ -897,25 +926,44 @@ g_object_unref (_data_->_async_result); return FALSE; } + _data_->_tmp2_ = _data_->self->priv->preferences; + _data_->_tmp3_ = unity_preferences_manager_get_remote_content_search (_data_->_tmp2_); + _data_->_tmp4_ = _data_->_tmp3_; + if (_data_->_tmp4_ != UNITY_PREFERENCES_MANAGER_REMOTE_CONTENT_ALL) { + _data_->_tmp5_ = _data_->search; + _data_->_tmp6_ = unity_lens_search_get_results_model (_data_->_tmp5_); + _data_->_tmp7_ = _data_->_tmp6_; + dee_model_clear ((DeeModel*) _data_->_tmp7_); + _data_->_tmp8_ = _data_->search; + g_signal_emit_by_name (_data_->_tmp8_, "finished"); + __g_list_free__g_object_unref0_0 (_data_->filters); + if (_data_->_state_ == 0) { + g_simple_async_result_complete_in_idle (_data_->_async_result); + } else { + g_simple_async_result_complete (_data_->_async_result); + } + g_object_unref (_data_->_async_result); + return FALSE; + } { - _data_->_tmp2_ = _data_->search; - _data_->_tmp3_ = unity_lens_search_get_results_model (_data_->_tmp2_); - _data_->_tmp4_ = _data_->_tmp3_; - _data_->_tmp5_ = 0U; - _data_->_tmp5_ = dee_model_get_n_rows ((DeeModel*) _data_->_tmp4_); - g_debug ("musicstore-scope.vala:194: model has %u rows before search", _data_->_tmp5_); - _data_->_tmp6_ = _data_->self->priv->collection; - _data_->_tmp7_ = _data_->search; - _data_->_tmp8_ = _data_->search_type; - _data_->_tmp9_ = _data_->filters; + _data_->_tmp9_ = _data_->search; + _data_->_tmp10_ = unity_lens_search_get_results_model (_data_->_tmp9_); + _data_->_tmp11_ = _data_->_tmp10_; + _data_->_tmp12_ = 0U; + _data_->_tmp12_ = dee_model_get_n_rows ((DeeModel*) _data_->_tmp11_); + g_debug ("musicstore-scope.vala:208: model has %u rows before search", _data_->_tmp12_); + _data_->_tmp13_ = _data_->self->priv->collection; + _data_->_tmp14_ = _data_->search; + _data_->_tmp15_ = _data_->search_type; + _data_->_tmp16_ = _data_->filters; _data_->filters = NULL; - _data_->_tmp10_ = _data_->max_results; - _data_->_tmp11_ = _data_->cancellable; + _data_->_tmp17_ = _data_->max_results; + _data_->_tmp18_ = _data_->cancellable; _data_->_state_ = 1; - unity_music_lens_music_store_collection_search (_data_->_tmp6_, _data_->_tmp7_, _data_->_tmp8_, _data_->_tmp9_, _data_->_tmp10_, _data_->_tmp11_, unity_music_lens_music_store_scope_proxy_perform_search_ready, _data_); + unity_music_lens_music_store_collection_search (_data_->_tmp13_, _data_->_tmp14_, _data_->_tmp15_, _data_->_tmp16_, _data_->_tmp17_, _data_->_tmp18_, unity_music_lens_music_store_scope_proxy_perform_search_ready, _data_); return FALSE; _state_1: - unity_music_lens_music_store_collection_search_finish (_data_->_tmp6_, _data_->_res_, &_data_->_inner_error_); + unity_music_lens_music_store_collection_search_finish (_data_->_tmp13_, _data_->_res_, &_data_->_inner_error_); if (_data_->_inner_error_ != NULL) { if (_data_->_inner_error_->domain == G_IO_ERROR) { goto __catch9_g_io_error; @@ -925,24 +973,24 @@ g_clear_error (&_data_->_inner_error_); return FALSE; } - _data_->_tmp12_ = _data_->search; - _data_->_tmp13_ = unity_lens_search_get_results_model (_data_->_tmp12_); - _data_->_tmp14_ = _data_->_tmp13_; - _data_->_tmp15_ = 0U; - _data_->_tmp15_ = dee_model_get_n_rows ((DeeModel*) _data_->_tmp14_); - g_debug ("musicstore-scope.vala:196: model has %u rows after search", _data_->_tmp15_); + _data_->_tmp19_ = _data_->search; + _data_->_tmp20_ = unity_lens_search_get_results_model (_data_->_tmp19_); + _data_->_tmp21_ = _data_->_tmp20_; + _data_->_tmp22_ = 0U; + _data_->_tmp22_ = dee_model_get_n_rows ((DeeModel*) _data_->_tmp21_); + g_debug ("musicstore-scope.vala:210: model has %u rows after search", _data_->_tmp22_); } goto __finally9; __catch9_g_io_error: { _data_->e = _data_->_inner_error_; _data_->_inner_error_ = NULL; - _data_->_tmp16_ = _data_->search; - _data_->_tmp17_ = unity_lens_search_get_search_string (_data_->_tmp16_); - _data_->_tmp18_ = _data_->_tmp17_; - _data_->_tmp19_ = _data_->e; - _data_->_tmp20_ = _data_->_tmp19_->message; - g_warning ("musicstore-scope.vala:198: Failed to search for '%s': %s", _data_->_tmp18_, _data_->_tmp20_); + _data_->_tmp23_ = _data_->search; + _data_->_tmp24_ = unity_lens_search_get_search_string (_data_->_tmp23_); + _data_->_tmp25_ = _data_->_tmp24_; + _data_->_tmp26_ = _data_->e; + _data_->_tmp27_ = _data_->_tmp26_->message; + g_warning ("musicstore-scope.vala:212: Failed to search for '%s': %s", _data_->_tmp25_, _data_->_tmp27_); _g_error_free0 (_data_->e); } __finally9: @@ -1007,7 +1055,10 @@ static void unity_music_lens_music_store_scope_proxy_instance_init (UnityMusicLensMusicStoreScopeProxy * self) { + UnityPreferencesManager* _tmp0_ = NULL; self->priv = UNITY_MUSIC_LENS_MUSIC_STORE_SCOPE_PROXY_GET_PRIVATE (self); + _tmp0_ = unity_preferences_manager_get_default (); + self->priv->preferences = _tmp0_; } @@ -1017,6 +1068,7 @@ _g_object_unref0 (self->priv->collection); _g_object_unref0 (self->priv->preview_player); _g_object_unref0 (self->priv->music_preview); + _g_object_unref0 (self->priv->preferences); G_OBJECT_CLASS (unity_music_lens_music_store_scope_proxy_parent_class)->finalize (obj); } diff -Nru unity-lens-music-6.8.0/src/musicstore-scope.vala unity-lens-music-6.8.1/src/musicstore-scope.vala --- unity-lens-music-6.8.0/src/musicstore-scope.vala 2012-09-18 06:48:44.000000000 +0000 +++ unity-lens-music-6.8.1/src/musicstore-scope.vala 2012-10-01 13:09:04.000000000 +0000 @@ -26,6 +26,7 @@ private MusicStoreCollection collection; private PreviewPlayer preview_player; private Unity.MusicPreview? music_preview; + private PreferencesManager preferences = PreferencesManager.get_default (); public MusicStoreScopeProxy () { @@ -41,6 +42,8 @@ collection = new MusicStoreCollection (); + preferences.notify["remote-content-search"].connect((obj, pspec) => { scope.queue_search_changed(SearchType.DEFAULT); }); + try { scope.export (); } catch (GLib.IOError e) { @@ -189,6 +192,17 @@ { if (is_search_empty (search)) return; + + /** + * only perform the request if the user has not disabled + * online/commercial suggestions. That will hide the category as well. + */ + if (preferences.remote_content_search != Unity.PreferencesManager.RemoteContent.ALL) + { + search.results_model.clear (); + search.finished (); + return; + } try { debug ("model has %u rows before search", search.results_model.get_n_rows ()); diff -Nru unity-lens-music-6.8.0/src/rhythmbox-collection.c unity-lens-music-6.8.1/src/rhythmbox-collection.c --- unity-lens-music-6.8.0/src/rhythmbox-collection.c 2012-09-19 06:27:18.000000000 +0000 +++ unity-lens-music-6.8.1/src/rhythmbox-collection.c 2012-10-01 13:10:12.000000000 +0000 @@ -670,20 +670,24 @@ gchar* _tmp53_ = NULL; const gchar* _tmp54_; gboolean _tmp55_ = FALSE; - const gchar* _tmp66_ = NULL; - UnityMusicLensTrack* _tmp67_; - const gchar* _tmp68_; - const gchar* _tmp69_; - UnityMusicLensTrack* _tmp70_; - const gchar* _tmp71_; + UnityMusicLensTrack* _tmp56_; + const gchar* _tmp57_; + const gchar* _tmp58_; + gboolean _tmp59_ = FALSE; + const gchar* _tmp70_ = NULL; + UnityMusicLensTrack* _tmp71_; const gchar* _tmp72_; - gchar* _tmp73_ = NULL; - gchar* _tmp74_; - gchar* _tmp75_ = NULL; - gchar* _tmp76_; + const gchar* _tmp73_; + UnityMusicLensTrack* _tmp74_; + const gchar* _tmp75_; + const gchar* _tmp76_; + gchar* _tmp77_ = NULL; + gchar* _tmp78_; + gchar* _tmp79_ = NULL; + gchar* _tmp80_; gchar* artwork; - const gchar* _tmp77_; - gboolean _tmp78_ = FALSE; + const gchar* _tmp81_; + gboolean _tmp82_ = FALSE; GError * _inner_error_ = NULL; g_return_val_if_fail (self != NULL, NULL); g_return_val_if_fail (track != NULL, NULL); @@ -809,41 +813,69 @@ _g_free0 (_tmp4_); return result; } - { - UnityMusicLensTrack* _tmp56_; - const gchar* _tmp57_; - const gchar* _tmp58_; - GFile* _tmp59_ = NULL; - GFile* artwork_file; - GFile* _tmp60_; - GFileInfo* _tmp61_ = NULL; - GFileInfo* info; - GFileInfo* _tmp62_; - const gchar* _tmp63_ = NULL; - gchar* _tmp64_; - gchar* thumbnail_path; - const gchar* _tmp65_; - _tmp56_ = track; - _tmp57_ = unity_music_lens_track_get_uri (_tmp56_); - _tmp58_ = _tmp57_; - _tmp59_ = g_file_new_for_uri (_tmp58_); - artwork_file = _tmp59_; - _tmp60_ = artwork_file; - _tmp61_ = g_file_query_info (_tmp60_, G_FILE_ATTRIBUTE_THUMBNAIL_PATH, 0, NULL, &_inner_error_); - info = _tmp61_; - if (_inner_error_ != NULL) { - _g_object_unref0 (artwork_file); - goto __catch12_g_error; - } - _tmp62_ = info; - _tmp63_ = g_file_info_get_attribute_string (_tmp62_, G_FILE_ATTRIBUTE_THUMBNAIL_PATH); - _tmp64_ = g_strdup (_tmp63_); - thumbnail_path = _tmp64_; - _tmp65_ = thumbnail_path; - if (_tmp65_ != NULL) { - result = thumbnail_path; + _tmp56_ = track; + _tmp57_ = unity_music_lens_track_get_uri (_tmp56_); + _tmp58_ = _tmp57_; + _tmp59_ = g_str_has_prefix (_tmp58_, "file://"); + if (_tmp59_) { + { + UnityMusicLensTrack* _tmp60_; + const gchar* _tmp61_; + const gchar* _tmp62_; + GFile* _tmp63_ = NULL; + GFile* artwork_file; + GFile* _tmp64_; + GFileInfo* _tmp65_ = NULL; + GFileInfo* info; + GFileInfo* _tmp66_; + const gchar* _tmp67_ = NULL; + gchar* _tmp68_; + gchar* thumbnail_path; + const gchar* _tmp69_; + _tmp60_ = track; + _tmp61_ = unity_music_lens_track_get_uri (_tmp60_); + _tmp62_ = _tmp61_; + _tmp63_ = g_file_new_for_uri (_tmp62_); + artwork_file = _tmp63_; + _tmp64_ = artwork_file; + _tmp65_ = g_file_query_info (_tmp64_, G_FILE_ATTRIBUTE_THUMBNAIL_PATH, 0, NULL, &_inner_error_); + info = _tmp65_; + if (_inner_error_ != NULL) { + _g_object_unref0 (artwork_file); + goto __catch12_g_error; + } + _tmp66_ = info; + _tmp67_ = g_file_info_get_attribute_string (_tmp66_, G_FILE_ATTRIBUTE_THUMBNAIL_PATH); + _tmp68_ = g_strdup (_tmp67_); + thumbnail_path = _tmp68_; + _tmp69_ = thumbnail_path; + if (_tmp69_ != NULL) { + result = thumbnail_path; + _g_object_unref0 (info); + _g_object_unref0 (artwork_file); + _g_free0 (combined); + _g_free0 (album_md5); + _g_free0 (artist_md5); + _g_free0 (album_norm); + _g_free0 (artist_norm); + _g_free0 (album); + _g_free0 (artist); + _g_free0 (_tmp4_); + _g_free0 (filename); + return result; + } + _g_free0 (thumbnail_path); _g_object_unref0 (info); _g_object_unref0 (artwork_file); + } + goto __finally12; + __catch12_g_error: + { + g_clear_error (&_inner_error_); + _inner_error_ = NULL; + } + __finally12: + if (_inner_error_ != NULL) { _g_free0 (combined); _g_free0 (album_md5); _g_free0 (artist_md5); @@ -853,49 +885,27 @@ _g_free0 (artist); _g_free0 (_tmp4_); _g_free0 (filename); - return result; + g_critical ("file %s: line %d: uncaught error: %s (%s, %d)", __FILE__, __LINE__, _inner_error_->message, g_quark_to_string (_inner_error_->domain), _inner_error_->code); + g_clear_error (&_inner_error_); + return NULL; } - _g_free0 (thumbnail_path); - _g_object_unref0 (info); - _g_object_unref0 (artwork_file); - } - goto __finally12; - __catch12_g_error: - { - g_clear_error (&_inner_error_); - _inner_error_ = NULL; - } - __finally12: - if (_inner_error_ != NULL) { - _g_free0 (combined); - _g_free0 (album_md5); - _g_free0 (artist_md5); - _g_free0 (album_norm); - _g_free0 (artist_norm); - _g_free0 (album); - _g_free0 (artist); - _g_free0 (_tmp4_); - _g_free0 (filename); - g_critical ("file %s: line %d: uncaught error: %s (%s, %d)", __FILE__, __LINE__, _inner_error_->message, g_quark_to_string (_inner_error_->domain), _inner_error_->code); - g_clear_error (&_inner_error_); - return NULL; } - _tmp66_ = g_get_user_cache_dir (); - _tmp67_ = track; - _tmp68_ = unity_music_lens_track_get_artist (_tmp67_); - _tmp69_ = _tmp68_; - _tmp70_ = track; - _tmp71_ = unity_music_lens_track_get_album (_tmp70_); - _tmp72_ = _tmp71_; - _tmp73_ = g_strdup_printf ("%s - %s.jpg", _tmp69_, _tmp72_); - _tmp74_ = _tmp73_; - _tmp75_ = g_build_filename (_tmp66_, "rhythmbox", "covers", _tmp74_, NULL); + _tmp70_ = g_get_user_cache_dir (); + _tmp71_ = track; + _tmp72_ = unity_music_lens_track_get_artist (_tmp71_); + _tmp73_ = _tmp72_; + _tmp74_ = track; + _tmp75_ = unity_music_lens_track_get_album (_tmp74_); _tmp76_ = _tmp75_; - _g_free0 (_tmp74_); - artwork = _tmp76_; - _tmp77_ = artwork; - _tmp78_ = g_file_test (_tmp77_, G_FILE_TEST_EXISTS); - if (_tmp78_) { + _tmp77_ = g_strdup_printf ("%s - %s.jpg", _tmp73_, _tmp76_); + _tmp78_ = _tmp77_; + _tmp79_ = g_build_filename (_tmp70_, "rhythmbox", "covers", _tmp78_, NULL); + _tmp80_ = _tmp79_; + _g_free0 (_tmp78_); + artwork = _tmp80_; + _tmp81_ = artwork; + _tmp82_ = g_file_test (_tmp81_, G_FILE_TEST_EXISTS); + if (_tmp82_) { result = artwork; _g_free0 (combined); _g_free0 (album_md5); @@ -1676,7 +1686,7 @@ _inner_error_ = NULL; _tmp10_ = err; _tmp11_ = _tmp10_->message; - g_warning ("rhythmbox-collection.vala:498: %s", _tmp11_); + g_warning ("rhythmbox-collection.vala:501: %s", _tmp11_); _g_error_free0 (err); } __finally13: @@ -1698,7 +1708,7 @@ self->priv->album_art_tdb = _tmp14_; _tmp15_ = self->priv->album_art_tdb; if (_tmp15_ == NULL) { - g_warning ("rhythmbox-collection.vala:507: Unable to open album-art DB!"); + g_warning ("rhythmbox-collection.vala:510: Unable to open album-art DB!"); block2_data_unref (_data2_); _data2_ = NULL; return; @@ -2015,7 +2025,7 @@ _inner_error_ = NULL; _tmp14_ = err; _tmp15_ = _tmp14_->message; - g_warning ("rhythmbox-collection.vala:571: Error while parsing rhythmbox DB: %s", _tmp15_); + g_warning ("rhythmbox-collection.vala:574: Error while parsing rhythmbox DB: %s", _tmp15_); _g_error_free0 (err); } __finally14: @@ -3732,12 +3742,12 @@ default: { gchar* accepted_element_name; - const gchar* _tmp28_; - UnityMusicLensTrack* _tmp29_; - UnityMusicLensTrackType _tmp30_ = 0; - const gchar* _tmp31_; - UnityMusicLensTrack* _tmp32_; - UnityMusicLensTrackType _tmp33_; + const gchar* _tmp23_; + UnityMusicLensTrack* _tmp24_; + UnityMusicLensTrackType _tmp25_ = 0; + const gchar* _tmp26_; + UnityMusicLensTrack* _tmp27_; + UnityMusicLensTrackType _tmp28_; accepted_element_name = NULL; { gint i; @@ -3756,7 +3766,7 @@ gint _tmp12__length1; gint _tmp13_; const gchar* _tmp14_; - gboolean _tmp23_; + gboolean _tmp18_; _tmp6_ = _tmp5_; if (!_tmp6_) { gint _tmp7_; @@ -3776,94 +3786,78 @@ _tmp13_ = i; _tmp14_ = _tmp12_[_tmp13_]; if (g_strcmp0 (_tmp14_, "type") == 0) { - gboolean _tmp15_ = FALSE; - gchar** _tmp16_; - gint _tmp16__length1; - gint _tmp17_; - const gchar* _tmp18_; - gboolean _tmp22_; - _tmp16_ = attr_values; - _tmp16__length1 = _vala_array_length (attr_values); - _tmp17_ = i; - _tmp18_ = _tmp16_[_tmp17_]; - if (g_strcmp0 (_tmp18_, "song") == 0) { - _tmp15_ = TRUE; - } else { - gchar** _tmp19_; - gint _tmp19__length1; - gint _tmp20_; - const gchar* _tmp21_; - _tmp19_ = attr_values; - _tmp19__length1 = _vala_array_length (attr_values); - _tmp20_ = i; - _tmp21_ = _tmp19_[_tmp20_]; - _tmp15_ = g_strcmp0 (_tmp21_, "iradio") == 0; - } - _tmp22_ = _tmp15_; - _tmp11_ = _tmp22_; + gchar** _tmp15_; + gint _tmp15__length1; + gint _tmp16_; + const gchar* _tmp17_; + _tmp15_ = attr_values; + _tmp15__length1 = _vala_array_length (attr_values); + _tmp16_ = i; + _tmp17_ = _tmp15_[_tmp16_]; + _tmp11_ = g_strcmp0 (_tmp17_, "song") == 0; } else { _tmp11_ = FALSE; } - _tmp23_ = _tmp11_; - if (_tmp23_) { - gchar** _tmp24_; - gint _tmp24__length1; - gint _tmp25_; - const gchar* _tmp26_; - gchar* _tmp27_; - _tmp24_ = attr_values; - _tmp24__length1 = _vala_array_length (attr_values); - _tmp25_ = i; - _tmp26_ = _tmp24_[_tmp25_]; - _tmp27_ = g_strdup (_tmp26_); + _tmp18_ = _tmp11_; + if (_tmp18_) { + gchar** _tmp19_; + gint _tmp19__length1; + gint _tmp20_; + const gchar* _tmp21_; + gchar* _tmp22_; + _tmp19_ = attr_values; + _tmp19__length1 = _vala_array_length (attr_values); + _tmp20_ = i; + _tmp21_ = _tmp19_[_tmp20_]; + _tmp22_ = g_strdup (_tmp21_); _g_free0 (accepted_element_name); - accepted_element_name = _tmp27_; + accepted_element_name = _tmp22_; } } } } - _tmp28_ = accepted_element_name; - if (_tmp28_ == NULL) { + _tmp23_ = accepted_element_name; + if (_tmp23_ == NULL) { _g_free0 (accepted_element_name); return; } self->priv->processing_track = TRUE; - _tmp29_ = unity_music_lens_track_new (); + _tmp24_ = unity_music_lens_track_new (); _g_object_unref0 (self->priv->current_track); - self->priv->current_track = _tmp29_; - _tmp31_ = accepted_element_name; - if (g_strcmp0 (_tmp31_, "song") == 0) { - _tmp30_ = UNITY_MUSIC_LENS_TRACK_TYPE_SONG; + self->priv->current_track = _tmp24_; + _tmp26_ = accepted_element_name; + if (g_strcmp0 (_tmp26_, "song") == 0) { + _tmp25_ = UNITY_MUSIC_LENS_TRACK_TYPE_SONG; } else { - _tmp30_ = UNITY_MUSIC_LENS_TRACK_TYPE_RADIO; + _tmp25_ = UNITY_MUSIC_LENS_TRACK_TYPE_RADIO; } - _tmp32_ = self->priv->current_track; - _tmp33_ = _tmp30_; - unity_music_lens_track_set_type_track (_tmp32_, _tmp33_); + _tmp27_ = self->priv->current_track; + _tmp28_ = _tmp25_; + unity_music_lens_track_set_type_track (_tmp27_, _tmp28_); _g_free0 (accepted_element_name); break; } } } } else { - const gchar* _tmp34_; - const gchar* _tmp35_; - GQuark _tmp37_ = 0U; - static GQuark _tmp36_label0 = 0; - static GQuark _tmp36_label1 = 0; - static GQuark _tmp36_label2 = 0; - static GQuark _tmp36_label3 = 0; - static GQuark _tmp36_label4 = 0; - static GQuark _tmp36_label5 = 0; - static GQuark _tmp36_label6 = 0; - static GQuark _tmp36_label7 = 0; - static GQuark _tmp36_label8 = 0; - static GQuark _tmp36_label9 = 0; - static GQuark _tmp36_label10 = 0; - _tmp34_ = name; - _tmp35_ = _tmp34_; - _tmp37_ = (NULL == _tmp35_) ? 0 : g_quark_from_string (_tmp35_); - if (_tmp37_ == ((0 != _tmp36_label0) ? _tmp36_label0 : (_tmp36_label0 = g_quark_from_static_string ("location")))) { + const gchar* _tmp29_; + const gchar* _tmp30_; + GQuark _tmp32_ = 0U; + static GQuark _tmp31_label0 = 0; + static GQuark _tmp31_label1 = 0; + static GQuark _tmp31_label2 = 0; + static GQuark _tmp31_label3 = 0; + static GQuark _tmp31_label4 = 0; + static GQuark _tmp31_label5 = 0; + static GQuark _tmp31_label6 = 0; + static GQuark _tmp31_label7 = 0; + static GQuark _tmp31_label8 = 0; + static GQuark _tmp31_label9 = 0; + static GQuark _tmp31_label10 = 0; + _tmp29_ = name; + _tmp30_ = _tmp29_; + _tmp32_ = (NULL == _tmp30_) ? 0 : g_quark_from_string (_tmp30_); + if (_tmp32_ == ((0 != _tmp31_label0) ? _tmp31_label0 : (_tmp31_label0 = g_quark_from_static_string ("location")))) { switch (0) { default: { @@ -3871,7 +3865,7 @@ break; } } - } else if (_tmp37_ == ((0 != _tmp36_label1) ? _tmp36_label1 : (_tmp36_label1 = g_quark_from_static_string ("title")))) { + } else if (_tmp32_ == ((0 != _tmp31_label1) ? _tmp31_label1 : (_tmp31_label1 = g_quark_from_static_string ("title")))) { switch (0) { default: { @@ -3879,7 +3873,7 @@ break; } } - } else if (_tmp37_ == ((0 != _tmp36_label2) ? _tmp36_label2 : (_tmp36_label2 = g_quark_from_static_string ("duration")))) { + } else if (_tmp32_ == ((0 != _tmp31_label2) ? _tmp31_label2 : (_tmp31_label2 = g_quark_from_static_string ("duration")))) { switch (0) { default: { @@ -3887,7 +3881,7 @@ break; } } - } else if (_tmp37_ == ((0 != _tmp36_label3) ? _tmp36_label3 : (_tmp36_label3 = g_quark_from_static_string ("artist")))) { + } else if (_tmp32_ == ((0 != _tmp31_label3) ? _tmp31_label3 : (_tmp31_label3 = g_quark_from_static_string ("artist")))) { switch (0) { default: { @@ -3895,7 +3889,7 @@ break; } } - } else if (_tmp37_ == ((0 != _tmp36_label4) ? _tmp36_label4 : (_tmp36_label4 = g_quark_from_static_string ("album")))) { + } else if (_tmp32_ == ((0 != _tmp31_label4) ? _tmp31_label4 : (_tmp31_label4 = g_quark_from_static_string ("album")))) { switch (0) { default: { @@ -3903,7 +3897,7 @@ break; } } - } else if (_tmp37_ == ((0 != _tmp36_label5) ? _tmp36_label5 : (_tmp36_label5 = g_quark_from_static_string ("genre")))) { + } else if (_tmp32_ == ((0 != _tmp31_label5) ? _tmp31_label5 : (_tmp31_label5 = g_quark_from_static_string ("genre")))) { switch (0) { default: { @@ -3911,7 +3905,7 @@ break; } } - } else if (_tmp37_ == ((0 != _tmp36_label6) ? _tmp36_label6 : (_tmp36_label6 = g_quark_from_static_string ("track-number")))) { + } else if (_tmp32_ == ((0 != _tmp31_label6) ? _tmp31_label6 : (_tmp31_label6 = g_quark_from_static_string ("track-number")))) { switch (0) { default: { @@ -3919,7 +3913,7 @@ break; } } - } else if (_tmp37_ == ((0 != _tmp36_label7) ? _tmp36_label7 : (_tmp36_label7 = g_quark_from_static_string ("play-count")))) { + } else if (_tmp32_ == ((0 != _tmp31_label7) ? _tmp31_label7 : (_tmp31_label7 = g_quark_from_static_string ("play-count")))) { switch (0) { default: { @@ -3927,7 +3921,7 @@ break; } } - } else if (_tmp37_ == ((0 != _tmp36_label8) ? _tmp36_label8 : (_tmp36_label8 = g_quark_from_static_string ("date")))) { + } else if (_tmp32_ == ((0 != _tmp31_label8) ? _tmp31_label8 : (_tmp31_label8 = g_quark_from_static_string ("date")))) { switch (0) { default: { @@ -3935,7 +3929,7 @@ break; } } - } else if (_tmp37_ == ((0 != _tmp36_label9) ? _tmp36_label9 : (_tmp36_label9 = g_quark_from_static_string ("media-type")))) { + } else if (_tmp32_ == ((0 != _tmp31_label9) ? _tmp31_label9 : (_tmp31_label9 = g_quark_from_static_string ("media-type")))) { switch (0) { default: { @@ -3943,7 +3937,7 @@ break; } } - } else if (_tmp37_ == ((0 != _tmp36_label10) ? _tmp36_label10 : (_tmp36_label10 = g_quark_from_static_string ("album-artist")))) { + } else if (_tmp32_ == ((0 != _tmp31_label10) ? _tmp31_label10 : (_tmp31_label10 = g_quark_from_static_string ("album-artist")))) { switch (0) { default: { diff -Nru unity-lens-music-6.8.0/src/rhythmbox-collection.vala unity-lens-music-6.8.1/src/rhythmbox-collection.vala --- unity-lens-music-6.8.0/src/rhythmbox-collection.vala 2012-09-19 04:26:10.000000000 +0000 +++ unity-lens-music-6.8.1/src/rhythmbox-collection.vala 2012-10-01 13:09:04.000000000 +0000 @@ -114,7 +114,7 @@ for (int i = 0; attr_names[i] != null; i++) { if (attr_names[i] == "type" && (attr_values[i] == "song" - || attr_values[i] == "iradio")) + /*|| attr_values[i] == "iradio"*/)) // disable radio stations accepted_element_name = attr_values[i]; } if (accepted_element_name == null) return; @@ -336,14 +336,17 @@ ChecksumType.MD5, combined))); if (FileUtils.test (filename, FileTest.EXISTS)) return filename; - // Try Nautilus thumbnails - try + if (track.uri.has_prefix ("file://")) { + // Try Nautilus thumbnails + try + { File artwork_file = File.new_for_uri (track.uri); var info = artwork_file.query_info (FILE_ATTRIBUTE_THUMBNAIL_PATH, 0, null); var thumbnail_path = info.get_attribute_string (FILE_ATTRIBUTE_THUMBNAIL_PATH); if (thumbnail_path != null) return thumbnail_path; - } catch {} + } catch {} + } // Try covers folder string artwork = Path.build_filename ( diff -Nru unity-lens-music-6.8.0/tests/Makefile.in unity-lens-music-6.8.1/tests/Makefile.in --- unity-lens-music-6.8.0/tests/Makefile.in 2012-09-19 06:27:09.000000000 +0000 +++ unity-lens-music-6.8.1/tests/Makefile.in 2012-10-01 13:09:48.000000000 +0000 @@ -1,4 +1,4 @@ -# Makefile.in generated by automake 1.11.5 from Makefile.am. +# Makefile.in generated by automake 1.11.6 from Makefile.am. # @configure_input@ # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, diff -Nru unity-lens-music-6.8.0/tests/unit/Makefile.in unity-lens-music-6.8.1/tests/unit/Makefile.in --- unity-lens-music-6.8.0/tests/unit/Makefile.in 2012-09-19 06:27:09.000000000 +0000 +++ unity-lens-music-6.8.1/tests/unit/Makefile.in 2012-10-01 13:09:48.000000000 +0000 @@ -1,4 +1,4 @@ -# Makefile.in generated by automake 1.11.5 from Makefile.am. +# Makefile.in generated by automake 1.11.6 from Makefile.am. # @configure_input@ # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, diff -Nru unity-lens-music-6.8.0/tests/unit/test-rhythmbox-parser.vala unity-lens-music-6.8.1/tests/unit/test-rhythmbox-parser.vala --- unity-lens-music-6.8.0/tests/unit/test-rhythmbox-parser.vala 2012-09-18 06:48:44.000000000 +0000 +++ unity-lens-music-6.8.1/tests/unit/test-rhythmbox-parser.vala 2012-10-01 13:09:04.000000000 +0000 @@ -36,6 +36,9 @@ return 0; } + /* FIXME: this test is broken - it passes if iradio tag is not parsed + * because all checks are done in a callback that's never called in such case. + */ private static void test_radios () { var parser = new RhythmboxCollection.XmlParser ();