nguillaumin: This is the first time I do something in Python, so let me know if I did anything wrong, thanks!
diff --git a/beets/autotag/mb.py b/beets/autotag/mb.py
index 5c484d2b3..b5ed4f358 100644
--- a/beets/autotag/mb.py
+++ b/beets/autotag/mb.py
@@ -36,6 +36,9 @@ if util.SNI_SUPPORTED:
 else:
     BASE_URL = 'http://musicbrainz.org/'
 
+NON_AUDIO_FORMATS = ['Data CD', 'DVD', 'DVD-Video', 'Blu-ray', 'HD-DVD', 'VCD',
+                     'SVCD', 'UMD', 'VHS']
+
 musicbrainzngs.set_useragent('beets', beets.__version__,
                              'http://beets.io/')
 
@@ -275,6 +278,9 @@ def album_info(release):
         disctitle = medium.get('title')
         format = medium.get('format')
 
+        if format in NON_AUDIO_FORMATS:
+            continue
+
         all_tracks = medium['track-list']
         if 'pregap' in medium:
             all_tracks.insert(0, medium['pregap'])
diff --git a/docs/changelog.rst b/docs/changelog.rst
index bd084a890..2a7349d65 100644
--- a/docs/changelog.rst
+++ b/docs/changelog.rst
@@ -6,6 +6,9 @@ Changelog
 
 Changelog goes here!
 
+Fixes:
+* Non-audio media (DVD-Video, etc.) are now skipped by the autotagger. :bug:`2688`
+
 
 1.4.6 (December 21, 2017)
 -------------------------

