Page 1 of 1
movie naming scheme that has the specialty of calculating a world average certification
Posted: 26 Aug 2026, 07:32
by cafevincent
I've got this movie naming scheme that has the specialty of calculating a world average certification (from certifications, average all values under 22) but it fails with many rare movies. I'm guessing that when a movie has no certification numbers listed (or only 1?) it fails.
The credits for this naming scheme goes to RedNoah! I cannot code.
Re: Need help fixing this movie naming scheme
Posted: 26 Aug 2026, 08:15
by rednoah

Can you give me a TMDB link for one of these rare movies?
Re: movie naming scheme that has the specialty of calculating a world average certification
Posted: 26 Aug 2026, 09:07
by cafevincent
https://www.imdb.com/title/tt32635624/
https://www.imdb.com/title/tt13407984/
those do not have certifications. this next one does, and has two numbers, but also a potential large problem number with a hashtag. large numbers should be ignored but maybe the hashtag ruins something, or the problem is entirely different.
https://www.imdb.com/title/tt0093952/
Re: movie naming scheme that has the specialty of calculating a world average certification
Posted: 26 Aug 2026, 09:33
by rednoah
Alright, lets test with these TMDB IDs:
*
https://www.themoviedb.org/movie/1305787-micro-budget
*
https://www.themoviedb.org/movie/108101 ... man-flight
*
https://www.themoviedb.org/movie/113747-shame
You could rewrite your format like so:
That'll give you
R (has no numeric certification but does have a US certification) and
NR (has no numeric certification and no US certification) for the test cases above.
EDIT
Here's a more modern version of your old format if you need a copy & paste solution:
Re: movie naming scheme that has the specialty of calculating a world average certification
Posted: 26 Aug 2026, 13:02
by cafevincent
Thank you, but I would rather it only averages the found numbers between 0-21, and if we can't get any resulting number this way then do not write the c## or the extra space at all, since we don't know if other countries have similar marking and what their corresponding numbers would be, and they could be changing all the time. Too much hassle to keep knowledgeable about all that, so let's stick to the facts and keep the results accurate and the code a bit easier to manage. I'm sorry for not being more verbal earlier.
Re: movie naming scheme that has the specialty of calculating a world average certification
Posted: 26 Aug 2026, 13:05
by cafevincent
That reminds me, it is possible to have an imdb entry where there are no imdb rating on it yet, so maybe that same logic (if no number then do not write the r##+space in the filename).
Re: movie naming scheme that has the specialty of calculating a world average certification
Posted: 26 Aug 2026, 15:29
by rednoah
cafevincent wrote: Yesterday, 13:02
I would rather it only averages the found numbers between 0-21
The code above does exactly that as far as I can tell.
cafevincent wrote: Yesterday, 13:05
if no number then do not write the r##+space in the filename
The code above uses
{rating} which is based on TMDB and thus never undefined.
Re: movie naming scheme that has the specialty of calculating a world average certification
Posted: 27 Aug 2026, 13:09
by cafevincent
It seems to replace my certification (c## = c for certification followed by 1-2 numbers which is the calculated average) with either NR, PG or R. Any of my attempts to fix the issue seems to make it worse.
Plus using your new version also gives me incorrect imdb ratings. For example The Dark Knight displays 8.5 instead of 9.1
Re: movie naming scheme that has the specialty of calculating a world average certification
Posted: 27 Aug 2026, 13:56
by rednoah
Can you give a few examples of movie + certification value that you want to see for that movie?
The new code will give you TMDB ratings, not IMDB ratings. We can change the code if you must have IMDB ratings (and account for IMDB rating not being available for the given TMDB ID).