Problem with tvmultipartmatching and file naming
#1
Dear all,

I have an issue I would like to ask for your support as I did not find a solution within the last 2 days - I hope it is not a noob question:

Info:
* I am using XBMC v13.2 on a MacBook.
* The folder structure and format of my TV series looks like this:
[...]Test/Desperate Housewives/Series 7/Desperate_Housewives_7x20_11.10.05_20-15_pro7_65_TVOON_DE-cut.avi
* For scraping I am using the standard TheTVDB.com series scraper:
** The detection of the tv series name works without problems.
** The detection of series and episode works as well.

My problem:
For some files the scraper is creating a second entry in the tv series database. For the file mentioned above the scrapping results in:
* Desperate Housewives 7x20 --> OK
* Desperate Housewives 7x11 --> NOK

Reproducing the problem:
1/ I added the video source "Test" containing "/Desperate Housewives/Series 7/Desperate_Housewives_7x20_11.10.05_20-15_pro7_65_TVOON_DE-cut.avi" with default settings for the tv series scraper
2/ After the scraping the result is as follows:
* the video files section shows one file "Desperate_Housewives_7x20_11.10.05_20-15_pro7_65_TVOON_DE-cut.avi" --> OK
* the tv series database shows the two series 7x20 and 7x11 as described above --> NOK

The corresponding XBMC.log can be found here: http://xbmclogs.com/show.php?id=277831

My analysis of the XBMC log file:
* My advancedsettings.xml contains a cleanstrings regexp to get rid of the special file end naming ("_11.10.05_20-15_pro7_65_TVOON_DE-cut.avi") to make the movie scraping work (see line 50 in the log). This is working fine.
* The log shows the detection of the tv series name in line 483 based on title search --> OK
* Furthermore the episode 7x20 is matched correctly as stated in line 499 --> OK
* The problem can be found in line 500: Based on the default tvmultipartmatching regexp the episode 11 is added (as of the 11 in the "_11.10.05_20-15_pro7_65_TVOON_DE-cut.avi") --> NOK

My next steps:
* As the log stated the tvmultipartmatching as root cause of my problem (in combination with my file end naming) I tried to modify the tvmultipartmatching in the advancedsettings.xml based on the following idea:
** If the remainder just consists of my special file end naming it should be matched and that's it - no checking for any multiparts.
** If the remainder is more then my special file end naming the default tvmultipartmatching regexp should be used.
* This idea resulted in the following regexp for tvmultipartmatching: "(regexp for special file end naming) | (default tvmultipartmatching regexp)" - see line 53 of the log for the real regexp.

But also with the new regexp the episode 7x11 is added Sad

My questions:
1/ As far as I understand the scraping mechanism the episode detection from the initial matching returns the following results: $1="7", $2="20" (both resulting in 7x20) and the remainder $3="_11.10.05_20-15_pro7_65_TVOON_DE-cut.avi". As a second episode matching on $3 is not successful $3 is passed to the tvmultipartmatching regexp. Is my understanding right?
2/ Is my tvmultipartmatching regexp (see line 53 of the log) syntactically valid? I tried several regexp checker with a positive result, but I am not sure.
3/ Is my tvmultipartmatching regexp able to solve my issue or did I made an error in reasoning? What would be a better regexp from your point of view?
4/ Is my tvmultipartmatching regexp detected and used? Although it is listed when parsing the advancedsettings.xml (see line 53 of the log), the episode 11 is added based on the default tvmultipartmatching (see line 500 of the log). If it is not used - why?

As you can see I am really stuck on this and would be very grateful for any support. I hope I gave all relevant info (sorry for the long story). If not please feel free to ask.

Thank you in advance
Thomas

Aug. 27th 18:51h:
Updated the link to the log file and the references as my original XBMC.log was not available anymore.
Reply
#2
After several trials I think I found the root cause of my problem:

My regexp for tvmultipartmatching in the advancedsettings.xml is not used, but the default regexp. I can specify whatever I want, the matching is always performed with the default regexp.

This is my advancedsettings.xml including my regexp for tvmultipartmatching (line 47 of log file):
Code:
<advancedsettings>
<video>
  <cleanstrings action="prepend">
   <regexp>_[0-9][0-9]\.[0-9][0-9]\.[0-9][0-9]_[0-9][0-9]-[0-9][0-9]_.*_[0-9]*_.*</regexp>
  </cleanstrings>
  <tvmultipartmatching>(?:_[0-9][0-9]\.[0-9][0-9]\.[0-9][0-9]_[0-9][0-9]-[0-9][0-9]_.*_[0-9]*_.*())|(?:^[-_ex]+([0-9]+(?:(?:[a-i]|\.[1-9])(?![0-9]))?))</tvmultipartmatching>
</video>
</advancedsettings>

But as you can see here, the default regexp is used for multi-part matching (line 500 of log file):
Code:
18:09:06 T:4604399616   DEBUG: VideoInfoScanner: Adding multipart episode 11 [^[-_ex]+([0-9]+(?:(?:[a-i]|\.[1-9])(?![0-9]))?)]

As the cleanstrings regexp is working absolutely fine, the file seems to be loaded at least.

What can I do that my regexp is used for multi-part matching?

Thanx
Thomas
Reply
#3
Why not just remove all the crap from your filenames?
Texture Cache Maintenance Utility: Preload your texture cache for optimal UI performance. Remotely manage media libraries. Purge unused artwork to free up space. Find missing media. Configurable QA check to highlight metadata issues. Aid in diagnosis of library and cache related problems.
Reply
#4
As I have more then 2300 files with such a naming I prefer to keep it as it is and to find a way that XBMC ignores that stuff. Especially as there is a setting foreseen to do so.

Isn't it suspicious that XBMC is just ignoring my settings?

But if there is no solution (I doubt it) I will go for re-naming.

Thanx
Thomas
Reply
#5
My regex is complete crap, but all the examples for tvmultipartmatching on the wiki have a '^' character at the start of them. Yours doen't. I am useless at regex, but it may be significant?
If I have helped you or increased your knowledge, click the 'thumbs up' button to give thanks :) (People with less than 20 posts won't see the "thumbs up" button.)
Reply
#6
Thanx for your hint! I also tried this (btw: ^ means has to match from the beginning), but whatever I put as regexp it is just ignored and the default regexp for tvmultipartmatching is used Sad Very curious.

Regards
Thomas
Reply
#7
while i can understand why you got confused, the tag does NOT go under the <video> tag.
Reply
#8
This is the solution to all my problems! Thank you so much, ironic_monkey!!! You made my day... Smile
Reply

Logout Mark Read Team Forum Stats Members Help
Problem with tvmultipartmatching and file naming0