[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

This forum is deprecated. Please visit https://github.com/smplayer-dev/smplayer/discussions

[bug]searchForConsecutiveFiles

Forum to talk about the development of SMPlayer (code, patches...).

[bug]searchForConsecutiveFiles

Postby 3togo » Sun Mar 14, 2010 5:19 pm

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+)");
3togo
 
Posts: 7
Joined: Sat Jan 23, 2010 7:41 pm

Re: [bug]searchForConsecutiveFiles

Postby 3togo » Wed Mar 31, 2010 7:27 pm

3togo
 
Posts: 7
Joined: Sat Jan 23, 2010 7:41 pm

Re: [bug]searchForConsecutiveFiles

Postby rvm » Thu Apr 01, 2010 1:58 am

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.
rvm
Site Admin
 
Posts: 3787
Joined: Wed Dec 23, 2009 1:25 am
Location: España

[Feature Request]searchForConsecutiveFiles

Postby 3togo » Thu Apr 01, 2010 5:10 am

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+)");"
3togo
 
Posts: 7
Joined: Sat Jan 23, 2010 7:41 pm

Re: [bug]searchForConsecutiveFiles

Postby rvm » Fri Apr 02, 2010 6:02 pm

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?
rvm
Site Admin
 
Posts: 3787
Joined: Wed Dec 23, 2009 1:25 am
Location: España

Re: [bug]searchForConsecutiveFiles

Postby 3togo » Sun Apr 04, 2010 8:16 am

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
3togo
 
Posts: 7
Joined: Sat Jan 23, 2010 7:41 pm

Re: [bug]searchForConsecutiveFiles

Postby rvm » Mon Apr 05, 2010 11:31 am

Applied your patch in r3493.
rvm
Site Admin
 
Posts: 3787
Joined: Wed Dec 23, 2009 1:25 am
Location: España


Return to Development

Who is online

Users browsing this forum: No registered users and 8 guests

cron