Terminal filled with warnings
hi, I've just switched to clerk v4 and the new interface looks great. Thanks. I used the AUR package to install clerk.
However, when I start clerk in "album" or "sorted album" views, my terminal is filled with the following message:
Use of uninitialized value in join or string at /usr/bin/clerk line 368, <GEN0> line 29.
yeah i should make those proper warnings. it simply means you have files with missing tags. In this case Albumartist, Date or Album.
You can find out which files by using this script:
#!/usr/bin/env python3
from mpd import MPDClient
import os
client = MPDClient()
mpd_host = 'localhost'
mpd_port = '6600'
mpd_pass = ''
if 'MPD_HOST' in os.environ:
mpd_connection = os.environ['MPD_HOST'].split('@')
if len(mpd_connection) == 1:
mpd_host = mpd_connection[0]
elif len(mpd_connection) == 2:
mpd_host = mpd_connection[1]
mpd_pass = mpd_connection[0]
else:
print('Unable to parse MPD_HOST, using defaults')
if 'MPD_PORT' in os.environ:
mpd_port = os.environ['MPD_PORT']
client.connect(mpd_host, mpd_port)
if mpd_pass:
client.password(mpd_pass)
search=input("Which tag to search for? > ")
tagpool=client.search('filename', '')
for tag in tagpool:
newpool=[]
if 'directory' not in tag:
if search not in tag:
newpool.append(tag)
for entry in newpool:
if 'file' in entry:
print(entry['file'])
Simply run it and type "albumartist" It then will show all files that are missing those tags. Do the same for "date" and "album".
Script needs python-mpd2, which is in arch repositories.
Thank you for this helpful script. I'm slowly fixing the missing tags. I'll report back once my library is fixed but it's going to take a while.
I just want to confirm that filling the missing "albumartist", "album" and "date" tags fix my issue.