Bug Filmsets named with special character like colon and slash are ignored by Kodi
#1
Tested with Kodi 19 RC1 and TMM 4.1 nightly snapshot from 2021-02-10 05:22

Some filmsets have names with illegal characters like colon ( : ) and slash ( / ) which cannot be expressed in the Windows filesystem.  The NFO files for these movies are stored by tmm like this

  <set>
    <name>Star Trek-Filmreihe: Die Kelvin-Zeitachse</name>
    <overview>Der Weltraum, unendliche Weiten: Dies sind die Abenteuer des Raumschiffs Enterprise, das unterwegs ist um fremde Welten zu entdecken, unbekannte Lebensformen und neue Zivilisationen. Die Enterprise dringt dorthin vor, wo noch nie ein Mensch zuvor gewesen ist. Diese Sammlung umfasst die neuen Filme mit der Mannschaft der Enterprise NCC 1701 welche ab 2009 gedreht wurden und in der alternativen Realit├ñt der Kelvin-Zeitachse spielen.</overview>
  </set>

However the directory is stored by tmm in Windows like this

Star Trek-Filmreihe - Die Kelvin-Zeitachse

causing Kodi to not find the directory and not display artwork.

While the offending moviesets can be edited, then you need to drop the movies and re-load them into Kodi one-by-one.

Can tmm be changed to ensure that offending characters in the filesystem are avoided in movieset names (in effect double-naming - one with the "correct" set naming from TMDB, and a second friendly name for the filesystem) so that automated scraping and management can be supported?

Thanks,
 Dane
#2
looks like this piece of code imports the movie set artwork into kodi: https://github.com/xbmc/xbmc/blob/master....cpp#L9918
using CUtil::MakeLegalFileName (https://github.com/xbmc/xbmc/blob/master...l.cpp#L919) to clean the filename...

so we either have two options:

a) clean the set name in tmm/NFO according to the generated filename (PRO: we get nice file names on the disk. CONS: the movie set title is simply wrong)
b) clean the movie set artwork path on the disk (PRO: kodi should pick it up without any more work needed. CONS: we need to rework the tmm internal logic to match the kodi logic. all present artwork paths are _wrong_ and will not be detected after a tmm update, the artwork path are ugly as hell: Star Trek-Filmreihe_ Die Kelvin-Zeitachse

so I am just unsure how to continue here, because changing this now will break some existing artwork paths tmm already generated
tinyMediaManager - THE media manager of your choice - available for Windows, macOS and Linux
Help us translate tinyMediaManager at Weblate | Translations at 66%
Found a bug or want to submit a feature request? Contact us at GitLab
#3
(2021-02-10, 14:42)mlaggner Wrote: looks like this piece of code imports the movie set artwork into kodi: https://github.com/xbmc/xbmc/blob/master....cpp#L9918
using CUtil::MakeLegalFileName (https://github.com/xbmc/xbmc/blob/master...l.cpp#L919) to clean the filename...

so we either have two options:

a) clean the set name in tmm/NFO according to the generated filename (PRO: we get nice file names on the disk. CONS: the movie set title is simply wrong)
b) clean the movie set artwork path on the disk (PRO: kodi should pick it up without any more work needed. CONS: we need to rework the tmm internal logic to match the kodi logic. all present artwork paths are _wrong_ and will not be detected after a tmm update, the artwork path are ugly as hell: Star Trek-Filmreihe_ Die Kelvin-Zeitachse

so I am just unsure how to continue here, because changing this now will break some existing artwork paths tmm already generated

Hi Manuel,

I've been looking at the movieset data more closely now, and see some issues where 1) maybe the changes are not that bad and 2) some core issues in the moviesets.

WRT 1) I think that the exposure is not as bad as it can be. I would suggest that tmm setup an "orphaned" directory under moviesets just like in the regular content areas - things that get moved/changed can wander there. Kodi is fairly stupid in the filename cleaning regard, so having it done with tmm is best, as if Kodi gets a clean name in the beginning then there is less things to break down the line. I do a lot of OTA recording here from digital cable, and have had to make up my own cleanname system to determine what to record and not duplicate things. Finally, out of my 4,500 films, I only get approx 525 sets (and therein 1,700 movies) - of those only a small number are broken and a once-off manual cleanup is probably less painful - however would welcome other views.

On 2) I am seeing a lot of junk coming in thru TMDB after looking more closely. Main issue seems to be sets without metadata (it can happen) but then there is only one film in the "set" - seems like someone thought a single film set makes a lot of sense. I would argue a flag to ignore "sets" with only one film entry would be a better way of handling bad incoming data from tmdb on the moviesets.

I will expect that with KODI 19 coming online soon, the movieset issue will become more prominent and data errors on TMDB and others will get fixed, however I'd love to see tmm get bombproof in that regards.

Thanks again,
 Dane

------  Update

Out of 288 filmsets with "more than one movie in them" I had to manually fix about 10 to remove offending characters in the directory names. Re-download from TMDB, edit in tmm, delete set and films from Kodi, rescan.  Not awful, but certainly on the list of things to fix once and for all.
#4
I've put the cleanup for my b) suggestion into the code. I hope cleanup from all different variants of possible file namings work (at least it did in my tests).
Will be available in v4.1
tinyMediaManager - THE media manager of your choice - available for Windows, macOS and Linux
Help us translate tinyMediaManager at Weblate | Translations at 66%
Found a bug or want to submit a feature request? Contact us at GitLab
#5
So are you replacing illegal characters with "underscores" now or do just remove them?
#6
I just answer it myself after looking at gitlab: underscores. Oh man, what XBMC dev dude had such a silly idea?!
#7
for movie set artwork I do it the same way as kodi does: replacing them with underscores. Otherwise the movie set artwork feature of Kodi won't find it oob
tinyMediaManager - THE media manager of your choice - available for Windows, macOS and Linux
Help us translate tinyMediaManager at Weblate | Translations at 66%
Found a bug or want to submit a feature request? Contact us at GitLab
#8
My harsh post wasn't directed at you, it was directed at the xbmc dev whoever thought this is a good idea. You are doing all things right by keeping TMM compatible.

Logout Mark Read Team Forum Stats Members Help
Filmsets named with special character like colon and slash are ignored by Kodi0