Provide a way to list the files inside an album directory while importing
- Dominant language
- Python
- Stars
- 15.7k
- Forks
- 2.1k
- Avg merge
- 4d 21h
- Merged PRs (30d)
- 31
Description
### Use case
I'm trying to use beets to import a really messy MP3 collection. Often there are no tags and files are not named correctly. And sometimes a directory will be full of "junk" mp3s and not really be an album.
### Solution
When you are importing a directory it might be full of random MP3s someone downloaded from kazaa 20 years ago and not necessarily an album. In this scenario, I generally want to skip it but the autotagger usually detects an album but it's not really clear if I should spend the "work" necessary to find the album ID manually.
Seeing a list of the files in the directory would help provide some guidance on how much work I should put into searching musicbrains/disogs for the album info.
For example, I hacked in the functionality in ui/commands.py like this and it really helps in certain situations.
```
def choose_match(self, task):
"""Given an initial autotagging of items, go through an interactive
dance with the user to ask for a choice of metadata. Returns an
AlbumMatch object, ASIS, or SKIP.
"""
# Show what we're tagging.
print_()
print_(displayable_path(task.paths, u'\n') +
u' ({0} items)'.format(len(task.items)))
for y in task.items:
ui.print_(ui.colorize('text_warning', u'\t[file] %s' % y.path.decode()))
```
And the output is as follows. In this particular situation there are a couple of different albums this could be, there are no embedded tags, but the filenames are actually the song titles. So seeing the file names helps confirm that the detected album is correct.
```
/media/drive1/mp3/hungary2013/Táncházasok Agócs-Kiss-Kontér/Ádám István -Icsán- és bandája (9 items)
[file] /media/drive1/mp3/hungary2013/Táncházasok Agócs-Kiss-Kontér/Ádám István -Icsán- és bandája/01. Zene és tánc (sűrű és ritka tempó).mp3
[file] /media/drive1/mp3/hungary2013/Táncházasok Agócs-Kiss-Kontér/Ádám István -Icsán- és bandája/02. Egy és a kettő (csárdás és magyar).mp3
[file] /media/drive1/mp3/hungary2013/Táncházasok Agócs-Kiss-Kontér/Ádám István -Icsán- és bandája/03. Le is szállnak, fel is szállnak a fecskék... (lassú, csárdás és magyar).mp3
[file] /media/drive1/mp3/hungary2013/Táncházasok Agócs-Kiss-Kontér/Ádám István -Icsán- és bandája/04. Járd ki lábam (verbunk, sűrű és ritka tempó).mp3
[file] /media/drive1/mp3/hungary2013/Táncházasok Agócs-Kiss-Kontér/Ádám István -Icsán- és bandája/05. Magyar.mp3
[file] /media/drive1/mp3/hungary2013/Táncházasok Agócs-Kiss-Kontér/Ádám István -Icsán- és bandája/06. Búza közé szállt a dalos pacsirta... )lassú).mp3
[file] /media/drive1/mp3/hungary2013/Táncházasok Agócs-Kiss-Kontér/Ádám István -Icsán- és bandája/07. Elmegyek, elmegyek... (lassú).mp3
[file] /media/drive1/mp3/hungary2013/Táncházasok Agócs-Kiss-Kontér/Ádám István -Icsán- és bandája/08. Lassú és csárdás.mp3
[file] /media/drive1/mp3/hungary2013/Táncházasok Agócs-Kiss-Kontér/Ádám István -Icsán- és bandája/09. Sohase vétettem... (lassú).mp3
Finding tags for album " - ".
Candidates:
1. Ádám István "Icsán" És Bandája És A Téka - Széki Népzene / Traditional Music From Szek, Transylvania (27.3%) (tracks, album, artist, ...) (Discogs, CD, 2000, Hungary, Fonó Records, FA-069-2)
2. Ádám István "Icsán" És Bandája És A Téka - Széki Népzene / Traditional Music From Szek, Transylvania (27.3%) (tracks, album, artist, ...) (Discogs, Cassette, 2000, Hungary, Fonó Records, FA-069-01)
3. Various Artists - Fonó Records 2000-2001 (25.5%) (tracks, missing tracks, album, ...) (Discogs, CD, 2000, Hungary, Fonó Records, FA-2000)
4. Ádám István "Icsán", Dobos Károly - Széki Lakodalom (22.3%) (tracks, missing tracks, album, ...) (Discogs, CD, 2014, Hungary, Hagyományok Háza, HH CD 07)
# selection (default 1), Skip, Use as-is, as Tracks, Group albums,
Enter search, enter Id, aBort, eDit, edit Candidates? 1
Correcting tags from:
(unknown album)
To:
Ádám István "Icsán" És Bandája És A Téka - Széki Népzene / Traditional Music From Szek, Transylvania
URL:
https://www.discogs.com/%C3%81d%C3%A1m-Istv%C3%A1n-Ics%C3%A1n-%C3%89s-Band%C3%A1ja-%C3%89s-A-T%C3%A9ka-Sz%C3%A9ki-N%C3%A9pzene-Traditional-Music-From-Szek-Transylva/release/8267940
(Similarity: 27.3%) (tracks, album, artist, source) (Discogs, CD, 2000, Hungary, Fonó Records, FA-069-2)
* Sáv 1 -> Zene És Tánc (Sűrű És Ritka Tempó) (title)
* Sáv 2 -> Egy És A Kettő (Csárdás És Magyar) (title)
* Sáv 3 -> Le Is Szállnak, Fel Is Szállnak A Fecskék (Lassú, Csárdás És Magyar) (title)
* Sáv 4 -> Járd Ki Babám (Verbunk, Sűrű És Ritka Tempó) (title)
* Sáv 5 -> Magyar (title)
* Sáv 6 -> Búza Közé Szállt A Dalos Pacsirta (Lassú) (title)
* Sáv 7 -> Elmegyek, Elmegyek (Lassú) (title)
* Sáv 8 -> Lassú És Csárdás (title)
* Sáv 9 -> Sohasem Vétettem (Lassú) (title)
Apply, More candidates, Skip, Use as-is, as Tracks, Group albums,
Enter search, enter Id, aBort, eDit, edit Candidates?
````
Contributor guide
Research direction
Start in ui/commands.py at choose_match and review the existing import prompt flow around the candidate list. Compare the issue's example output with the current behavior; done means an importing directory's files are shown clearly enough to help decide whether to continue, skip, or investigate the album.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- python
- Domain
- cli
- Issue type
- Feature
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100