[gnome-music/wip/mschraal/tageditor-13feb2020: 4/25] utils: Add fields to getters mapping
- From: Marinus Schraal <mschraal src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-music/wip/mschraal/tageditor-13feb2020: 4/25] utils: Add fields to getters mapping
- Date: Thu, 13 Feb 2020 22:13:30 +0000 (UTC)
commit 7a2b7208be6f7faa888713fe2a99803bf8c366c7
Author: Sumaid Syed <sumaidsyed gmail com>
Date: Fri Aug 16 16:09:49 2019 +0530
utils: Add fields to getters mapping
Add a dictionary which allows iterating over
different getters and filling corresponding entries
or suggestions in tageditor.
gnomemusic/utils.py | 10 ++++++++++
1 file changed, 10 insertions(+)
---
diff --git a/gnomemusic/utils.py b/gnomemusic/utils.py
index fe2798e6..a8aef985 100644
--- a/gnomemusic/utils.py
+++ b/gnomemusic/utils.py
@@ -210,3 +210,13 @@ def natural_sort_names(name_a, name_b):
for tmp in re.split(r"(\d+)", normalize_caseless(text))]
return _extract_numbers(name_b) < _extract_numbers(name_a)
+
+
+fields_getter = {
+ "album": get_album_title,
+ "artist": get_song_artist,
+ "disc": get_album_disc_nr,
+ "title": get_media_title,
+ "track": get_media_track_nr,
+ "year": get_media_year
+}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]