Don't try to match non-audio media fetched from MusicBrainz
Matching a folder containing all audio files of a MB release made of CD+DVD for instance fails since beets does take into account also the video files.
For instance (1 CD+ 1DVD):
https://musicbrainz.org/release/2775743e-2d9c-4b7f-9baa-1d24dc44c769
https://musicbrainz.org/release/f457c3e1-0d98-4904-9d9e-a085bc5b232b
I imagine the same happens for enhanced CDs with some additional video track.
In general I think the right thing to do is that all media files that are marked as video in MB should not be considered for matching. After all beets currently only deals with audio files.
diff --git a/test/test_mb.py b/test/test_mb.py
index ca1bf2a1a..9c51d0fe3 100644
--- a/test/test_mb.py
+++ b/test/test_mb.py
@@ -27,7 +27,7 @@ import mock
 
 class MBAlbumInfoTest(_common.TestCase):
     def _make_release(self, date_str='2009', tracks=None, track_length=None,
-                      track_artist=False):
+                      track_artist=False, medium_format='FORMAT'):
         release = {
             'title': 'ALBUM TITLE',
             'id': 'ALBUM ID',
@@ -90,7 +90,7 @@ class MBAlbumInfoTest(_common.TestCase):
             release['medium-list'].append({
                 'position': '1',
                 'track-list': track_list,
-                'format': 'FORMAT',
+                'format': medium_format,
                 'title': 'MEDIUM TITLE',
             })
         return release
@@ -324,6 +324,27 @@ class MBAlbumInfoTest(_common.TestCase):
         d = mb.album_info(release)
         self.assertEqual(d.data_source, 'MusicBrainz')
 
+    def test_skip_non_audio_dvd(self):
+        tracks = [self._make_track('TITLE ONE', 'ID ONE', 100.0 * 1000.0),
+                  self._make_track('TITLE TWO', 'ID TWO', 200.0 * 1000.0)]
+        release = self._make_release(tracks=tracks, medium_format="DVD")
+        d = mb.album_info(release)
+        self.assertEqual(len(d.tracks), 0)
+
+    def test_skip_non_audio_dvd_video(self):
+        tracks = [self._make_track('TITLE ONE', 'ID ONE', 100.0 * 1000.0),
+                  self._make_track('TITLE TWO', 'ID TWO', 200.0 * 1000.0)]
+        release = self._make_release(tracks=tracks, medium_format="DVD-Video")
+        d = mb.album_info(release)
+        self.assertEqual(len(d.tracks), 0)
+
+    def test_no_skip_dvd_audio(self):
+        tracks = [self._make_track('TITLE ONE', 'ID ONE', 100.0 * 1000.0),
+                  self._make_track('TITLE TWO', 'ID TWO', 200.0 * 1000.0)]
+        release = self._make_release(tracks=tracks, medium_format="DVD-Audio")
+        d = mb.album_info(release)
+        self.assertEqual(len(d.tracks), 2)
+
 
 class ParseIDTest(_common.TestCase):
     def test_parse_id_correct(self):

pip install -e .[dev]
parse_log_pytest
requirements.txt
pytest responses mock pylast rarfile pyxdg python-mpd2 discogs-client
apt-get update apt-get install -y gcc
3.9
requirements/base.txt
pytest --no-header -rA --tb=line --color=no -p no:cacheprovider -W ignore::DeprecationWarning
anyio==4.9.0
-e git+https://github.com/beetbox/beets.git@721fedd7b9050ff0b6f17c33bdf00ea638484a03#egg=beets
certifi==2025.1.31
charset-normalizer==3.4.1
discogs-client==2.3.0
exceptiongroup==1.2.2
h11==0.14.0
httpcore==1.0.7
httpx==0.28.1
idna==3.10
iniconfig==2.1.0
jellyfish==1.2.0
mock==5.2.0
munkres==1.1.4
musicbrainzngs==0.7.1
mutagen==1.47.0
oauthlib==3.2.2
packaging==24.2
pluggy==1.5.0
pylast==5.5.0
pytest==8.3.5
python-mpd2==3.1.1
pyxdg==0.28
PyYAML==6.0.2
rarfile==4.2
requests==2.32.3
responses==0.25.7
six==1.17.0
sniffio==1.3.1
tomli==2.2.1
typing_extensions==4.13.0
Unidecode==1.3.8
urllib3==2.3.0

name: beets
channels:
  - defaults
  - https://repo.anaconda.com/pkgs/main
  - https://repo.anaconda.com/pkgs/r
  - conda-forge
dependencies:
  - _libgcc_mutex=0.1=main
  - _openmp_mutex=5.1=1_gnu
  - ca-certificates=2025.2.25=h06a4308_0
  - ld_impl_linux-64=2.40=h12ee557_0
  - libffi=3.4.4=h6a678d5_1
  - libgcc-ng=11.2.0=h1234567_1
  - libgomp=11.2.0=h1234567_1
  - libstdcxx-ng=11.2.0=h1234567_1
  - ncurses=6.4=h6a678d5_0
  - openssl=3.0.16=h5eee18b_0
  - pip=25.0=py39h06a4308_0
  - python=3.9.21=he870216_1
  - readline=8.2=h5eee18b_0
  - setuptools=75.8.0=py39h06a4308_0
  - sqlite=3.45.3=h5eee18b_0
  - tk=8.6.14=h39e8969_0
  - tzdata=2025a=h04d1e81_0
  - wheel=0.45.1=py39h06a4308_0
  - xz=5.6.4=h5eee18b_1
  - zlib=1.2.13=h5eee18b_1
  - pip:
      - anyio==4.9.0
      - certifi==2025.1.31
      - charset-normalizer==3.4.1
      - discogs-client==2.3.0
      - exceptiongroup==1.2.2
      - h11==0.14.0
      - httpcore==1.0.7
      - httpx==0.28.1
      - idna==3.10
      - iniconfig==2.1.0
      - jellyfish==1.2.0
      - mock==5.2.0
      - munkres==1.1.4
      - musicbrainzngs==0.7.1
      - mutagen==1.47.0
      - oauthlib==3.2.2
      - packaging==24.2
      - pluggy==1.5.0
      - pylast==5.5.0
      - pytest==8.3.5
      - python-mpd2==3.1.1
      - pyxdg==0.28
      - pyyaml==6.0.2
      - rarfile==4.2
      - requests==2.32.3
      - responses==0.25.7
      - six==1.17.0
      - sniffio==1.3.1
      - tomli==2.2.1
      - typing-extensions==4.13.0
      - unidecode==1.3.8
      - urllib3==2.3.0
prefix: /opt/conda/envs/beets

test/test_mb.py::MBAlbumInfoTest::test_skip_non_audio_dvd test/test_mb.py::MBAlbumInfoTest::test_skip_non_audio_dvd_video
test/test_mb.py::MBAlbumInfoTest::test_data_source test/test_mb.py::MBAlbumInfoTest::test_detect_various_artists test/test_mb.py::MBAlbumInfoTest::test_missing_language test/test_mb.py::MBAlbumInfoTest::test_no_durations test/test_mb.py::MBAlbumInfoTest::test_no_release_date test/test_mb.py::MBAlbumInfoTest::test_no_skip_dvd_audio test/test_mb.py::MBAlbumInfoTest::test_parse_artist_sort_name test/test_mb.py::MBAlbumInfoTest::test_parse_asin test/test_mb.py::MBAlbumInfoTest::test_parse_catalognum test/test_mb.py::MBAlbumInfoTest::test_parse_country test/test_mb.py::MBAlbumInfoTest::test_parse_disambig test/test_mb.py::MBAlbumInfoTest::test_parse_disctitle test/test_mb.py::MBAlbumInfoTest::test_parse_media test/test_mb.py::MBAlbumInfoTest::test_parse_medium_numbers_single_medium test/test_mb.py::MBAlbumInfoTest::test_parse_medium_numbers_two_mediums test/test_mb.py::MBAlbumInfoTest::test_parse_recording_artist test/test_mb.py::MBAlbumInfoTest::test_parse_release_full_date test/test_mb.py::MBAlbumInfoTest::test_parse_release_type test/test_mb.py::MBAlbumInfoTest::test_parse_release_with_year test/test_mb.py::MBAlbumInfoTest::test_parse_release_year_month_only test/test_mb.py::MBAlbumInfoTest::test_parse_releasegroupid test/test_mb.py::MBAlbumInfoTest::test_parse_status test/test_mb.py::MBAlbumInfoTest::test_parse_textrepr test/test_mb.py::MBAlbumInfoTest::test_parse_track_indices test/test_mb.py::MBAlbumInfoTest::test_parse_tracks test/test_mb.py::MBAlbumInfoTest::test_track_artist_overrides_recording_artist test/test_mb.py::MBAlbumInfoTest::test_track_length_overrides_recording_length test/test_mb.py::MBAlbumInfoTest::test_various_artists_defaults_false test/test_mb.py::ParseIDTest::test_parse_id_correct test/test_mb.py::ParseIDTest::test_parse_id_non_id_returns_none test/test_mb.py::ParseIDTest::test_parse_id_url_finds_id test/test_mb.py::ArtistFlatteningTest::test_alias test/test_mb.py::ArtistFlatteningTest::test_single_artist test/test_mb.py::ArtistFlatteningTest::test_two_artists test/test_mb.py::MBLibraryTest::test_match_album test/test_mb.py::MBLibraryTest::test_match_album_empty test/test_mb.py::MBLibraryTest::test_match_track test/test_mb.py::MBLibraryTest::test_match_track_empty
docs/changelog.rst beets/autotag/mb.py
docs/changelog.rst beets/autotag/mb.py