Discussion:
[emms-help] [PATCH] Improve browsing by artist and year
Petteri Hintsanen
2015-10-18 20:25:02 UTC
Permalink
New function emms-browser-get-track-field-extended uses albumartist,
originalyear and originaldate tags for grouping tracks in the browser.
It can be assigned to emms-browser-get-track-field-function.
---
lisp/emms-browser.el | 56 +++++++++++++++++++++++++++++++++++++++++++++++++---
1 file changed, 53 insertions(+), 3 deletions(-)

diff --git a/lisp/emms-browser.el b/lisp/emms-browser.el
index 8a86bd2..1fc1182 100644
--- a/lisp/emms-browser.el
+++ b/lisp/emms-browser.el
@@ -1,6 +1,6 @@
;;; emms-browser.el --- a track browser supporting covers and filtering

-;; Copyright (C) 2006, 2007, 2008, 2009 Free Software Foundation, Inc.
+;; Copyright (C) 2006, 2007, 2008, 2009, 2015 Free Software Foundation, Inc.

;; Author: Damien Elmes <***@repose.cx>
;; Keywords: emms, mp3, mpeg, multimedia
@@ -419,6 +419,21 @@ Called once for each directory."
:group 'emms-browser
:type 'hook)

+(defcustom emms-browser-prefer-albumartist nil
+ "*Prefer albumartist tag.
+If non-nil, emms-browser-get-track-field-extended prefers
+albumartist tag over artist tag, if available."
+ :group 'emms-browser
+ :type 'boolean)
+
+(defcustom emms-browser-prefer-originalyear nil
+ "*Prefer originalyear and originaldate tags.
+If non-nil, emms-browser-get-track-field-extended prefers
+originalyear and originaldate tags over year and date tags, if
+available."
+ :group 'emms-browser
+ :type 'boolean)
+
(defvar emms-browser-buffer nil
"The current browser buffer, if any.")

@@ -644,6 +659,41 @@ compilations, etc."
(defun emms-browser-get-track-field-simple (track type)
(emms-track-get track type "misc"))

+(defun emms-browser-get-track-field-extended (track type)
+ "Return TYPE from TRACK.
+This function uses 'info-albumartist, 'info-originalyear,
+'info-originaldate and 'info-date symbols, if available for
+TRACK.
+
+If TYPE is 'info-year, 'info-date and 'info-originaldate are
+preferred over 'info-year and 'info-originalyear symbols.
+
+If emms-browser-prefer-albumartist is t, info-albumartist is
+preferred over info-artist.
+
+If emms-browser-prefer-originalyear is t, info-originalyear is
+preferred over info-year."
+ (cond ((eq type 'info-artist)
+ (or (when emms-browser-prefer-albumartist
+ (emms-track-get track 'info-albumartist))
+ (emms-track-get track 'info-artist "misc")))
+ ((eq type 'info-year)
+ (let ((date (or (when emms-browser-prefer-originalyear
+ (or (emms-track-get track 'info-originaldate)
+ (emms-track-get track 'info-originalyear)))
+ (emms-track-get track 'info-date)
+ (emms-track-get track 'info-year "misc"))))
+ (emms-browser-extract-year-from-date date)))
+ (t (emms-track-get track type "misc"))))
+
+(defun emms-browser-extract-year-from-date (date)
+ "Try to extract year part from DATE.
+Return DATE if the year cannot be extracted."
+ (or (nth 5 (parse-time-string date))
+ (when (string-match "^[ \t]*[0-9]\\{4\\}" date)
+ (substring date (match-beginning 0) (match-end 0)))
+ date))
+
(defun emms-browser-get-track-field-use-directory-name (track type)
(if (eq type 'info-artist)
(emms-browser-get-artist-from-path
@@ -809,8 +859,8 @@ return an empty string."
tracknum)))))

(defun emms-browser-disc-number (track)
- "Return a string representation of a track number.
-The string will end in a space. If no track number is available,
+ "Return a string representation of a disc number.
+The string will end in a space. If no disc number is available,
return an empty string."
(let ((discnum (emms-track-get track 'info-discnumber)))
(if (or (not (stringp discnum)) (string= discnum "0"))
--
2.1.4
Petteri Hintsanen
2015-10-18 20:25:03 UTC
Permalink
The browser can now group artists by record label.
---
lisp/emms-browser.el | 17 +++++++++++------
1 file changed, 11 insertions(+), 6 deletions(-)

diff --git a/lisp/emms-browser.el b/lisp/emms-browser.el
index 8a86bd2..99e8120 100644
--- a/lisp/emms-browser.el
+++ b/lisp/emms-browser.el
@@ -468,6 +468,7 @@ Called once for each directory."
(define-key map (kbd "b 4") 'emms-browse-by-year)
(define-key map (kbd "b 5") 'emms-browse-by-composer)
(define-key map (kbd "b 6") 'emms-browse-by-performer)
+ (define-key map (kbd "b 7") 'emms-browse-by-label)
(define-key map (kbd "s a") 'emms-browser-search-by-artist)
(define-key map (kbd "s c") 'emms-browser-search-by-composer)
(define-key map (kbd "s p") 'emms-browser-search-by-performer)
@@ -634,6 +635,7 @@ example function is `emms-browse-by-artist'."
(emms-browser-add-category "album" 'info-album)
(emms-browser-add-category "genre" 'info-genre)
(emms-browser-add-category "year" 'info-year)
+(emms-browser-add-category "label" 'info-label)

(defun emms-browser-get-track-field (track type)
"Return TYPE from TRACK.
@@ -748,7 +750,8 @@ Eg. if CURRENT-MAPPING is currently 'info-artist, return 'info-album."
((eq current-mapping 'info-performer) 'info-album)
((eq current-mapping 'info-album) 'info-title)
((eq current-mapping 'info-genre) 'info-artist)
- ((eq current-mapping 'info-year) 'info-artist)))
+ ((eq current-mapping 'info-year) 'info-artist)
+ ((eq current-mapping 'info-label) 'info-artist)))

(defun emms-browser-make-bdata-tree (type level tracks name)
"Build a tree of browser DB elements for tracks."
@@ -1801,11 +1804,12 @@ If > album level, most of the track data will not make sense."
(name (cond
((or (eq type 'info-year)
(eq type 'info-genre)) "year/genre")
- ((eq type 'info-artist) "artist")
- ((eq type 'info-composer) "composer")
- ((eq type 'info-performer) "performer")
- ((eq type 'info-album) "album")
- ((eq type 'info-title) "track"))))
+ ((eq type 'info-artist) "artist")
+ ((eq type 'info-composer) "composer")
+ ((eq type 'info-performer) "performer")
+ ((eq type 'info-label) "label")
+ ((eq type 'info-album) "album")
+ ((eq type 'info-title) "track"))))
(intern
(concat "emms-browser-" name "-face"))))

@@ -1932,6 +1936,7 @@ the text that it generates."
:group 'emms-browser-mode)))

(emms-browser-make-face "year/genre" "#aaaaff" "#444477" 1.5)
+(emms-browser-make-face "label" "#aaaaff" "#444477" 1.5)
(emms-browser-make-face "artist" "#aaaaff" "#444477" 1.3)
(emms-browser-make-face "composer" "#aaaaff" "#444477" 1.3)
(emms-browser-make-face "performer" "#aaaaff" "#444477" 1.3)
--
2.1.4
Rasmus
2015-10-19 13:30:25 UTC
Permalink
Hi Petteri,

Thanks for your patches!
New program emms-print-taglib-metadata uses TagLib's C++ interface to
extract track information.
This will still not extract e.g. albumartist from wma. But this is a
limitation in taglib.
---
AUTHORS | 1 +
Makefile | 5 ++
lisp/emms-info.el | 14 +++++-
src/emms-print-taglib-metadata.cpp | 96 ++++++++++++++++++++++++++++++++++++++
4 files changed, 114 insertions(+), 2 deletions(-)
create mode 100644 src/emms-print-taglib-metadata.cpp
diff --git a/AUTHORS b/AUTHORS
index 3111770..e84c4ab 100644
--- a/AUTHORS
+++ b/AUTHORS
@@ -27,6 +27,7 @@ Ye Wenbin <***@gmail.com>
mathias.dahl <mathias.dahl>
Maybe make this a separate commit.
;; coding: utf-8
diff --git a/Makefile b/Makefile
index c0846d6..dda3640 100644
--- a/Makefile
+++ b/Makefile
@@ -4,6 +4,8 @@ DOCDIR=doc/
LISPDIR=lisp
SRCDIR=src
+CXXFLAGS=-std=c++11
Would it be better to use old-style loops than making this requirement?
Personally, I think C++2011 is fine by now.
+
ALLSOURCE=$(wildcard $(LISPDIR)/*.el)
ALLCOMPILED=$(wildcard $(LISPDIR)/*.elc)
emms-print-metadata: $(SRCDIR)/emms-print-metadata.c
+emms-print-taglib-metadata: $(SRCDIR)/emms-print-taglib-metadata.cpp
+
The naming is confusing. emms-print-metadata is also using taglib, though
not the property list of the C++ binding. I say we stick to one program.
The implementation language doesn’t matter to the end user and the
functionality is the same.

At the very least you need to point the config towards the new program.
test -d $(SITELISP) || mkdir -p $(SITELISP)
test -d $(INFODIR) || install -d $(INFODIR)
diff --git a/lisp/emms-info.el b/lisp/emms-info.el
index cfc206b..46b8cd9 100644
--- a/lisp/emms-info.el
+++ b/lisp/emms-info.el
@@ -1,6 +1,6 @@
;;; emms-info.el --- Retrieving track information
-;; Copyright (C) 2005, 2006, 2007, 2008, 2009, 2010 Free Software Foundation Inc.
+;; Copyright (C) 2005, 2006, 2007, 2008, 2009, 2010, 2015 Free Software Foundation Inc.
@@ -29,16 +29,26 @@
;; The code will add info symbols to the track. The following symbols
-;; info-artist - string naming the artist
+;; info-albumartist - string naming the album artist
+;; info-albumartistsort - string key for album artist collation
+;; info-artist - string naming the track artist
+;; info-artistsort - string key for artist collation
;; info-composer - string naming the composer
+;; info-composersort - string key for composer collation
;; info-performer - string naming the performer
;; info-title - string naming the title of the song
+;; info-titlesort - string key for title collation
;; info-album - string naming the album
+;; info-albumsort - string key for album collation
;; info-tracknumber - string(?) naming the track number
;; info-discnumber - string naming the disc number
;; info-year - string naming the year
+;; info-originalyear - string naming the original release year
+;; info-date - string naming the release date
+;; info-originaldate - string naming the original release date
;; info-note - string of free-form entry
;; info-genre - string naming the genre
+;; info-label - string for the record label
;; info-playing-time - number giving the seconds of playtime
diff --git a/src/emms-print-taglib-metadata.cpp b/src/emms-print-taglib-metadata.cpp
new file mode 100644
index 0000000..9e3f1d7
--- /dev/null
+++ b/src/emms-print-taglib-metadata.cpp
@@ -0,0 +1,96 @@
+/* emms-print-taglib-metadata.cpp --- Info function for TagLib
+ Copyright (C) 2015 Free Software Foundation, Inc.
+
+
+This file is part of EMMS.
+
+EMMS is free software; you can redistribute it and/or modify
+it under the terms of the GNU General Public License as published by
+the Free Software Foundation; either version 3, or (at your option)
+any later version.
+
+EMMS 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 General Public License for more details.
+
+You should have received a copy of the GNU General Public License
+along with EMMS; see the file COPYING. If not, write to
+the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
+Boston, MA 02110-1301, USA. */
+
+#include <taglib/fileref.h>
+#include <taglib/tag.h>
+#include <taglib/tpropertymap.h>
+#include <iostream>
+
+static const std::vector<std::string> tags_to_extract = {
+ "album",
+ "albumsort",
+ "albumartist",
+ "albumartistsort",
+ "artist",
+ "artistsort",
+ "composer",
+ "composersort",
+ "performer",
+ "year",
+ "originalyear",
+ "date",
+ "originaldate",
+ "genre",
+ "label",
+ "title",
+ "titlesort",
+ "tracknumber",
+ "discnumber"
+};
+
+void print_tag (const TagLib::PropertyMap& tags, const std::string& tag);
+
+int
+main (int argc, char* argv[])
Is it on purpose that you write int main in two lines?
+{
+ If (argc != 2)
+ {
+ std::cerr << "Usage: emms-print-metadata file.{mp3,ogg,flac}\n"
+ "Other formats may work as well.\n";
+ return 1;
+ }
+
+ TagLib::FileRef file (argv[1]);
+ if (file.isNull ()) return 1;
Should an helpful error/message be displayed here?
+ const auto tags = file.file ()->properties ();
+
+ for (const auto& tag : tags_to_extract)
+ {
+ print_tag (tags, tag);
+ }
+
+ int length = 0;
+ if (file.audioProperties ())
+ {
+ auto properties = file.audioProperties ();
+ length = properties->length ();
+ }
+ std::cout << "info-playing-time=" << length << std::endl;
+
+ return 0;
+}
+
+void
+print_tag (const TagLib::PropertyMap& tags, const std::string& tag)
Again, you have the return type and the fun name it on two lines. I find
it weird, but it’s also a while since I read C so perhaps I’m just not
accustomed to this.
+{
+ TagLib::StringList values = tags[tag];
+ if (!values.isEmpty ())
+ {
+ // TODO: Extract all values, not only the first one. EMMS needs
+ // to be extended to handle such values.
+ auto value = values.front ();
+ std::cout << "info-" << tag << "=" << value.to8Bit (true) << std::endl;
+ }
+}
+
+/* emms-print-taglib-metadata.cpp ends here. */
Looks good. I will install and use the patches locally soon.

Thanks,
Rasmus
--
Not everything that goes around comes back around, you know
Petteri Hintsanen
2015-10-19 20:18:41 UTC
Permalink
Post by Rasmus
--- a/AUTHORS
+++ b/AUTHORS
@@ -27,6 +27,7 @@ Ye Wenbin <***@gmail.com>
mathias.dahl <mathias.dahl>
Maybe make this a separate commit.
OK.
Post by Rasmus
Would it be better to use old-style loops than making this requirement?
Personally, I think C++2011 is fine by now.
For-loops are not the only C++11 thing, auto keyword and initializer
list syntax are there too. But they can be easily replaced if you want
to stick to C++98. It would be a bit uglier.
Post by Rasmus
The naming is confusing. emms-print-metadata is also using taglib, though
not the property list of the C++ binding. I say we stick to one program.
The implementation language doesn’t matter to the end user and the
functionality is the same.
OK. I think this is up to maintainers to decide. I'm happy with any
decision.
Post by Rasmus
+int
+main (int argc, char* argv[])
Is it on purpose that you write int main in two lines?
The style follows GNU Coding Standards.
http://www.gnu.org/prep/standards/html_node/Formatting.html#Formatting
(Personally I do not fancy the style at all, but it is a matter or
taste. Consistency is much more important.)
Post by Rasmus
+ TagLib::FileRef file (argv[1]);
+ if (file.isNull ()) return 1;
Should an helpful error/message be displayed here?
Yes, the original C-version seems to do that too.

Thanks,
Petteri
Yoni Rabkin
2015-10-19 20:38:10 UTC
Permalink
Post by Petteri Hintsanen
Post by Rasmus
+int
+main (int argc, char* argv[])
Is it on purpose that you write int main in two lines?
The style follows GNU Coding Standards.
http://www.gnu.org/prep/standards/html_node/Formatting.html#Formatting
(Personally I do not fancy the style at all, but it is a matter or
taste. Consistency is much more important.)
I would gladly deviate from the GNU Coding Standards here, especially
when the line is short.
--
"Cut your own wood and it will warm you twice"
Rasmus
2015-10-19 13:41:02 UTC
Permalink
Hi Petteri,
Post by Petteri Hintsanen
New function emms-browser-get-track-field-extended uses albumartist,
originalyear and originaldate tags for grouping tracks in the browser.
It can be assigned to emms-browser-get-track-field-function.
---
lisp/emms-browser.el | 56 +++++++++++++++++++++++++++++++++++++++++++++++++---
1 file changed, 53 insertions(+), 3 deletions(-)
diff --git a/lisp/emms-browser.el b/lisp/emms-browser.el
index 8a86bd2..1fc1182 100644
--- a/lisp/emms-browser.el
+++ b/lisp/emms-browser.el
@@ -1,6 +1,6 @@
;;; emms-browser.el --- a track browser supporting covers and filtering
-;; Copyright (C) 2006, 2007, 2008, 2009 Free Software Foundation, Inc.
+;; Copyright (C) 2006, 2007, 2008, 2009, 2015 Free Software Foundation, Inc.
;; Keywords: emms, mp3, mpeg, multimedia
@@ -419,6 +419,21 @@ Called once for each directory."
:group 'emms-browser
:type 'hook)
+(defcustom emms-browser-prefer-albumartist nil
+ "*Prefer albumartist tag.
+If non-nil, emms-browser-get-track-field-extended prefers
+albumartist tag over artist tag, if available."
+ :group 'emms-browser
+ :type 'boolean)
Please make this t. I'd rather call the next EMMS v5 than hold back
improvements.
Post by Petteri Hintsanen
+(defcustom emms-browser-prefer-originalyear nil
+ "*Prefer originalyear and originaldate tags.
+If non-nil, emms-browser-get-track-field-extended prefers
+originalyear and originaldate tags over year and date tags, if
+available."
+ :group 'emms-browser
+ :type 'boolean)
It’s not obvious that this should be off by default. Presumably, /if/ you
have this tag, it should be used as long as the normal year tag is used as
fallback .
Post by Petteri Hintsanen
+(defun emms-browser-get-track-field-extended (track type)
+ "Return TYPE from TRACK.
+This function uses 'info-albumartist, 'info-originalyear,
+'info-originaldate and 'info-date symbols, if available for
+TRACK.
+
+If TYPE is 'info-year, 'info-date and 'info-originaldate are
+preferred over 'info-year and 'info-originalyear symbols.
+
+If emms-browser-prefer-albumartist is t, info-albumartist is
+preferred over info-artist.
+
+If emms-browser-prefer-originalyear is t, info-originalyear is
+preferred over info-year."
IMO: This should be merged with emms-browser-get-track-field. As long as
the preferred type of year and artist can be set there’s no reason to have
two functions.
Post by Petteri Hintsanen
+ (cond ((eq type 'info-artist)
+ (or (when emms-browser-prefer-albumartist
+ (emms-track-get track 'info-albumartist))
+ (emms-track-get track 'info-artist "misc")))
+ ((eq type 'info-year)
+ (let ((date (or (when emms-browser-prefer-originalyear
+ (or (emms-track-get track 'info-originaldate)
+ (emms-track-get track 'info-originalyear)))
+ (emms-track-get track 'info-date)
+ (emms-track-get track 'info-year "misc"))))
+ (emms-browser-extract-year-from-date date)))
+ (t (emms-track-get track type "misc"))))
+(defun emms-browser-extract-year-from-date (date)
+ "Try to extract year part from DATE.
+Return DATE if the year cannot be extracted."
+ (or (nth 5 (parse-time-string date))
+ (when (string-match "^[ \t]*[0-9]\\{4\\}" date)
Is there any reason for limiting only look a fields starting with the
year? Can we trust that parse-time-string always catches arbitrary
formats? Alternatively you could look for just 4 consecutive numbers,
though this may lead to errors. As you prefer.
Post by Petteri Hintsanen
+ (substring date (match-beginning 0) (match-end 0)))
+ date))
+
(defun emms-browser-get-track-field-use-directory-name (track type)
(if (eq type 'info-artist)
(emms-browser-get-artist-from-path
@@ -809,8 +859,8 @@ return an empty string."
tracknum)))))
(defun emms-browser-disc-number (track)
- "Return a string representation of a track number.
-The string will end in a space. If no track number is available,
+ "Return a string representation of a disc number.
+The string will end in a space. If no disc number is available,
return an empty string."
(let ((discnum (emms-track-get track 'info-discnumber)))
(if (or (not (stringp discnum)) (string= discnum "0"))
This is a probably a separate bug fix commit.

Rasmus
--
And I faced endless streams of vendor-approved Ikea furniture. . .
Petteri Hintsanen
2015-10-19 20:37:46 UTC
Permalink
Post by Rasmus
Post by Petteri Hintsanen
+(defcustom emms-browser-prefer-albumartist nil
+ "*Prefer albumartist tag.
+If non-nil, emms-browser-get-track-field-extended prefers
+albumartist tag over artist tag, if available."
+ :group 'emms-browser
+ :type 'boolean)
Please make this t. I'd rather call the next EMMS v5 than hold back
improvements.
...
Post by Rasmus
Post by Petteri Hintsanen
+(defcustom emms-browser-prefer-originalyear nil
It’s not obvious that this should be off by default. Presumably, /if/ you
have this tag, it should be used as long as the normal year tag is used as
fallback .
OK, maybe both should be t by default. I'm usually very conservative
about the defaults. Backwards compatibility is valuable.
Post by Rasmus
Post by Petteri Hintsanen
+(defun emms-browser-get-track-field-extended (track type)
IMO: This should be merged with emms-browser-get-track-field. As long as
the preferred type of year and artist can be set there’s no reason to have
two functions.
emms-get-track-field is a wrapper that just funcalls
emms-browser-get-track-field-function. According to the docstring,
emms-browser-get-track-field-function is meant for "customizing the way
data is organized in the browser." As such I think that it is
appropriate to provide extended functionality via separate function,
hence emms-browser-get-track-field-extended. It needs to be documented
though.

First I was thinking about modifying emms-track-get directly to replace
year with originalyeal and artist with albumartist there (if prefer
variables are non-nil). But I think that it would be too invasive
change. (Compatibility worry again.)
Post by Rasmus
Post by Petteri Hintsanen
+(defun emms-browser-extract-year-from-date (date)
+ "Try to extract year part from DATE.
+Return DATE if the year cannot be extracted."
+ (or (nth 5 (parse-time-string date))
+ (when (string-match "^[ \t]*[0-9]\\{4\\}" date)
Is there any reason for limiting only look a fields starting with the
year? Can we trust that parse-time-string always catches arbitrary
formats? Alternatively you could look for just 4 consecutive numbers,
though this may lead to errors. As you prefer.
I believe your guess is as good as mine. I don't have any data for this.
Post by Rasmus
Post by Petteri Hintsanen
- "Return a string representation of a track number.
-The string will end in a space. If no track number is available,
+ "Return a string representation of a disc number.
+The string will end in a space. If no disc number is available,
This is a probably a separate bug fix commit.
Ouch, that got in there by mistake, sorry.

Thanks,
Petteri
Rasmus
2015-10-20 08:18:24 UTC
Permalink
Hi Petteri,
Post by Petteri Hintsanen
Post by Rasmus
Post by Petteri Hintsanen
+(defcustom emms-browser-prefer-albumartist nil
+ "*Prefer albumartist tag.
+If non-nil, emms-browser-get-track-field-extended prefers
+albumartist tag over artist tag, if available."
+ :group 'emms-browser
+ :type 'boolean)
Please make this t. I'd rather call the next EMMS v5 than hold back
improvements.
...
Post by Rasmus
Post by Petteri Hintsanen
+(defcustom emms-browser-prefer-originalyear nil
It’s not obvious that this should be off by default. Presumably, /if/ you
have this tag, it should be used as long as the normal year tag is used as
fallback .
OK, maybe both should be t by default. I'm usually very conservative
about the defaults. Backwards compatibility is valuable.
It is. But here you are adding a new feature that need not interfere. If
my audio does not have originalyear it’ll fall back on year anyway. Same
for albumartist.

For albumartist I feel strongly that it should be on by default, as albums
may be broken up between different artists otherwise. For originalyear my
gut-feeling is that it will be nil unless explicitly and willingly set.
In that case, there’s probably a desire to use it. I feel less strongly
about this.
Post by Petteri Hintsanen
Post by Rasmus
Post by Petteri Hintsanen
+(defun emms-browser-get-track-field-extended (track type)
IMO: This should be merged with emms-browser-get-track-field. As long as
the preferred type of year and artist can be set there’s no reason to have
two functions.
emms-get-track-field is a wrapper that just funcalls
emms-browser-get-track-field-function. According to the docstring,
emms-browser-get-track-field-function is meant for "customizing the
way data is organized in the browser." As such I think that it is
appropriate to provide extended functionality via separate function,
hence emms-browser-get-track-field-extended.
Thanks for the reminder. So I guess what I want is to change
emms-browser-get-track-field-function value.

What I would like to avoid is the need to set the {albumartist,
orginialyear} defcustoms in vain due to the wrong extractor function is
used. This is hard to archive without going against the spirit of the
emms-browser code.

I favor something that behaves like emms-browser-get-track-field-simple
when all defcustoms are off, but I fear it would add unnecessary
complexity.
Post by Petteri Hintsanen
It needs to be documented though.
Yes, and you also need to update the emms/NEWS file. One bullet per
change relevant to users.
Post by Petteri Hintsanen
First I was thinking about modifying emms-track-get directly to
replace year with originalyeal and artist with albumartist there (if
prefer variables are non-nil). But I think that it would be too
invasive change. (Compatibility worry again.)
Indeed. Changes should stay within emms-browser IMO.

Rasmus
--
When the facts change, I change my mind. What do you do, sir?
Yoni Rabkin
2015-10-20 14:42:33 UTC
Permalink
Post by Rasmus
Indeed. Changes should stay within emms-browser IMO.
This is important to me as well, unless there is a pressing need to
modify Emms core to suit a new feature.
--
"Cut your own wood and it will warm you twice"
Rasmus
2016-01-19 22:03:38 UTC
Permalink
Hi Petteri,
New program emms-print-taglib-metadata uses TagLib's C++ interface to
extract track information.
Any news the EMMS patch?

I ask because a new version of taglib is out, which officially supports
album artist. Incidentally it also broke the compiled version of my
version of emms-print-metadata.cpp, for which I have lost the source.

· If you plan to finish this, I will wait for you.
· If you have already signed over copyright I might try to change the
thing previously discussed and merge it, with your permission,
naturally.

Thanks,
Rasmus
--
El Rey ha muerto. ¡Larga vida al Rey!
Loading...