Upper case and Lower case for filename / Bug report

I found a bug in anki desktop.

Tools menu > check media , when media was checked there are two kind of files :
Type 1) The following files are referenced by cards, but were not found in the media folder.

Type 2)The following files were found in the media folder, but do not appear to be used on any cards.

so lets check the files.
Type 1 Files:
So anki is telling me there are alot of files missing .
lets search two files for example: first August.mp3 and second glove.mp3
As a new member i allowed to upload just one picture. i combine all pictures to one , so you can see picture below.
As you saw , all the files mentioned by anki is exists in database folder.

so time’s to check Type 2 Files :
So anki is telling me there are alot of files unused.
lets search two files for example: first Friends-S01E02 (100).JPG and second Friends-S01E02 (101).JPG
As you saw , all the files mentioned by anki is used in the cards.

So what happens if i delete the files that anki calls unused or missing.
something awful happens , this media will be delete from my cards and i can’t see the media.
the issue happens for *.mp3 and *.jpg and *.png in the two types files that i already mentioned.
so i called a bug. i hope it will be fixed.

i represented the bug 11 months ago for ankidroid , link’s below :

Debug info:

Anki 2.1.26 (70784154) Python 3.8.0 Qt 5.14.1 PyQt 5.14.1
Platform: Windows 7
Flags: frz=True ao=True sv=1
Add-ons, last update check: 2020-06-25 20:10:17


===Add-ons (active)===
(add-on provided name [Add-on folder, installed at, version, is config changed])
editor - remove more formatting for selection headings hyperlinks  ['333221628', 2019-04-11T03:15, 'None', '']

===IDs of active AnkiWeb add-ons===
333221628

===Add-ons (inactive)===
(add-on provided name [Add-on folder, installed at, version, is config changed])
  1. The problem with August.mp3 is the case of the file name. August.mp3 != AUGUST.mp3. To fix this, Rename the file AUGUST.mp3 to August.mp3.
  2. The problem with Friends-S01E02 (101).jpg is the case of the file name. Friends-S01E02 (101).jpg != Friends-S01E02 (101).JPG. To fix this, Rename the file Friends-S01E02 (101).JPG to Friends-S01E02 (101).jpg.
  3. The problem with glove.mp3 is awkward. It looks like glove.mp3 could be written with some UTF-8 characters similar to these letters. To fix this, rename both files by retyping their names using your own keyboard (ensuring no UTF-8 character is used in their names).

If after trying these things the problem is not solved, you can try installing the latest beta/alpha version from https://betas.ankiweb.net/#/

Also, have you enabled file extensions to show up? (Perhaps your files are named glove.mp3.mp3 if you not have the file extensions showing up. Be sure you have file extensions enabled)

4 Likes

Hi @addons_zz
thanks for help me . all problems solved by doing this :
1- Rename Exactly what i use UPPER case or Lower case for both file names and extensions equal to cards and media.
2- some cases I did one space key before file name for example : [sound: kitten.mp3] , I mean before Kitten.mp3 and after : i used space key , so i deleted the space and problem solved.

I also believe the upper case and lower case issues is a bug in anki .and why? watch this:
I put cat.mp3 on my collection.media
and build cards include a sound file with this codes :
[sound:CAT.mp3]
[sound:Cat.mp3]
[sound:cat.mp3]
[sound:CAt.mp3]
so if i study this card . the card replay cat.mp3 four times.
so if i check media anki tells me :
The following files are referenced by cards, but were not found in the media folder:
Missing: ⁨CAT.mp3⁩
Missing: ⁨CAt.mp3⁩
Missing: ⁨Cat.mp3⁩
so , what is difference with them ? when i use many cards . i can’t remember what type name i used ? did i use file name with upper case ? did i use file name with lower case ?
it’s important for me to know ,because anki after check media says me that they are missing !

1 Like

I agree that Anki should ignore case when comparing media/file names, even if on Linux we can have a file named Media and media.

1 Like

Anki needs to work on multiple platforms, and some platforms have case sensitive filenames. The media check is case sensitive so you fix these issues early, instead of finding out down the line that the deck you created doesn’t work on other devices.