[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 112: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/functions.php on line 4688: Cannot modify header information - headers already sent by (output started at [ROOT]/includes/functions.php:3823)
[phpBB Debug] PHP Warning: in file [ROOT]/includes/functions.php on line 4690: Cannot modify header information - headers already sent by (output started at [ROOT]/includes/functions.php:3823)
[phpBB Debug] PHP Warning: in file [ROOT]/includes/functions.php on line 4691: Cannot modify header information - headers already sent by (output started at [ROOT]/includes/functions.php:3823)
[phpBB Debug] PHP Warning: in file [ROOT]/includes/functions.php on line 4692: Cannot modify header information - headers already sent by (output started at [ROOT]/includes/functions.php:3823)
SMPlayer Support Forum • View topic - [bug]searchForConsecutiveFiles
Page 1 of 1

[bug]searchForConsecutiveFiles

PostPosted: Sun Mar 14, 2010 5:19 pm
by 3togo
function "searchForConsecutiveFiles" cannot cope with the situation when the number of digits of consecutive files is more than 1.
e.g. XXXXs01e16.avi

I suggest to modify the regexp as follow.


[Karmic-HP64../smplayer/src]$ diff helper.cpp.backup helper.cpp
208c208
< QRegExp rx("^.*(\\d+)");
---
> QRegExp rx("^.*\\D(\\d+)");

Re: [bug]searchForConsecutiveFiles

PostPosted: Wed Mar 31, 2010 7:27 pm
by 3togo

Re: [bug]searchForConsecutiveFiles

PostPosted: Thu Apr 01, 2010 1:58 am
by rvm
It's just that I'm not sure if this is a bug.

The option to add consecutive files to the playlist is intended for movies that are split in multiple files (movie_cd1.avi, movie_cd2.avi and so on).

It seems your patch (according to your example) would add all TV episodes found in a directory. I don't say that is bad, but maybe the user should have the possibility to choose if that is what he wants.

[Feature Request]searchForConsecutiveFiles

PostPosted: Thu Apr 01, 2010 5:10 am
by 3togo
Two points I want to add:
1. Whether the reader wants to add consecutive files is already controlled by an option inside "Preference"->"PlayList"

2. Also by using "d+", the existing regex is seemingly attempting to handle a count that is more than a single digit. However, by using ".*" rather than ".*?", the regex failed to do the job because the former is a greedy approach while the latter not.


original regex : "< QRegExp rx("^.*(\\d+)");"

Re: [bug]searchForConsecutiveFiles

PostPosted: Fri Apr 02, 2010 6:02 pm
by rvm
Ok, I tried to use your patch, but I can't see any difference.

I tried with filenames like flashforward_s01e11.avi and flashforward_s01e12.avi. Both files are added to the playlist with the current code.

Could you give an example of filenames that smplayer fails to add to the playlist?

Re: [bug]searchForConsecutiveFiles

PostPosted: Sun Apr 04, 2010 8:16 am
by 3togo
QRegExp rx("^.*(\\d+)")
xxxs01e09yyy.srt ---> (\\d+) match 9
xxxs01e19yyy.srt ---> (\\d+) match 9

QRegExp rx("^.*\\D(\\d+)")
xxxs01e09yyy.srt ---> (\\d+) match 09
xxxs01e19yyy.srt ---> (\\d+) match 19

QRegExp rx("^.*\\D(\\d+)\\D+")
xxxs01e09yyy.srt ---> (\\d+) match 09
xxxs01e19yyy.srt ---> (\\d+) match 19

Re: [bug]searchForConsecutiveFiles

PostPosted: Mon Apr 05, 2010 11:31 am
by rvm
Applied your patch in r3493.