Skip to content

Conversation

@sammko
Copy link

@sammko sammko commented Jun 19, 2015

I implemented an Album Artist library view (#82). I am, however, having one problem with this patch, which I cannot figure out how to fix. When I select the view in the library, I end up with an Untagged entry at the bottom of the list, which fails to open. Thanks for any help with that.

onto and others added 30 commits November 7, 2012 19:10
Before, the lyric plugin had to do it by itself, which means *each*
lyric plugins had to do it by themselves.
Now, the plugin code is launched into a new thread, not matter what.
It now describes how the whole configuration looks like, and then create automatically
all the accessors, with the right values loaded from the configuration file,
and also knows how to write back the values into this file.

It could be even further improved if the attributes had the same name as the option
in the file, but that's already much better than before.

This refactor also removed a few duplicates and unused values...
I have some int-values in my config file which are set to "None". This
definitively can't be loaded as an integer and use to be silently
ignored before.
Conflicts:
	sonata/info.py
	sonata/main.py
	sonata/mpdhelper.py
GObject used to expose part of the GLib API, but since PyGObject 3.7.2,
this is now deprecated and will be eventually gone one day.

See 483c86 from the PyGObject Git repository from
git://git.gnome.org/pygobject
The new plugin comes from Anton Lashkov, adapted to Python 3 by me.

A side effect is that it's not possible to directly edit the lyrics from
Sonata anymore, due to the fact that the plugin doesn't export the "edit"
functionality anymore. This might come back later on, if really needed.

Co-Edited-By: Jonathan Ballet <jon@multani.info>
Move non-related code to the caller so it can be reused by other plugins
f0rki and others added 28 commits March 19, 2014 14:29
…ong ids to move the songs, instead of ranges.
 File "/usr/lib64/python3.2/site-packages/sonata/artwork.py", line 89
    yield os.path.join(song_dir, artworks[0])
SyntaxError: 'return' with argument inside generator
Sonata automatically the song changed since "last time" (None) and do what's
needed, without having to force things.
* use a defaultdict instead of manually checking for existing values
* use automatically processed "track" attribute, instead of manually
  converting a track value into an integer
* removed unused "sortalbumbytrack" parameter
* removed not so usefull temporary variables and function calls
At the moment, there's no need for all of this, so I prefer to keep things
simple.
It doesn't work on OSX (per multani#67) and even so, the documentation says it
should not be used unless in specific cases, which we are not
considering in Sonata.

For more information, see
https://docs.python.org/3/library/locale.html#access-to-message-catalogs
tagpy depends on taglib, not Sonata itself.
This has been added upstream in commit fda059a634398b6659792aa6e4b36d9f0f4ff9a8
and I got the authorization by the author to add it back here.

See offmessage/pyscrobbler@fda059a
Berlios completely shutdown its services in March 2014 without much notice.
The mailing lists hosted there are lost, as well as the website.

The new website is now at http://www.nongnu.org/sonata/
The new mailing list is at
http://lists.nongnu.org/mailman/listinfo/sonata-users
Glade dialogs created by Gtk.Builder use the C library gettext
interface. To enable localization for this interface, use setlocale /
bindtextdomain from the python locale module.
locale.bindtextdomain() is an interface to the eponymous libc
function, which is GNU gettext specific and may not be provided on
some systems (e.g. OSX). See:
https://docs.python.org/3/library/locale.html#access-to-message-catalogs
Check for whitespace only strings before split()[0] to avoid
IndexError. Also add test cases for these values. This fixes update of
the playback progress bar for songs with empty track / disc values.
Actually handles the case where a disc or a track value is empty
Merge branch 'kurisuke/fix-progress-bar2'
Provide uniform translation for both GObject / Glade strings
(initialized by module locale) and Python gettext strings to
prevent a mix of languages in UI strings.

If a locale is provided with sonata but not generated for the C
library, Python strings will be translated, but strings in Glade
dialogs will not be translated. So if the initial locale.setlocale
call fails, don't point Python gettext to the .mo files -- this way
all strings will be left untranslated.
Merge branch 'kurisuke/fix-untranslated-glade-dialogs'

Conflicts:
	CHANGELOG
Thi is based on an issue reported by Rocus van Osteen in multani#80 but
slightly improved by actually removed unused code.
@multani
Copy link
Owner

multani commented Jun 21, 2015

Hi,

Thanks for the patch and for diving into library.py 😰 I'm just to skim over the patch, since the code (in Sonata) is really horrendous, and needs a huge, huge, huge refactoring.

So, I tested your branch, and it seems there's still some problem.

First, I can't find my tracks which are tagged with the albumartist tag correctly set (I use Various Artists), the albums simply don't appear in Sonata.
Also, I also have the "Untagged" entry, which I think should just not be here.

I can try to have a look at the code to see where your problem is, but that will take some time.

(Probably an easier way, if you are into it, would be to first refactor the library module, then implement your new functionality 😁 If you are interested or curious, just drop me an email and I can give you some guidance before you start.)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

7 participants