Thank you for your donation!


Cloudsmith graciously provides open-source package management and distribution for our project.


Autoshuffle ?
#7
Aren't dependencies wonderful?

moOde depends on ashuffle and ashuffle depends on libmpdclient, each of which has its own developer(s). My guess is the developer of libmpdclient isn't going to respond to the request to "fix" the 4kb limit mentioned in issue #89 because the listallinfo command in question is marked in the protocol documentation as "do not use this command"!

Since ashuffle is what we have to work with, it seems the only alternative is to look for offending tracks as you have been doing and edit them to fit. Bletch.

I haven't tried to code-walk ashuffle and libmpdclient. I don't know if the 4kb limit applies to any single metadata tag of a track as output by mpd or to the sum of the track's metadata tags. This matters because there can be many tags and, in particular, more than one comment tag to a track in ID3v2 and in Vorbis Comment tagging schemes. The reason comment tags are suspect is they tend to be much longer than any other metadata. [1]

Here's a trivial command which borrows on hindumagic's awk script. It finds the longest comment line returned by mpc.

Code:
pi@moode:~ $ mpc list comment | awk '{print length, $0}'|sort -nr|head -1
1397 Archie Goodwin is a fictional character, a detective in Rex Stout's mysteries about Nero Wolfe. Archie is Wolfe's live-in employee and partner in the private investigation business Wolfe runs out of his brownstone townhouse in New York City. Wolfe rarely leaves the house, so Archie has to do most of the actual investigating and then reports his findings to Wolfe, who solves the mystery. It is not difficult for Archie to make either written or oral reports, because he has total recall of what he has heard, and he is an excellent typist. He also does Wolfe's bookkeeping and banking, types his correspondence, and keeps the germination and other records for the orchids Wolfe raises as a hobby. Archie's hobbies include dancing (usually at the Flamingo), poker, and baseball. He was a fan of the New York Giants until they relocated to San Francisco in 1957, then later became a fan of the New York Mets when that team was founded in 1962.  Although he is from the American Midwest (Chillicothe, Ohio), Archie has the "street smarts" to handle just about any situation he finds himself in, and he knows New York City like the back of his hand. He has a long-time social relationship with Lily Rowan, a wealthy society woman, but they do not try to limit each other's social lives.    Unlike his employer, Archie's only eccentricity is a deep love of milk.      Old Time Radio Researchers Group

Here, the longest comment tag returned from my test track collection is 1397 characters and happens to be for an Old Time Radio track I had downloaded from archive.org. More work needs to be done to the script to identify the track in question as well as to return the total length of all the metadata for the track. I need my morning coffee before I can figure out how to add that info. Rolleyes

Regards,
Kent

[1] Note I'm using the word "tag" the way mpd documentation does, to refer to an individual metadata element. In most tagging protocol schemes, on the other hand, the "tag" is the container of metadata elements associated with a track. By analogy, my shirt has a tag in the collar which states the neck size, the sleeve length, and the material. In the mpd way of thinking "neck size", "sleeve length", and "material" would each be a tag. Different strokes for different folks, I guess.
Reply


Messages In This Thread
Autoshuffle ? - by Mattt - 09-10-2021, 01:22 AM
RE: Autoshuffle ? - by Tim Curtis - 09-10-2021, 01:52 AM
RE: Autoshuffle ? - by Mattt - 09-10-2021, 02:40 AM
RE: Autoshuffle ? - by Mattt - 09-15-2021, 01:18 AM
RE: Autoshuffle ? - by TheOldPresbyope - 09-15-2021, 02:29 AM
RE: Autoshuffle ? - by Mattt - 09-15-2021, 05:34 AM
RE: Autoshuffle ? - by TheOldPresbyope - 09-15-2021, 12:46 PM

Forum Jump: