avoid error on missing albumartist and mb_albumartistid - #14
Conversation
…albumartist and mb_albumartistid tests in order to avoid an error.
|
Thanks for catching this oversight. I went with a slightly different fix -- looking for the first non-None item rather than skipping altogether when the first item is None -- but your change pointed me right to the problem. (There's a test in the above commit as well.) |
|
OK, cool -- I'm glad to help out. Thanks for beets, and for making a -s. On Fri, Dec 16, 2011 at 04:47:36PM -0800, Adrian Sampson wrote:
Scott Hepler |
Fixes #6601 Added `import contextvars` and changed `_extend_pipeline` to capture the current context and run the inner pipeline within it to ensure the `music_dir` context variable is available when the inner pipeline resolves paths, preventing the relative-path bug that caused could not get filesize errors and removing 0 old duplicated items during merge. Works perfectly after the fix: ```bash arsaboo@arsmusic:~$ beet import -m -I -t ~/shared/music/ --set genre="Filmi" --search-id 7MwKD3kEFMov4LQqyhnmzL /home/arsaboo/shared/music (1 items) Match (75.2%): King - Lukkhe ≠ artist, tracks Spotify, None, 2026, None, Warner Music India, None, None https://open.spotify.com/album/7MwKD3kEFMov4LQqyhnmzL ≠ Artist: King; OAFF; Savera; Sunny M.R. -> King * Album: Lukkhe ≠ (#2) Khamoshiyaan (3:03) -> (#2) Khamoshiyaan (feat. Romy & Manreet Khara) (3:03) Missing tracks (13/14 - 92.9%): ! Bulletproof (#1) (3:09) ! Jee Lenge (#3) (3:25) ! Headshot (#4) (3:10) ! Ruh Teri (feat. Manreet Khara & Agrim Joshi) (#5) (2:31) ! Roobaroo (#6) (3:17) ! Savere (#7) (2:29) ! Haal (#8) (3:29) ! Haal (The Journey) (#9) (6:13) ! Nachdi Shaam (#10) (2:22) ! Hoga Bada Mera Naam (#11) (1:58) ! All Eyes On Us (#12) (3:13) ! Swan Song (Hoya Azaad) (#13) (3:17) ! Bhaari Pangey (#14) (2:19) ➜ [A]pply, More candidates, Skip, Use as-is, as Tracks, Group albums, Enter search, enter Id, aBort, eDit, edit Candidates, Print tracks, Open files with Picard? a This album is already in the library! Old: 3 items, MP3, 320kbps, 9:45, 22.9 MiB New: 1 items, MP3, 320kbps, 3:03, 7.8 MiB ➜ [S]kip new, Keep all, Remove old, Merge all? m /home/arsaboo/shared/music /data/music/Hindi Music/L/Lukkhe [30718] (2026)/Lukkhe (2026) - Bulletproof.mp3 /data/music/Hindi Music/L/Lukkhe [30718] (2026)/Lukkhe (2026) - Headshot.mp3 /data/music/Hindi Music/L/Lukkhe [30718] (2026)/Lukkhe (2026) - Jee Lenge.mp3 (4 items) Match (82.6%): King - Lukkhe ≠ artist, tracks Spotify, None, 2026, None, Warner Music India, None, None https://open.spotify.com/album/7MwKD3kEFMov4LQqyhnmzL ≠ Artist: OAFF; Savera; Ruaa Kayy; Romy; Manreet Khara -> King * Album: Lukkhe * (#1) Bulletproof (3:09) ≠ (#2) Khamoshiyaan (3:03) -> (#2) Khamoshiyaan (feat. Romy & Manreet Khara) (3:03) * (#3) Jee Lenge (3:25) * (#4) Headshot (3:10) Missing tracks (10/14 - 71.4%): ! Ruh Teri (feat. Manreet Khara & Agrim Joshi) (#5) (2:31) ! Roobaroo (#6) (3:17) ! Savere (#7) (2:29) ! Haal (#8) (3:29) ! Haal (The Journey) (#9) (6:13) ! Nachdi Shaam (#10) (2:22) ! Hoga Bada Mera Naam (#11) (1:58) ! All Eyes On Us (#12) (3:13) ! Swan Song (Hoya Azaad) (#13) (3:17) ! Bhaari Pangey (#14) (2:19) ➜ [A]pply, More candidates, Skip, Use as-is, as Tracks, Group albums, Enter search, enter Id, aBort, eDit, edit Candidates, Print tracks, Open files with Picard? a ```
Make sure task.items[0] is set before checking attribs