beets/beetsplug
Rebecca Turner a302b6d9c2 fromfilename: Don't crash if title is missing
Prevents this crash:

```
$ beet import ~/Music/Music/_/[1405]/00.mp3
Traceback (most recent call last):
  File "/nix/store/lfv9ns20hz2bg6d44js378vcxjfm9261-beets-2.3.1/bin/.beet-wrapped", line 9, in <module>
    sys.exit(main())
             ~~~~^^
  File "/nix/store/lfv9ns20hz2bg6d44js378vcxjfm9261-beets-2.3.1/lib/python3.13/site-packages/beets/ui/__init__.py", line 1859, in main
    _raw_main(args)
    ~~~~~~~~~^^^^^^
  File "/nix/store/lfv9ns20hz2bg6d44js378vcxjfm9261-beets-2.3.1/lib/python3.13/site-packages/beets/ui/__init__.py", line 1838, in _raw_main
    subcommand.func(lib, suboptions, subargs)
    ~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/nix/store/lfv9ns20hz2bg6d44js378vcxjfm9261-beets-2.3.1/lib/python3.13/site-packages/beets/ui/commands.py", line 1390, in import_func
    import_files(lib, byte_paths, query)
    ~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^
  File "/nix/store/lfv9ns20hz2bg6d44js378vcxjfm9261-beets-2.3.1/lib/python3.13/site-packages/beets/ui/commands.py", line 1330, in import_files
    session.run()
    ~~~~~~~~~~~^^
  File "/nix/store/lfv9ns20hz2bg6d44js378vcxjfm9261-beets-2.3.1/lib/python3.13/site-packages/beets/importer/session.py", line 234, in run
    pl.run_parallel(QUEUE_SIZE)
    ~~~~~~~~~~~~~~~^^^^^^^^^^^^
  File "/nix/store/lfv9ns20hz2bg6d44js378vcxjfm9261-beets-2.3.1/lib/python3.13/site-packages/beets/util/pipeline.py", line 471, in run_parallel
    raise exc_info[1].with_traceback(exc_info[2])
  File "/nix/store/lfv9ns20hz2bg6d44js378vcxjfm9261-beets-2.3.1/lib/python3.13/site-packages/beets/util/pipeline.py", line 336, in run
    out = self.coro.send(msg)
  File "/nix/store/lfv9ns20hz2bg6d44js378vcxjfm9261-beets-2.3.1/lib/python3.13/site-packages/beets/util/pipeline.py", line 219, in coro
    func(*(args + (task,)))
    ~~~~^^^^^^^^^^^^^^^^^^^
  File "/nix/store/lfv9ns20hz2bg6d44js378vcxjfm9261-beets-2.3.1/lib/python3.13/site-packages/beets/importer/stages.py", line 141, in lookup_candidates
    plugins.send("import_task_start", session=session, task=task)
    ~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/nix/store/lfv9ns20hz2bg6d44js378vcxjfm9261-beets-2.3.1/lib/python3.13/site-packages/beets/plugins.py", line 505, in send
    result = handler(**arguments)
  File "/nix/store/lfv9ns20hz2bg6d44js378vcxjfm9261-beets-2.3.1/lib/python3.13/site-packages/beets/plugins.py", line 200, in wrapper
    return func(*args, **kwargs)
  File "/nix/store/lfv9ns20hz2bg6d44js378vcxjfm9261-beets-2.3.1/lib/python3.13/site-packages/beetsplug/fromfilename.py", line 165, in filename_task
    apply_matches(d, self._log)
    ~~~~~~~~~~~~~^^^^^^^^^^^^^^
  File "/nix/store/lfv9ns20hz2bg6d44js378vcxjfm9261-beets-2.3.1/lib/python3.13/site-packages/beetsplug/fromfilename.py", line 124, in apply_matches
    item.title = str(d[item][title_field])
                     ~~~~~~~^^^^^^^^^^^^^
KeyError: 'title'
```
2025-09-18 14:57:48 +02:00
..
bpd Delegate attribute access to logging 2025-08-30 23:10:21 +01:00
lastgenre lastgenre: tree/whitelist: Remove experimental 2025-09-13 09:29:43 +02:00
metasync Replace logging f-strings with arguments 2025-08-30 23:10:21 +01:00
web Do not use explicit indices for logging args when not needed 2025-08-30 23:10:21 +01:00
_typing.py Resurrect translation functionality 2025-02-20 03:47:04 +00:00
absubmit.py Do not use backslashes to deal with long strings 2025-08-30 23:10:20 +01:00
acousticbrainz.py Delegate attribute access to logging 2025-08-30 23:10:21 +01:00
advancedrewrite.py refactor: convert _types from class attributes to cached properties 2025-07-16 14:45:25 +01:00
albumtypes.py Move musicbrainz to beetsplug directory 2025-05-16 19:56:50 +01:00
aura.py Replace string concatenation (' + ') 2025-08-30 23:10:15 +01:00
autobpm.py Fix plugin types 2025-07-16 14:06:34 +01:00
badfiles.py Delegate attribute access to logging 2025-08-30 23:10:21 +01:00
bareasc.py Do not assign args to query 2025-07-08 11:37:34 +01:00
beatport.py Do not use explicit indices for logging args when not needed 2025-08-30 23:10:21 +01:00
bench.py Remove no-op decargs 2025-07-08 11:37:33 +01:00
bpm.py Do not use explicit indices for logging args when not needed 2025-08-30 23:10:21 +01:00
bpsync.py Delegate attribute access to logging 2025-08-30 23:10:21 +01:00
bucket.py Replace string concatenation (' + ') 2025-08-30 23:10:15 +01:00
chroma.py Delegate attribute access to logging 2025-08-30 23:10:21 +01:00
convert.py Delegate attribute access to logging 2025-08-30 23:10:21 +01:00
deezer.py Limit search query results using request parameters 2025-09-01 04:36:54 +01:00
discogs.py Limit search query results using request parameters 2025-09-01 04:36:54 +01:00
duplicates.py Delegate attribute access to logging 2025-08-30 23:10:21 +01:00
edit.py Replace format calls with f-strings 2025-08-30 18:42:26 +01:00
embedart.py Replace logging f-strings with arguments 2025-08-30 23:10:21 +01:00
embyupdate.py Replace logging f-strings with arguments 2025-08-30 23:10:21 +01:00
export.py Do not use explicit indices for logging args when not needed 2025-08-30 23:10:21 +01:00
fetchart.py Delegate attribute access to logging 2025-08-30 23:10:21 +01:00
filefilter.py Reformat the codebase 2024-09-21 11:57:48 +01:00
fish.py Replace string concatenation (' + ') 2025-08-30 23:10:15 +01:00
freedesktop.py Reformat the codebase 2024-09-21 11:57:48 +01:00
fromfilename.py fromfilename: Don't crash if title is missing 2025-09-18 14:57:48 +02:00
ftintitle.py Delegate attribute access to logging 2025-08-30 23:10:21 +01:00
fuzzy.py Reformat the codebase 2024-09-21 11:57:48 +01:00
gmusic.py Apply formatting tools to all files 2023-10-22 09:53:18 +10:00
hook.py Delegate attribute access to logging 2025-08-30 23:10:21 +01:00
ihate.py Do not use explicit indices for logging args when not needed 2025-08-30 23:10:21 +01:00
importadded.py Delegate attribute access to logging 2025-08-30 23:10:21 +01:00
importfeeds.py Do not use explicit indices for logging args when not needed 2025-08-30 23:10:21 +01:00
info.py Do not use explicit indices for logging args when not needed 2025-08-30 23:10:21 +01:00
inline.py Do not use explicit indices for logging args when not needed 2025-08-30 23:10:21 +01:00
ipfs.py Delegate attribute access to logging 2025-08-30 23:10:21 +01:00
keyfinder.py Delegate attribute access to logging 2025-08-30 23:10:21 +01:00
kodiupdate.py Do not use explicit indices for logging args when not needed 2025-08-30 23:10:21 +01:00
lastimport.py Delegate attribute access to logging 2025-08-30 23:10:21 +01:00
limit.py Do not assign args to query 2025-07-08 11:37:34 +01:00
listenbrainz.py Removed data source as listenbrainz is not an metadata source plugin. 2025-09-04 17:41:12 +02:00
loadext.py Use only plugins/disabled_plugins config in plugin loading 2025-08-09 15:11:58 +01:00
lyrics.py lyrics: use another beatles song for Lyricsmode 2025-08-30 23:10:22 +01:00
mbcollection.py Do not use explicit indices for logging args when not needed 2025-08-30 23:10:21 +01:00
mbsubmit.py Replace logging f-strings with arguments 2025-08-30 23:10:21 +01:00
mbsync.py Renamed import in mbsync and missing plugins. 2025-07-15 15:03:14 +02:00
missing.py Delegate attribute access to logging 2025-08-30 23:10:21 +01:00
mpdstats.py Delegate attribute access to logging 2025-08-30 23:10:21 +01:00
mpdupdate.py Delegate attribute access to logging 2025-08-30 23:10:21 +01:00
musicbrainz.py Limit search query results using request parameters 2025-09-01 04:36:54 +01:00
parentwork.py Delegate attribute access to logging 2025-08-30 23:10:21 +01:00
permissions.py Apply formatting 2024-03-01 15:21:25 +10:00
play.py Replace string concatenation (' + ') 2025-08-30 23:10:15 +01:00
playlist.py Delegate attribute access to logging 2025-08-30 23:10:21 +01:00
plexupdate.py Replace string concatenation (' + ') 2025-08-30 23:10:15 +01:00
random.py Do not assign args to query 2025-07-08 11:37:34 +01:00
replace.py Feat: Add replace plugin (#5644) 2025-05-27 00:17:52 +02:00
replaygain.py Delegate attribute access to logging 2025-08-30 23:10:21 +01:00
rewrite.py Do not use explicit indices for logging args when not needed 2025-08-30 23:10:21 +01:00
scrub.py Delegate attribute access to logging 2025-08-30 23:10:21 +01:00
smartplaylist.py Do not use explicit indices for logging args when not needed 2025-08-30 23:10:21 +01:00
sonosupdate.py Apply formatting tools to all files 2023-10-22 09:53:18 +10:00
spotify.py Limit search query results using request parameters 2025-09-01 04:36:54 +01:00
subsonicplaylist.py Replace string concatenation (' + ') 2025-08-30 23:10:15 +01:00
subsonicupdate.py Delegate attribute access to logging 2025-08-30 23:10:21 +01:00
substitute.py Apply substitute rules in sequence 2024-10-16 16:36:36 +02:00
the.py Do not use explicit indices for logging args when not needed 2025-08-30 23:10:21 +01:00
thumbnails.py Delegate attribute access to logging 2025-08-30 23:10:21 +01:00
types.py Replace format calls with f-strings 2025-08-30 18:42:26 +01:00
unimported.py Replace string concatenation (' + ') 2025-08-30 23:10:15 +01:00
zero.py Do not use explicit indices for logging args when not needed 2025-08-30 23:10:21 +01:00