Files beginning with [ break several XBMC process's
#1
If a file starts with [ in the filename it breaks several aspects of XBMC.


The movie identification process into the library won't identify (perhaps IMDB doesn't like the character??)
Far more importantly though, XBMC doesn't commit / record the fault to the XBMC.LOG file

I did some testing and made a dummy file, I specifically chose a popular english movie title so IMDB wouldn't have issues recognising it
Example file which won't work.
[ANYTHING IN HERE-LOL-TESTING] Avatar (2009).MKV
File which will work
Avatar (2009) [ANYTHING IN HERE-LOL-TESTING].MKV



NOTE: I definitely realise this is a stupid naming convention! However I suspect it's probably not hard for the developers to add a line of code to ignore the brackets?
You can see the history of me discovering this here:
http://forum.xbmc.org/showthread.php?tid...pid1229129

Thanks developers / coders, I hope this helps.
NOTE/FYI: I hope this isn't wasting someones time but for the sake of testing the new filtering system, I'm using a more recent build
XBMC 12.0-Alpha7 from Oct 19
Reply
#2
1. Add folder "video_scanning".
2. Add file "[something] avatar.avi" to said folder.
3. Set content on folder in XBMC (default settings).
4. Say yes when prompted to refresh items in this path.
5. Produces the Debug Log file below:

Quote:16:33:31 T:2953850880 DEBUG: VideoInfoScanner: Scanning dir '/Users/jmarshall/XBMC_tests/video_scanning/test_brackets/' as not in the database
16:33:31 T:2953850880 DEBUG: VideoInfoScanner: No NFO file found. Using title search for '/Users/jmarshall/XBMC_tests/video_scanning/test_brackets/[something] avatar.avi'
16:33:31 T:2953850880 DEBUG: FindMovie: Searching for '[something] avatar' using The MovieDB scraper (path: '/Users/jmarshall/Library/Application Support/XBMC/addons/metadata.themoviedb.org', content: 'movies', version: '3.5.0')
16:33:31 T:2694837568 DEBUG: ------ Window Deinit (DialogProgress.xml) ------
16:33:31 T:2953850880 DEBUG: scraper: CreateSearchUrl returned <url>http://api.themoviedb.org/3/search/movie?api_key=57983e31fb435df4df77afb854740ea9&amp;query=%5bsomething%5d%20avatar&amp;year=&amp;language=en</url>
16:33:31 T:2953850880 DEBUG: CurlFile::Open(0x1cd7f7a0) http://api.themoviedb.org/3/search/movie...anguage=en
16:33:31 T:2953850880 INFO: easy_aquire - Created session to http://api.themoviedb.org
16:33:33 T:2953850880 DEBUG: scraper: GetSearchResults returned <results></results>
16:33:33 T:2953850880 DEBUG: FindMovie: Searching for '[something] avatar' using The MovieDB scraper (path: '/Users/jmarshall/Library/Application Support/XBMC/addons/metadata.themoviedb.org', content: 'movies', version: '3.5.0')
16:33:33 T:2953850880 DEBUG: scraper: CreateSearchUrl returned <url>http://api.themoviedb.org/3/search/movie?api_key=57983e31fb435df4df77afb854740ea9&amp;query=%5bsomething%5d%20avatar&amp;year=&amp;language=en</url>
16:33:33 T:2953850880 DEBUG: CurlFile::Open(0x1cd7f7a0) http://api.themoviedb.org/3/search/movie...anguage=en
16:33:33 T:2953850880 DEBUG: scraper: GetSearchResults returned <results></results>
16:33:33 T:2953850880 DEBUG: VideoInfoScanner: No (new) information was found in dir /Users/jmarshall/XBMC_tests/video_scanning/test_brackets/

The only thing I can think to add is a line saying "No information found for <insert path>" as perhaps the current "<results></results>" isn't apparent enough?
Always read the XBMC online-manual, FAQ and search the forum before posting.
Do not e-mail XBMC-Team members directly asking for support. Read/follow the forum rules.
For troubleshooting and bug reporting please make sure you read this first.


Image
Reply
#3
Ok, clearly I need to use the same build as you, I can 100% absoloutely assure you - this failed on my build 100% - there is NO record in the log of the file.
I didn't just search for "NO NFO" or manually scan with my eyes.

I hit control F and typed in "Avatar" and it the line is simply gone - XBMC showed it up the top right while scanning - that it was having trouble but the log is missing the data.
What build are you on? I am always hesitant to change builds because of MySQL setup, I need to install the identical build on all 3 PC's I work on.
Reply
#4
This hasn't changed for ages, so that won't matter at all.

Obviously it'll only show something on first scan of the folder (or where it needs to rescan the folder due to a file being added), as otherwise the folder will be skipped.

I'll make a change to add yet another log message elevated to LOGWARNING:

Quote:16:48:51 T:2953850880 DEBUG: VideoInfoScanner: Scanning dir '/Users/jmarshall/XBMC_tests/video_scanning/test_brackets/' as not in the database
16:48:51 T:2953850880 DEBUG: VideoInfoScanner: No NFO file found. Using title search for '/Users/jmarshall/XBMC_tests/video_scanning/test_brackets/[something] avatar.avi'
16:48:51 T:2694837568 DEBUG: ------ Window Deinit (DialogProgress.xml) ------
16:48:51 T:2953850880 DEBUG: FindMovie: Searching for '[something] avatar' using The MovieDB scraper (path: '/Users/jmarshall/Library/Application Support/XBMC/addons/metadata.themoviedb.org', content: 'movies', version: '3.5.0')
16:48:51 T:2953850880 DEBUG: scraper: CreateSearchUrl returned <url>http://api.themoviedb.org/3/search/movie?api_key=57983e31fb435df4df77afb854740ea9&amp;query=%5bsomething%5d%20avatar&amp;year=&amp;language=en</url>
16:48:51 T:2953850880 DEBUG: CurlFile::Open(0x1cf76c90) http://api.themoviedb.org/3/search/movie...anguage=en
16:48:51 T:2953850880 INFO: easy_aquire - Created session to http://api.themoviedb.org
16:48:52 T:2694837568 INFO: CheckIdle - Closing session to http://xbmc-addons.googlecode.com (easy=0x55f3a00, multi=0x1d01ff30)
16:48:52 T:2956017664 NOTICE: Invoking URL: http://api.yousee.tv/rest/tvguide/progra...ormat/json
16:48:52 T:2953850880 DEBUG: scraper: GetSearchResults returned <results></results>
16:48:52 T:2953850880 DEBUG: FindMovie: Searching for '[something] avatar' using The MovieDB scraper (path: '/Users/jmarshall/Library/Application Support/XBMC/addons/metadata.themoviedb.org', content: 'movies', version: '3.5.0')
16:48:52 T:2953850880 DEBUG: scraper: CreateSearchUrl returned <url>http://api.themoviedb.org/3/search/movie?api_key=57983e31fb435df4df77afb854740ea9&amp;query=%5bsomething%5d%20avatar&amp;year=&amp;language=en</url>
16:48:52 T:2953850880 DEBUG: CurlFile::Open(0x1cf76c90) http://api.themoviedb.org/3/search/movie...anguage=en
16:48:53 T:2694837568 INFO: CheckIdle - Closing session to http://xbmc-repo-liquidskin76.googlecode.com (easy=0x5d24400, multi=0x1cfaa640)
16:48:53 T:2953850880 DEBUG: scraper: GetSearchResults returned <results></results>
16:48:53 T:2953850880 WARNING: RetrieveVideoInfo No information found for item '/Users/jmarshall/XBMC_tests/video_scanning/test_brackets/[something] avatar.avi', it won't be added to the library.
16:48:53 T:2953850880 DEBUG: VideoInfoScanner: No (new) information was found in dir /Users/jmarshall/XBMC_tests/video_scanning/test_brackets/

EDIT: done in d4254e1
Always read the XBMC online-manual, FAQ and search the forum before posting.
Do not e-mail XBMC-Team members directly asking for support. Read/follow the forum rules.
For troubleshooting and bug reporting please make sure you read this first.


Image
Reply
#5
I've done some fiddling and created a whole new library.
Managed to get the log file to recognise the failed entry for the movie, however it's still not recognising it with the [ at the start,..


http://i.imgur.com/WjhQZ.jpg
http://i.imgur.com/PiJfG.jpg

My particular build will not recognise files with the [ at the start.
I apologise about me thinking it was not in the log file, it certainly wasn't - I searched very thoroughly, regardless it's at least in the log now.

Reply
#6
It's the the lookup/search on the various websites that fail. Nothing mysterious.
Always read the XBMC online-manual, FAQ and search the forum before posting.
Do not e-mail XBMC-Team members directly asking for support. Read/follow the forum rules.
For troubleshooting and bug reporting please make sure you read this first.


Image
Reply
#7
I've done more investigation now and I see how the program works, it's about the content at the start of the filename (which I must admit, completely makes sense)
It still has issues with stuff inside the [ ] even if it is relevant, where I feel you should be stripping the [ ] out of searches,...........................

2 more screenshots to show it only matches 1 out of all 4 combinations. (rather than the 2, one would expect)
http://i.imgur.com/cub1i.jpg
http://i.imgur.com/J2CIQ.jpg

So even if the right info is inside [ ] at the start of the search, it fails
However I can understand this is a very low priority, if anyone is ever wanting to clean up nit-pick stuff, well - I still feel this behaviour is inconsistent.
Reply
#8
It's not _necessarily_ about the content at the start of the filename at all. What we do is do some basic cleanup (typically at the end of the name, as that's where it's easiest to spot irrelevant stuff) and then send that to the website's search API.

I'm not sure if always cleaning stuff inside [] is a valid thing to do or not. One could put the year in square brackets (and that's stuff we send to the search) for example to improve the hit. Further, our clean routine atm is designed to detect the end of valid information (i.e. it throws out everything after it has matched an irrelevant piece of information) rather than cleaning arbitrary information. There's an argument to make to do the same thing at the start of the string, but as you say, not a high priority. IIRC there was some proposed changes on the forums somewhere regarding this just the other day (with potential code changes) - you may want to do a search and see if you can coordinate something.

Cheers,
Jonathan
Always read the XBMC online-manual, FAQ and search the forum before posting.
Do not e-mail XBMC-Team members directly asking for support. Read/follow the forum rules.
For troubleshooting and bug reporting please make sure you read this first.


Image
Reply
#9
Thanks for your feedback, helpful as usual.
Reply
#10
the thread Jonathan is referring to is http://forum.xbmc.org/showthread.php?tid=76044

As I said in that thread I didn't submit a fix because I wanted to offer an enhancement and nobody had complained ....
Once again I have an issue on how to introduce a new method compatible with the old.

Regardless, I in particular had a lot of files with the year in front, as well as index numbers so I think even the small improvement would be useful.

BTW the reason for the OP problem is that the default cleanstrings includes
Code:
<regexp>(\[.*\])</regexp>
which inconveniently deletes everything to the right of '[' (i.e. the whole string)

When the OP of the other thread replies, either he or I will submit a pull request which will at least fix
this poster's problem[/quote]

mike
Reply
#11
Related to this, frecuently I download files with names similar to...
name.file.[1x01][something][more.things].avi
This files are invisible to scraping until a blank space is added near brackets.
name.file.[ 1x01 ][something][more.things].avi
Now, the file is scraped perfectly

Any permanent and easy solution for no change of every file name?
Reply
#12
Is there a method for removing strings from the beginning of filenames yet? Without removing everything after?

Thanks
Reply
#13
(2014-03-30, 07:13)iondream Wrote: Is there a method for removing strings from the beginning of filenames yet? Without removing everything after?

Thanks

What does that have to do with this thread?
Reply
#14
(2014-03-30, 07:30)Ned Scott Wrote:
(2014-03-30, 07:13)iondream Wrote: Is there a method for removing strings from the beginning of filenames yet? Without removing everything after?

Thanks

What does that have to do with this thread?


This would be a work around for the "deletes everything to right" issue. basically allowing you to ignore the bracketed info at the beginning, rather than only being able to ignore the brackets at the end.

right now ignoring the bracketed data ignores all the text in a file name like this.
[Junk data] relevant

but this returns the relevant info.
relevant [Junk data]

if we could remove the bracketed data from the beginning somehow and keep the rest, then it would not 'break'. Is there some way to do this that I am not aware of?

Thanks

oh, and here is an example using this advancedsettings.xml

<advancedsettings>
<tvshowmatching>
<!-- ><regexp>R([0-9]+) E([0-9]+)</regexp> -->
<regexp>[/\._ \- \\p]()([0-9]+)(-[0-9]+)?</regexp>
</tvshowmatching>

<video>
<cleanstrings action="append">
<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|1280x720|1080p|1080i|[EEX]|hrhd|hrhdtv|hddvd|bluray|mp4|x264|h264|Doki|EROBEAT|ExiledDestiny|K1|FAKKU|YarashiiSubs|AnimE|Pr0n|KH|MOT|a4e|SubDESUH|xvid|xvidvd|xxx|www.www|1280|720|cd[1-9]|\[.*\])([ _\,\.\(\)\[\]\-]|$)</regexp>
<regexp>(\[.*\])</regexp>
</cleanstrings>
</video>

