Page 1 of 1
Properly Scrapping when there are hyphens in file names
Posted: 04 Jul 2015, 19:05
by SEO
Hi,
I have hundreds of files named following this pattern:
Title in Spanish - Original title.Director, year.[DVD.ES.EN.XviD.AC3][Signature].avi
OR
Movie title in Spanish - Original title.Director, year.DVD.ES.EN.XviD.AC3.Signature.avi
I'd like FileBot to use the hyphen (-) as a stop for scrapping the movie databases or be able to define what to use for scrapping.
Very often, it's better to scrap in English so, optionally, it would be great if the program could search for the original name (I mean, using the part before the hyphen for Spanish of after hyphen to scrap using the original file name (or in English). I understand that the dot (.) is always a STOP symbol.
Anyhow, my main concern is that, as far as I know, is not currently possible to rename my files in batches because Filebot does not use ONLY the part before the hyphen (or between the hyphen and the first dot).
Am I missing something? I have been searching for a solution for long but found nothing (and I'm renaming my files manually, one by one

).
Thanks in advance
Re: Properly Scrapping when there are hyphens in file names
Posted: 04 Jul 2015, 19:32
by rednoah
1.
That's a shitty way to name your files so naturally it's gonna work a lot less well that way. But have you tried? Since you didn't provide any actual examples that don't work, I tried with
El señor de los anillos La comunidad del anillo - The Lord of the Rings The Fellowship of the Ring 2001.mp4 and that works perfectly fine.
2.
Why don't you just batch rename the files first? It seems like you just need to remove the
"Title in Spanish - " part.
@see
viewtopic.php?f=3&t=2072
Hint:
{fn.after('-')}
Re: Properly Scrapping when there are hyphens in file names
Posted: 28 Jul 2015, 20:58
by SEO
Hi Rednoah,
Please, excuse the delay.
Yes, you're right. It's a bit shitty and that's why I'm changing to a more compatible schema so media devices and most software (including FileBot) will be able to use it as is to scrape and to create movie libraries.
This is an example of the target format I'm renaming the movies to:
Director\movie name in Spanish (year)\movie name in Spanish (year).(original name).[DVD.ES.EN.Sub.XviD.AC][PKTA].extension
Look, the name in Spanish is a requirement because my family don't understand a word of English and I have already done the job to find the name that distributors used when the movies at the time they were released. Another reason is that I'd like to be able to search for the name in Spanish because it's how I know many of the movies.
Yes, the old format is weird but, at least, I took the prevention to use a unique separator (-). Hence my request to provide the possibility to define STOP symbols/words to the scrapper. I really think it would be a great improvement because I have observed that manually searching on IMDB, Filmafinity and ThemovieDB all of them work fine when using only the movie name and nothing else (in Spanish, English or other supported languages).
Here you have some examples of file names from an italian director where FileBot is not able to find just a single proper match. Some movies are named in Spanish & Italian while others are named only with their original names in italian. Some have hyphens while in others I used dots as separators:
Cinco munecas para la luna de agosto - 5 bambole per la luna d'agosto. Mario Bava, 1970
El latigo y el cuerpo - La frusta e il corpo. Mario Bava, 1963
Gli orrori del castello di Norimberga. Mario Bava, 1972.[DVD.IT.XviD.AC3]
La mascara del demonio - La Maschera del Demonio. Mario Bava, 1960.[DVD.IT.ES.XviD.MP3]
La ragazza che sapeva troppo. Mario Bava, 1963
Operazione paura. Mario Bava, 1966.VOSE
Terror en el espacio - Terrore nello spazio. Mario Bava, 1965.[DVD.ES.DivX5.MP3
...and more examples of movies from USA:
La alegre divorciada - The Gay Divorcee. Mark Sandrich, 1934. F. Astaire,G. Rogers,E. E. Horton.[DVD.ES.EN.Divx5.AC3]
Sombrero de copa - Top Hat. Mark Sandrich, 1935. F. Astaire,G. Rogers.[DVD.EN.ES.Xvid.AC3.MP3]
Una mujer se rebela - A Woman Rebels. Mark Sandrich, 1936. K. Hepburn,H. Marshall.[DVD.EN.Xvid.MP3]
If adding an optional separator as a new feature is not possible, I would be fine just renaming the files, as you suggest (with a function), but not deleting the Spanish part. In fact, that's what I'm currently doing (mostly manually, one by one which is a huge and silly work, I know). I'm doing it manually, also because I want to keep the technical information contained after the name/director/year as you can see in the examples above (Highlighted in bold). Obviously, I haven't found a way to keep it using FileBot or any other software.
Maybe you could help me on this procedure using functions for renaming but, please, if you think this is the best way to rename the files, let me know how to use the function and where should I type it.
Thanks again.
Re: Properly Scrapping when there are hyphens in file names
Posted: 28 Jul 2015, 21:59
by rednoah
1.
You can use any output format. But understand that FileBot can't make sense of the files afterwards. However, as long as you use FileBot to rename the files, it'll also tag them (via xattr) so FileBot will always be able to deal with files that have previously been processed with FileBot.
2.
Whatever format you have now, it doesn't work for FileBot. But it seems like you can transform it to something that works quite easily (any regex rename tool will do, also filebot can do that). So do that. Make everything work nicely with FileBot first, and then have FileBot output with whatever format works for you.
e.g.
Original Name: "A Woman Rebels (1936)" (something that makes sense)
Formatted Name: "Una mujer se rebela - A Woman Rebels. Mark Sandrich, 1936. K. Hepburn,H. Marshall.[DVD.EN.Xvid.MP3]" (as output, anything is fine)
Writing a format shouldn't be too hard. You have all the info: {n} (IF Spanish Language Preference!) {primaryTitle} {directory} {y} {actors} ... right?
It's all just movie data, or mediainfo data, except the "DVD" part. You might need to retain that token from original filename (but we're not removing that part anyway, so {source} will pick it up).
Re: Properly Scrapping when there are hyphens in file names
Posted: 28 Jul 2015, 23:59
by SEO
Hi Rednoah,
I think there is a confusion here. The examples provided, are not the way I'm naming the files now. Those are examples to show you how the old files were named years ago and I need to rename them all NOW to the new 'GOOD' format. This way:
Director\movie name in Spanish (year)\movie name in Spanish (year).(original name).[DVD.ES.EN.Sub.XviD.AC][PKTA].extension
1.
As you can see, I'm now using a format that any tool can understand. As for the example you have chosen, the new output I'm using would be:
{director}/{n} ({y})/Una mujer se rebela (1936).(A Woman Rebels).(Mark Sandrich).[DVD.EN.Xvid.MP3]
If you could add a feature to skip anything beyond the hyphen (-) to scrap the databases, the program would be able to do the job properly (searching ONLY for the movie name) and rename all the files following that new pattern.
2.
This new format works in FileBot and my other programs so that's why I have chosen to rename the files this way.
You say:
"Writing a format shouldn't be too hard"
But for me, it is not hard, it's just impossible, because I lack of the required skills to know what specific REG expressions on any other method to use and how.
This were I'm really desperately looking for help.
This is the output format I'm currently using (obviously it should be completed to include the metadata):
{director}/{n} ({y})/{n} ({y}).({primaryTitle}).({director}).[{source}{vf}]{' CD'+pi}{'.'+lang}
Regarding the DVD (or BD) part, I think it should be obtained from the resolution if needed. 720p or above is a BD and anything below a DVD BUT this part could be better be skipped if I could leave untouched the part after the director (in brackets in the example).
Obviously (before parsing), the files should be renamed, as you suggest, so the program can understand it.
Can you help me on this?
I hope my question is more clear now.
Best,
Diego
Re: Properly Scrapping when there are hyphens in file names
Posted: 29 Jul 2015, 09:09
by rednoah
1.
Not supported. Not planned. But I did show you a work around. As you said, you'll pre-process the filenames first a little bit.
The idea is similar to what I wrote in
Pre-Process badly named episode files:
viewtopic.php?f=3&t=2072
Just click the link. Tells you exactly how to do generic renaming. And I already gave you the format expression for removing the hyphen.
2.
movie name in Spanish (year).(original name) works in every program? I highly suggest doing something like
{originalTitle} ({y}) - {n} - {...} because lots of scrapers don't do well with non-English/non-Original Name/Year combination.
Looks good to me. What's still missing?
Code: Select all
{director}/{n} ({y})/{n} ({y}).({primaryTitle}).({director}).[{source}{vf}]{' CD'+pi}{'.'+lang}
If you want to embed Audio Language / Subtitle Language / Audio Format etc that stuff is all in the in-app examples, plus lots of forum threads: {audio.language} {text.language} ... Just click
(x)= in the Format Editor to explore available bindings.
e.g. [DVD.EN.Xvid.MP3]
Code: Select all
[{source}.{audio.language}.{text.language}.{vc}.{ac}]
@see
viewtopic.php?f=5&t=2#p51
Re: Properly Scrapping when there are hyphens in file names
Posted: 29 Jul 2015, 09:41
by SEO
Hi rednoah,
Thanks for your help and advice.
Let's see if finally I'm able to find the way to get this renaming thing done. Believe me, it's not easy and I read a lot before asking
All the best,
Diego
P.S. Donation sent
Re: Properly Scrapping when there are hyphens in file names
Posted: 29 Jul 2015, 09:52
by rednoah
Sure, if you need help with the format just ask how-to-do-what and I'll give you more snippets.
Re: Properly Scrapping when there are hyphens in file names
Posted: 29 Jul 2015, 10:52
by SEO
Great.
Just one question regarding your advice to choose the best possible name:
I highly suggest doing something like {originalTitle} ({y}) - {n} - {...} because lots of scrapers don't do well with non-English/non-Original Name/Year combination.
Are you recommending using hyphens there for a particular reason or, in your opinion, could I equally use dots as separators? Dots use less space in screens, you know.
Thanks again.
Re: Properly Scrapping when there are hyphens in file names
Posted: 29 Jul 2015, 22:20
by rednoah
No. It just has to start with
MovieName (MovieYear) and everything after that doesn't matter.
Because most scrapers assume that:
- Before Year => Movie Name
- Year => Movie Year
- After Year => everything else, doesn't matter