English > Support
File Scanner and Regular Expressions
Labbetass:
Hi,
I'm new to pvdimport and to this forum. Thanks for this great program! It works great with my .iso rips for movies.
But I don't understand the regular expressions. I'm trying to file scan my tv series, but I can't get the expression right.
They are stored like this:
f:\Media\Tv-serier\Dexter\Season 01\Dexter-S01E12-BornFree.mkv
Can someone please help me with the correct expression for this?
In advance thanks,
rick.ca:
Welcome to the forum.
--- Quote ---Can someone please help me with the correct expression for this?
--- End quote ---
(?i)^.*\\(?P<title>.*)-S(?P<season>[0-9]{1,2})E(?P<episode>[0-9]{1,2})
should do it. Use (link to download) utility to test regular expressions for extracting movie data from file names to help in finding the expressions you need.
JoopvB:
Hi,
I am new to PVD and the forum.
I have a lot of TV series, all neatly named (I use TV rename for that, great prog.). The format of the file name is: series-name - SxxRyy - episode-name (all info from the TVDB.com, that's where TV rename gets it from). From what I have read on this forum (and by trial and error), the TVDB plugin is not really giving good results (or maybe I am not using it correctly; please advise). So I use the IMDB plugin, which 1) gives me all the seasons and 2) per season the detail info per episode.
The regexp I use is: (?i)^.*\\(?P<title>.*) - (s|\b)(?P<season>[0-9]{1,2})e(?P<episode>[0-9]{2,3}) - (?P<eptitle>.*)\..{3,4}.
The switch "Smart episodes detection" is set.
What happens is that for nearly all episodes the dialog comes up with a selection of movies with a comparable name - one of which is the "title" "episode" I am looking for. My question is, why is this? Since the title (show name) is known I expect it would be possible to shorten the dialog list (and in 90% of the cases eliminate it, since only one choise is left).
Am I doing something wrong (or inefficient)? Or is it on a todo list? Or (very possible) is it just a stupid question of some guy of PVD newbie.
Thanks for a great program; by far the best I have seen in this field!
rick.ca:
Welcome.
--- Quote ---Am I doing something wrong (or inefficient)?
--- End quote ---
Inefficient, perhaps, not wrong.
Not having URL's for episodes, the plugin is requesting a search by Title. I don't know why it doesn't get the episode URL's when the series is added in the first place. Or, if that's not feasible, why it can't get the episode Titles and URL's from a summary page. The search is very annoying. If it is necessary, I wish it were restricted to exact matches of Title, automatically accept any single hit, and otherwise fail. Picking from such a list is a waste of time.
I've found the annoyance is minimized if I first, when adding the series, run the TVDb plugin. It always downloads a package with all available data about the series—including episodes. That, of course, doesn't add IMDb URL's, but having the episode records created and properly named seems to help the IMDb plugin find the correct episodes. After running the TVDb plugin, select all the episodes of a season and run the IMDb plugin. If I still get the search dialog and the correct episode is not at the top of the list, I just skip that episode, add the URL manually, and then run it again on that episode.
Notice I haven't said anything about the file scanner or regex. The matching of files to database records is a completely separate matter. Creating and updating the records doesn't require matching the files, and it's more efficient to do this first. Once there are accurate episode records for the series in the database, a properly configured scanner will have no difficulty matching the files.
JoopvB:
Hi Rick,
Thanks for your prompt reply.
Let me check if I understand what you're saying (and what I am thinking / wondering):
1) The TDV plugin does a search by Title (as does TV rename). This would return the TVDB seriesid (and if we could store that somewhere like the IMDB number that would set us off, I guess?).
2) TDV allowes you to get an overall overview of all episodes of a show (something like: http://thetvdb.com/?tab=seasonall&id=73200&lid=7). So if that is used by the plugin (is it?) I would end up with a complete overview of all episodes of the show.
3) TV rename also pulls out the artwork if available per season and per episode. Hence it must be possible. But if I understand it correct the plugin doesn't (as yet) support this?
So, with the plugin as is, the procedure is: run TVDB plugin on the show (I did, but the title matching came up with nothing); then run IMDB per season to get the details (I do, but I run IMDB as step 1 also). The net effect of what I do is the large number (from my point unnecessary) entries in the dialog. By this I mean that when the dialog list is build, checking it with the known Title of the season would eliminate nearly always all other options in the dialog list, resulting in one (the correct one) that could be chosen automatically.
I understand your point about the filename and the database record. The question there was how do I get a correct record in the database given that I use my filename (see format in the previous post) as the input. From the little I know of regex my guess was that the expression would correctly result in a valid title/season/episode and hence a valid record in the database. Would you agree?
To wrap it up: TV rename seems to do a nice job naming files based on TVDB (the source code is available). A great program like PVD could benefit from an approach like TV rename is using to get the series handling done easier(i.e. getting large numbers of records in the database without much handwork). TV rename just scans all folders, looks up show name, season, episode from TVDB and downloads all TVDB information. With that it can update the filenames and stores images and other episode data in XML.
Maybe I have it completely wrong or am I lacking the knowledge, so excuse me but I really like to understand. Thanks.
Navigation
[0] Message Index
[#] Next page
[*] Previous page
Go to full version