emms-help
[Top][All Lists]
Advanced

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

emms-info-functions tested, and more data to the tag editor topic


From: Titus Müller
Subject: emms-info-functions tested, and more data to the tag editor topic
Date: Thu, 21 Dec 2023 20:29:35 +0100
User-agent: mu4e 1.10.6; emacs 29.1

That's a very good step by step instruction. Thank you for taking the time to 
write it and for getting into the shoes of a non-programmer and explaining 
everything so well!

It works wonderfully. Evaluating the variable emms-info-functions, resetting 
the cache, loading mp3s in the emms browser. (One has to kill the emms browser 
before that, not just bury it and call it again up front, so that it is really 
empty.)

Now, what I found out, is: Setting emms-info-functions just to 
'(emms-info-native) works fine, also '(emms-info-mp3info emms-info-native) 
works. But if I change the order of the two and use '(emms-info-native 
emms-info-mp3info), it produces the problematic data: all titles cut down to 
max 30 characters, strange numbers instead of Umlaut characters.

As to the other concern I wrote about a few days ago, the "deleting" of the 
other tags by the emms tag editor, I looked closer into it. The deleted ones 
are the id3v2-tags. Here is a case example, maybe it is of use.

The first one is before editing and submitting a change in emms tag editor, the 
other one after the edit and submit. Both info dumps are from id3v2, called in 
the terminal via:

id3v2 -l 02\ -\ Jake\ Enters\ His\ Avatar\ World.mp3


Before emms tag editor submit:

Title  : Jake Enters His Avatar World    Artist: James Horner                  
Album  : Avatar                          Year: 2009, Genre: Unknown (255)
Comment: Amazon.com Song ID: 21389757    Track: 2
id3v2 tag info for 02 - Jake Enters His Avatar World.mp3:
TIT2 (Title/songname/content description): Jake Enters His Avatar World
TCON (Content type): Soundtracks (255)
TPE3 (Conductor/performer refinement): James Horner
TRCK (Track number/Position in set): 2/15
TYER (Year): 2009
TPE2 (Band/orchestra/accompaniment): James Horner
TCOP (Copyright message): 2009 Motion Picture Artwork, Photos and Fox 
Trademarks and Logos TM and 2009 Twentieth Century Fox Film Corporation.  All 
Rights Reserved.
TPOS (Part of a set): 1/1
APIC (Attached picture): ()[, 3]: image/jpeg, 31297 bytes
PRIV (Private frame):  (unimplemented)
PRIV (Private frame):  (unimplemented)
TALB (Album/Movie/Show title): Avatar
TCOM (Composer): 
TPE1 (Lead performer(s)/Soloist(s)): James Horner
COMM (Comments): (ID3v1 Comment)[XXX]: Amazon.com Song ID: 21389757
COMM (Comments): ()[XXX]: ruhig


After Before emms tag editor submit:

id3v1 tag info for 02 - Jake Enters His Avatar World.mp3:
Title  : Jake Enters His Avatar World    Artist: James Horner                  
Album  : Avatar                          Year: 2009, Genre: Unknown (255)
Comment:                                 Track: 2
02 - Jake Enters His Avatar World.mp3: No ID3v2 tag


It's really no big deal. I do not need the Amazon.com Song ID, and that the 
Genre is "Unknown" in id3v1 and "Soundtracks" in id3v2, well, that's easy to 
get over. I wouldn't even have bothered to check via id3v2 -l if the listing in 
CMUS hadn't changed. Seems like CMUS doesn't use the "Track" field, but the 
"TRCK (Track number/Position in set)" field instead, and thinks "2" is 
something that comes before "1/15", "2/15", "3/15", "4/15" and so on.

So I think there is no change needed, except that I would need to edit all 
songs of an album and submit the change via emms tag editor, so they are in the 
same order also in CMUS.

What is kind of strange, though: Even in the tag editor itself, when I take the 
original MP3 file and change, say, James Horner into James H., and do nothing 
else and just submit, the info-note is emptied.

So, originally it looks like this:

James Horner - Jake Enters His Avatar World
name             = /home/titus/Musik/Filmmusik/Avatar/02 - Jake Enters His 
Avatar World.mp3
info-artist      = James Horner
info-albumartist = James Horner
info-composer    = 
info-performer   = 
info-title       = Jake Enters His Avatar World
info-album       = Avatar
info-tracknumber = 2/15
info-year        = 2009
info-genre       = Soundtracks
info-note        = Amazon.com Song ID: 21389757

And after editing info-artist, submitting the change, and exiting the tag 
editor and opening it again, it looks like this (see info-note):

Titus Horner - Jake Enters His Avatar World
name             = /home/titus/Musik/Filmmusik/Avatar/02 - Jake Enters His 
Avatar World.mp3
info-artist      = James H.
info-albumartist = James Horner
info-composer    = 
info-performer   = 
info-title       = Jake Enters His Avatar World
info-album       = Avatar
info-tracknumber = 2/15
info-year        = 2009
info-genre       = Soundtracks
info-note        = 

A very long mail, I'm sorry. But great that the importing of my music data now 
works that well! And I'm sure the tag editor will also become a perfectly 
running killer feature of EMMS.

Merry christmas, everyone!

