Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Terminal filled with warnings #34

Open
nicodebo opened this issue Nov 27, 2017 · 3 comments
Open

Terminal filled with warnings #34

nicodebo opened this issue Nov 27, 2017 · 3 comments

Comments

@nicodebo
Copy link
Contributor

nicodebo commented Nov 27, 2017

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.

@nicodebo nicodebo changed the title Terminal filled with warning Terminal filled with warnings Nov 27, 2017
@carnager
Copy link
Owner

carnager commented Nov 27, 2017

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.

@nicodebo
Copy link
Contributor Author

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.

@nicodebo
Copy link
Contributor Author

I just want to confirm that filling the missing "albumartist", "album" and "date" tags fix my issue.

nicodebo added a commit to nicodebo/dotfiles that referenced this issue Apr 22, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants