Not understanding cleanstrings
#1
hi i must be doing something thick because this should be simple

I want some tags in filenames to show up (not be cleaned) e.g. "x264", "h264" and "dts"

so i copy paste this between the <video> tags in my advancedsettings.xml as from
http://wiki.xbmc.org/?title=AdvancedSett...strings.3E

<cleanstrings>
<regexp>[ _\,\.\(\)\[\]\-](ac3|dts|custom|dc|divx|divx5|dsr|dsrip|dutch|dvd|dvdrip|dvdscr|dvdscreener|screener|dvdivx|cam|fragment|fs|hdtv|hdrip|hdtvrip|internal|limited|multisubs|ntsc|ogg|ogm|pal|pdtv|proper|repack|rerip|retail|r3|r5|bd5|se|svcd|swedish|german|read.nfo|nfofix|unrated|ws|telesync|ts|telecine|tc|brrip|bdrip|480p|480i|576p|576i|720p|720i|1080p|1080i|hrhd|hrhdtv|hddvd|bluray|x264|h264|xvid|xvidvd|xxx|http://www.www|cd[1-9]|\[.*\])([ _\,\.\(\)\[\]\-]|$)</regexp>
<regexp>(\[.*\])</regexp>
</cleanstrings>


and remove the bits i don't want cleaned.

so mine might look like this:

<video>
<cleanstrings>
<!-- removed x264|h264|ac3|dts -->
<regexp>[ _\,\.\(\)\[\]\-](custom|dc|divx|divx5|dsr|dsrip|dutch|dvd|dvdrip|dvdscr|dvdscreener|screener|dvdivx|cam|fragment|fs|hdtv|hdrip|hdtvrip|internal|limited|multisubs|ntsc|ogg|ogm|pal|pdtv|proper|repack|rerip|retail|r3|r5|bd5|se|svcd|swedish|german|read.nfo|nfofix|unrated|ws|telesync|ts|telecine|tc|brrip|bdrip|480p|480i|576p|576i|720p|720i|1080p|1080i|hrhd|hrhdtv|hddvd|bluray|xvid|xvidvd|xxx|http://www.www|cd[1-9]|\[.*\])([ _\,\.\(\)\[\]\-]|$)</regexp>
<regexp>(\[.*\])</regexp>
</cleanstrings>
</video>

nothing happens, it still cleans all the tags from filenames.
on xbox or windows, recent camelot or later builds.
have toggled the gui setting, restarted etc.

my AdvancedSettings.xml is in the right place because other settings work.

any ideas please?
i have tried using the append=no option.
Reply
#2
Forgot the <advancedsettings> tags? Otherwise, pastebin a debug log.
Reply
#3
no i have the <advancedsettings> tags ok, and other settings in the file do work.

thanks i'll get the logs tomorrow.
Reply
#4
i should note that the parts i don't want cleaned, might be between parts i do want cleaned (in the filename). if that makes a difference.

e.g. Some Movie Bdrip 480P x264 Ac3-Chd.mkv

i would want the x264 left but the 480p and ac3 cleaned. is this possible?
Reply
#5
No one in their right mind is going to speculate until a debug log is available.
Reply
#6
the debug log doesn't contain any references to the cleanstrings action, other than where it prints the entire content of advancedsettings.xml at the top, which i've already shown above.

i have tried toggling the gui option "clean file and folder names" and it does take effect, but nothing different shows in the log.

that part of the log where i'd expect references to the cleaning action shows only
15:08:08 M: 38170624 DEBUG: CMultiPathDirectory::MergeItems, items = 116
15:08:08 M: 38170624 DEBUG: CFileItemList::Sort, sorting took 1 millis
Reply
#7
here's the full log.
I started the xbox, browsed to a list of movies, then went to settings and toggled cleaning option off and back on, then returned to the file list.

http://pastebin.com/m634a788b


skin is xTV which produces all the WARNING: Skin has invalid include: contentpanelslide
Reply
#8
What's all of that crap on line 60 of your log? Doesn't look very XMLy to me. Remove it, I bet things work as expected.
Reply
#9
ok thanks fixed the crap in advancedsettings.xml (didn't show in notepad++ my editor) but that hasn't fixed the problem, it's still cleaning everything regardless.

i don't really understand regex either, what's the 2nd line supposed to do? <regexp>(\[.*\])</regexp>

can anyone confirm what the entry in advancedsettings.xml should be to e.g. just clean "dvdrip" please.
Reply
#10
are you sure <cleanstrings> should be inside <video>? i will try outside later.

edit: no that's not the issue either.
there's gonna be much slapping of foreheads (probably mine) when someone sees the problem
.

everything else i've tried with advanced settings works, i think.
Reply
#11
can anyone confirm this feature does work please?
(editing the cleanstrings using advancedsettings.xml, on Camelot or later builds for xbox or windows)

should I file a bug report? is there a known issue? am I just missing something obvious?
Reply
#12
Smiff Wrote:are you sure <cleanstrings> should be inside <video>? i will try outside later.

edit: no that's not the issue either.
there's gonna be much slapping of foreheads (probably mine) when someone sees the problem
.
everything else i've tried with advanced settings works, i think.

Smiff, this made me laugh, especially in the context of your needing help here...
http://forum.xbmc.org/showthread.php?tid...eanstrings
;-)
but on a serious note, did you figure it out? Ive been helped a lot in a thread I started, but have still not managed to modify cleanstrings to give me search results without weird and wildly inaccurate results.

I wonder if anyone else could shed light on my issue, please look here

tx!
Mark.
Reply

Logout Mark Read Team Forum Stats Members Help
Not understanding cleanstrings0