You're welcome.
I'll add leading zeros. However, this might cause some additional issues: how many leading zeros shall be added? Say, you have up to 1000 channels. Then, there must be three leading zeros, doesn't it?
Actually, the devices should support the channelNumber property, but they don't so everything is just a hack.
I'll try to find the issue with the trailing "~". I don't know why PES recordings are still listed. I scan until the last level of the recordings hierarchy and then let the dvbProfiler determine the metadata. This would return false, if it is a PES recordings.
Is "Pe 10.07.2009-21:00" a real recordings title? So, the path should be: VDR Recordings/Tractor Pulling/Moottoriurheilua: Tractor_Pulling, Alahärmä/Moottoriurheilua: Tractor_Pulling, Alahärmä/Pe 10.07.2009-21:00 where Pe 10.07.2009-21:00 is the actual file, right?