Solved Missing genres fixed
#1
I knew all my mp3's were tagged with genre, yet Kodi was not picking them up. I found Kodi skips genres for any mp3 having duplicate genres (e.g., Pop|Ballad|Pop). If you use Florian's Mp3Tag to fix your mp3 tags, here's the Export Configuration to count genre-filename, looking for duplicates. It creates a batch file Tagcount.bat, which you run (by answering Yes at the prompt) to get your taglisting.txt file with the counts.

DupSongGenres.mte
Code:
$filename($getEnv('USERPROFILE')'\desktop\TagCount.bat',ANSI)
@echo Off
chcp 1254
if exist "%%USERPROFILE%%\Desktop\taglisting.txt" del "%%USERPROFILE%%\Desktop\taglisting.txt" /q
REM Create a Newline variable (the two blank lines below are required!)
set LF=^


set NL=^^^%%LF%%%%LF%%^%%LF%%%%LF%%
$loop(%_filename%)
set "string3=%_folderpath%%_filename_ext%
$if(%Genre%,set "string=$replace($meta_sep(Genre,|),'%','%%')|%string2%"
    setlocal enableDelayedExpansion
    SET string2=!string3:^&='^^^&'!
    SET string=!string:^|=%%string2%%%%NL%%!
    echo !string!>>"%%USERPROFILE%%\Desktop\taglisting.txt"
    endlocal,)
$loopend()
set "file=%%USERPROFILE%%\Desktop\taglisting.txt"
set "sorted=%%file%%.sorted"
set "counted=%%file%%.counted"
set /a N = 1
sort "%%file%%" >"%%sorted%%"
>"%%counted%%" (
  set "prev=start"
  for /f usebackq^ eol^=^%%LF%%%%LF%%^ delims^= %%%%A in ("%%sorted%%") do (
    set "curr=%%%%A"
    setlocal enableDelayedExpansion
    if /i "!curr!" neq "!prev!" (
    if "!prev!" neq "start" echo !n!    !prev!
    endlocal
      set "prev=%%%%A"
      set /a N = 1
    ) else (
    endlocal
    set /a N += 1
    )
  )
    setlocal enableDelayedExpansion
    echo !n!    !curr!
    endlocal
  )
>nul move /y "%%counted%%" "%%file%%"
del "%%sorted%%"
del "%%USERPROFILE%%\Desktop\TagCount.bat"
pause
EXIT /b
Reply

Logout Mark Read Team Forum Stats Members Help
Missing genres fixed0