</advancedsettings>



02:30:16 T:22692 DEBUG: VideoInfoScanner: No NFO file found. Using title search for 'I:\ANIME\[Aho-Taku] Sakurasou no Pet na Kanojo [720p Hi10P]\'
02:30:16 T:22692 DEBUG: DialogProgress::StartModal called
02:30:16 T:22692 DEBUG: ------ Window Init (DialogProgress.xml) ------
02:30:16 T:22692 INFO: Loading skin file: DialogProgress.xml, load type: KEEP_IN_MEMORY
02:30:17 T:23432 NOTICE: Thread CVideoInfoDownloader start, auto delete: false
02:30:17 T:23432 DEBUG: ADDON::CScraper::FindMovie: Searching for '[Aho-Taku] Sakurasou no Pet na Kanojo' using AniDB.net scraper (path: 'C:\Users\Violet\AppData\Roaming\XBMC\addons\metadata.anidb.net', content: 'tvshows', version: '2.0.0')

as you can see from the results it clips the [720p and everything after. without the "prepend" setting it just sees the full name, I think this is because if there is nothing returned by the regex it just gets the full name. I really want to get rid of all the things in brackets, regardless of what they are and keep the filename. Any help would be appreciated.
Reply
#15
Ah, sorry for the confusion. I believe the regex clean strings have been updated since this thread has started, as I am able to scan in files that start out with a word in brackets. No additional steps should be necessary. Are you still having issues?
Reply

Logout Mark Read Team Forum Stats Members Help
Files beginning with [ break several XBMC process's0