----- Ursprüngliche Nachricht vom 21.12.2023 -----
> Titus Müller <mail@titusmueller.de> writes:
>
>> You also have a very long title, in my music collection, EMMS cut all
>> titles short to exactly 30 characters until this afternoon (as well in
>> the tag editor, shown as info-title, as well as in the playlists), and
>> Umlaut ä was shown as Slash 344, Umlaut ö as Slash 366, Umlaut ü as
>> Slash 374.
>>
>> I tried a little and read again in your very good EMMS manual. Then I
>> found the reason. I thought it must have to do with data import, so I
>> double-checked that and found out I was missing the line
>>
>> (require 'emms-info-mp3info)
>>
>> Also, I changed my line 
>>
>> (setq emms-info-functions '(emms-info-native emms-info-mp3info))
>>
>> to what you have in the manual
>>
>> (add-to-list 'emms-info-functions 'emms-info-mp3info)
>>
>> To see wether the files are imported better now, I needed to empty the
>> database. And I couldn't find a command to do so (emms-cache-reset did
>> something else), so I went into the emms-directory and deleted the
>> file with a strange name. Now the database was gone, and I could
>> import the music files anew, and there they are: all Umlaut letters
>> correct, the titles long and not cut anymore.
>>
>> So my "bugs" where just caused by stupidity on my side, I think.
>>
>> I'm embarrassed. I'm very sorry I stole your time.
>
> Actually, not at all a waste of time. What you are doing is
> valuable.
>
> What is suggested to be the case above is that emms-info-native and
> emms-info-mp3info are handling your files differently.
>
> Here is a bit of detail which may help you zero in on these issues. This
> may be of use to other people wanting to debug similar issues, so don't
> worry if this isn't what you are looking to get into because others may
> find it useful.
>
> The function `emms-cache-reset' does two things. First it resets the
> in-memory cache, which is a hash-table stored in the variable
> `emms-cache-db'. Second, it writes that hash-table to disk. Typically to
> the file ~/.emacs.d/emms/cache. Thus, it "synchronizes" between the
> in-memory cache (works quickly while Emacs is running) and the on-disk
> cache (slower, but persists between Emacs sessions.)
>
> If you only delete the file ~/.emacs.d/emms/cache and do not restart
> Emacs, then the in-memory hash-table `emms-cache-db' will remain intact
> until a function is called to syncronize between the two.
>
> To check if the culprit of bad info is a specific info-method, I would
> do the following:
>
> 0. Learn enough about Emacs Lisp to evaluate variables and how `setq'
> works. The Emacs info manual has a lot of useful information in the
> chapter titled: "28.9 Evaluating Emacs Lisp Expressions".
>
> 1. Invoke emms-cache-reset. Alternatively, shut Emacs down, delete
> ~/.emacs.d/emms/cache, and restart Emacs. You can check that the cache
> is indeed empty by evaluating the variable `emms-cache-db'.
>
> If it's empty it will evaluate to something like: "#s(hash-table size 65
> test string-hash rehash-size 1.5 rehash-threshold 0.8125 data ())". If
> it's full it will evaluate to something big and full of track names and
> info.
>
> Now you have a clean and empty cache. You now have a clean-slate to test
> things from.
>
> 2. Set the variable `emms-info-functions' to the info method you want to
> test. For instance, if you have the exiftool binary installed on your
> system, then evaluate: (setq emms-info-functions '(emms-info-exiftool))
>
> You can then check that you've set the exiftool backend to be your
> chosen backend by evaluating the variable emms-info-functions. If you
> did the above correctly, it will evaluate to "(emms-info-exiftool)".
>
> You could use the exact same technique to set the native backend as the
> info backend of choice; just replace "exiftool" with "native" above.
>
> 3. Invoke `emms-add-directory-tree' or similar. This will cause the
> cache to populate. You can check that it did by evaluating the variable
> `emms-cache-db', as above.
>
> 4. Have a look at the results in the playlist and/or browser.
>
> 5. Rinse and repeat until you figure out which info methods are working
> and which do not. Definitely report those which aren't working!
>
> Hope this is of some help. If anyone sees that I've made mistakes in the
> above or have additional helpful tips, then please chime in.
>
>
>> ----- Ursprüngliche Nachricht vom 18.12.2023 -----
>>> Titus Müller <mail@titusmueller.de> writes:
>>>
>>>> (2) Since I am German, some MP3s have Umlaut-Letters in their
>>>> title. "Nun ruhen alle Wälder" is shown in the playlist and the
>>>> browser with a slash followed by the number 344 instead of the ä Laut,
>>>> and in the tag editor it is correct in the name-field, but broken
>>>> (344) in the info-title field.
>>>
>>> I have a lot of similar tracks. For example, the following displays
>>> correctly for me in the playlist, tag editor, and browser:
>>>
>>>     Johann Sebastian Bach - Cantata, BWV 211 "Schweigt stille, plaudert
>>>     nicht": V. Rezitativo (Schlendrian, Liesgen): "Wenn du mir nicht den
>>>     Coffee läßt" - Secular Cantatas, BWV 211 & 212: Schweigt stille,
>>>     plaudert nicht (Kaffee-Kantate) / Mehr hahn en neue Oberkeet
>>>     (Bauernkantate)
>>>
>>> There may be something else going on outside of Emms here.
>>




reply via email to

[Prev in Thread] Current Thread [Next in Thread]