From b0088aeeef33ddbad802797d82643175e3abcda3 Mon Sep 17 00:00:00 2001 From: Abdussamet Kocak Date: Fri, 24 Jul 2026 15:56:38 +0200 Subject: [PATCH] feat(file_renamer): Support more formats --- file_renamer.known.txt | 1005 ++++++++++++++++++++++++++++++++++++++++ file_renamer.py | 58 +-- file_renamer_test.py | 210 ++++++--- 3 files changed, 1182 insertions(+), 91 deletions(-) create mode 100644 file_renamer.known.txt diff --git a/file_renamer.known.txt b/file_renamer.known.txt new file mode 100644 index 0000000..9101d5c --- /dev/null +++ b/file_renamer.known.txt @@ -0,0 +1,1005 @@ + Abigail Mac + Aby Hazze + Ada Wong + Adara + Adel Morel + Adriana Maya + Aften Opal + Agatha Delicious + Aidra Allure + Aislin + Alana Rose + Aleksa Nicole + Alex De La Flor + Alex Jones + Alexa Payne + Alexa Throat + Alexis James + Alexis Kay + Ali Jones + Alica Wonderland + Alice Drake + Alice Hernandez + Alice Klay + Alice Maze + Alina Ali + Aliska Dark + All Three Holes + Allie Asia + Alyssa Reece + Alyx Star + Amber Adams + Amber Bloom + Amber Kawaii + Amber Slashh + Amhyra Shy + Amiee Cambridge + Amirah + Amy Gun + Ana Khalifa + Anais Amores + Anais Hayek + Anal Blonde + Andi Avalon + Angel Brill + Angel Emily Petite + Angel Gosta + Angel Smalls + Angelica Grays + Angelina Moon + Anie Darling + Anjelica + Ann Joy + Anna Di + Anna L + Anna Nicole + Anna Polina + Anna Swix + AnnaQ + Annabel Redd + Anne + Anni Star + Annie Charlotte + Anny Barbosa + Anton Harden + Anuskatzz Nux + Anya Volkova + Apolonia Lapiedra + Aprashay + April Maxima + Arabelle Raphael + Archer Ali + ArgenDana + Aria Banks + Aria Electra + Aria Lee + Aria Six + Aria Taylor + Ariana Aimes + Ariel + Artemisia + Ashby Winter + Ashley + Ashley Summer + Ashley Wilde + Ashly Rabbit + Aspen Ora + Asteria + Asuka Tenshi + Athena Fleurs + Athena May + Athenea Rose + Aubrey Lovelace + Aubry Babcock + Audrey Black + August Skye + Ava + Ava Davis + Ava Koxxx + Ava Sinclaire + Ava Stone + Avery Black + Avery Blue + Avery Pompas + Avery Wilds + Avi Love + Avrora Meey + Aya Benetti + Azazai Candee Licious + Azazai aka Zazie Skymm + Azul Hermosal + BBC Sheem + BBG + Babs + Baby Dahl + Baby Doll aka Miami + Baby Kitten + Baby Kxtten + Bailey Blaze + Balances + Bardot + Becky + Bee + Bella Blu + Bella Forbes + Bella Grey + Bella Mia + Bella Torres + BelleNiko + Bendy Babe + Benny Green + Beth + Beth Bennett + Betzz + Bianca + Bianca Demarchi + Big Dick Nick + Big Tit Babe + Blake Eden + Blue Butterfly + Bond + Bond With Jessy Jones + Bonnie Blue + Bootylinks + Brandi Love + Brandy Salazar + Brazzers + Breanna Arson + Bree Star + Breezy Bri + Brena Barbosa + Brennan Rush + Bridgette B + Briella Coley + Brookie Blair + Brooklyn Chase + Bruce Venture + Bubblezzz + Bunny Brownie + Busty Beauty + Busty Slut + Butt Plug + Cali Caliente + Cali Carter + Cali Sweets + Cammy White + Candee + Candy + Candy Love + Canfield + Capri Lmonde + Carla + Carla Cute Abels + Caroleta Roots + Cash + Cassidy Klein + Cassidy Luxe + Cast Della + Cate + Cece + Cerise Spice + Chanel Preston + Chanell Heart + Charlie Forde + Charlie Red + Charlotte Lapiedra + Charlotte Mae + Chelsea Baby + Chloe Lapiedra + Chloe Temple Cumming + Chocolate God + Chris Scandal + Christina Savoy + Cim + Cl_mence Audiard + Claire Ross + Clara + Clara Trinity Cumming + Clouds + Coco Bae + Coco Lovelock + Codey + Cody + Col Summer + Comatozze + Coochie + Corra Cox + Cory Amber + Cory Chase, Hazel Moore + Crystal Waters + Cum4K + Cumming + Cumming Latina + Cumming for Colombia + Cutie Kim + Cyber Doll + Daenerys + Dahi + Daisy + Daisy Dukes + Daisy Pheonix + Daisy Rae + Daisy Rae Em + Dakota + Dakota Charming + Dakota Quinn + Dakota Tylor + Damian + Damon + Dan Damage + Dana + Dana Dearmond + Danai Mari + Dani + Dani West + Daniela Garcia + Daphne + Daruma Rai + Darya Jane + Daydream Daisy + De.Laa + Deep + Deep Throat + Della + Desiree Dulce + Devine + Dez Hansen + Diamond Banks + Diana Daniels + Diana Rider + Dirty Danii + Dirtydanii + Dixie Jewel + Dolly Diore + Dulce Sofilie + Ebony Bombshell + Eden Ivy Dredd + Eden Ivy Edens + Eden Ivy Sweet + Egypt + Elie + Elina Sansd + Elis Benson + Elise Siswet + Eliz Benson + Ella Bonita + Elle Brooke + Elle Lee + Elle Marz + Ellie + Ellie Shou + Ellie Smoke + Ellie Tay + Ellys Evil Twin + Elsa + Elsie Shower + Ema Lee + Emily + Emily Belle + Emily Dredd + Emily Norman + Emily Pink Mell Blanco + Emily Vander + Emiri Momota Rikako Katayama + Emma Evans + Emma Hix Lily Lou Chloe + Erica Canfield + Erica Mori + Erin + Erin Everhart + Essie + Eva Angelina Angel Youngs + Eva Fay + Eva Perez + Eva Tender + Eve + Eve Lunny + Evelin Elle Kamy + Evelina Darling + Eveline Elle + Everhart + Evermore + Fabi Soul + Fan + FantasyBabe + Fibi + FilouFitt + Foxy + Foxy Dreams + Francesca Le + Francys Belle + FreakyT + Funsized Megan + Gabe + Gabi + Gal Richie + Gates + Gatita Veve + Gea + Georgia Koneva + Ghostface + Gia Dibella + Giaderzabooty + Gigi Lysette + Gigi Sweets + Gina + Ginger + Girls Love Their Legs + Girthmasterr + Gisele Blanco + Giuliana Cabrazia + Goddess Guzman + Goldie Rush + Gracie + Greedy Cheerleader + Gwen + Gypsy Rose Blonde + Hailey Sanders + Hannah Hayek + Hannah Quinn + Harley Love + Harper Red + Harrison Savannah + Haruka Suzuno + Hazel Dew + Hazel Grace + Hazel Moore aka Ellie + Hazel Paige + Heather Vahn + Helina + Helina Dream + Hera Big + Hera David + Hera Multi + Hera Sexual + HeyItzGigi + High Gear + Holli Riden + Honey + Honey Gold + Honey Ob + Honey Tsunami + Honour May + Hyley Winters + Indica + Indica Flower + Indra + Inga Tiny + Irina Telicheva + Isa Bella Tan + Isabel + Isabel Moon + Isabella Angelina + Isabella Lapiedra + Isabella Nice + Isabella de Laa + Isabelle Sky + Isiah + Ivan And Olli + Ivy + Ivy Maddox + Ivy Savannah + Izaram Gutierrez + Izzy Delphine + J.Mac + JMacsPOV + JOI Madison + Jack Melissa Stratton + Jack23 + Jada Cruz + Jada Kai + Jade Jaxx + Jade Kush + Jade Luv + Jade Reign + Jadilica Aka Leo Ahsoka + Jadilica Petite + Jadilica aka Leo Ahsoka + Jamie Lynn + Jasmine Jayne + Jason Luv + Jay Savage + Jayden Cole + Jazlin Ray + Jazmin + Jazmin Black + Jazz The Stallion + Jean + Jenna Foxx + Jenny Kitty + Jesse Jane + Jessica Marie Cumming + Jessica Ryan + Jessica Starling + Jessie Ames + Jessie Gapes + Jessie Rodgers + Jessie Saint + Jessie Way + Jessy Jey Dap + Jewel Diamant + Jewelz + Jill Dolly Dyson + Jmac + JmacsPov + Joanna Angel + JoleeLove + Jonathan Jordan + Jones + Jordan Maxx + Jordy Love + Josie Tucker + Joy + Joy Ride + Juh Jackson + Juliana + Julie Kay + Jupiter Jetson + Justine Jacobs + Kaby Snow + Kagney Linn + Kaia Martin + Kaira Love + Kait Glo + Kait Watch + Kali Kingsley + Kalina Ryu + Kamryn Jayde + Karen + Karina Mell + Karla Kush + Karmen Karma + Karter + Kasey Warner + Kate Dalia + Kate Quinn + Kathy Layne + Katie Kinz + Katrina Reed + Katty Soarez + Katty West + Katya Rodriguez + Kay Kay + Kayla East + Kayla Passionately + Kayley Gunnar + Kazumi Doshi + Kazumi Dressage + Kazumi Kazumi + Kazumi Surfbabe + Keiran Lee + Kelly Aleman + Kelly Stafford + Kendrick + Kenzie Love + Kenzie Madison + Khali Noire + Kianna Dior + Kiki King + Kimber Woods + Kimmie Haze + Kimora Quinn + Kira + Kira Fox + Kira Kyox + Kira Queen + Kira Thorn + Kissa + Kitana + Kitty Quinn + Kitty Wild + KittyKum + Kristen Scott Snow + Kristina Lust + Ksenia L + Kubera Fortuna + Kukupaiii + Kyaa Chimera + Kylie + Kylie Johnson + Kylie Page + Kylie Shay + Kylie Sinner + Kyra + Kyra Sex + La Fox + Lacy Lennon + Lady Ana + Lady Lyne + Lana + Lana Anal + Lana Gee + Lana Rose + Larkin Love + Laruna Mave + Laura S + Lawless + Lea Pam + Leah Winters + Leal + Leanne Lace + Leda Elizabeth Karma + Leila Botwin + Lena Anderson + Lena Coxx + Lena Reif + Lenina Crowne + Lera Murr (Nastya Polyakova) + Levi Luv + Lexi Belle + Lexi Luna + Lexi Smith + Lexington Steele + Lia Lin Trelawny + Lia Violet + Lika + Lika Starr + Lila Hayes + Lila Hayes Trimzz + Lila Lust + Lilith + Lilith Lieber + Lilli + Lillian Stone + Lilly + Lilly Charmelle + Lilly Jade + LillyyLuna Jack + Lily Adams + Lily Lebeau + Lily Lou Rich + Lily Rader + Lina Roselina + Lindsey + Liora Vane + Lisa Ann + Lisa Ann Mandigo + Little Caprice Nasstyx + Little Miss Busy + Litty Britty + Liv Wild + Livi Blossom + Lix + Lola Bradley + Lola Danger + Lola Grant + Lola Rose + London Laurant + London River + Lore Hot + Loren Sun + Lot Lizzard + Lovely + Lowtru + Lubed Genie + Lucianna Lucci + Lucid Bull + Lucky + Lucky Kay + Lucy Fox + Luna + Luna Blackx + Luna Rishi + Luna Roulette + Luxe + Luxury Girl + Lynn Train + Lysagna Del Ray + Lysagna Del Rey + Lysagna DelRay, Valerica Steele + Mae Milano + Magic Mannie + Magnolia + Malena + Mandy Waters + Manuel + ManuelFerraraTV + Manuels + Margo Von Teese + Maria + Maria Anjel + Maria Wars + Marie Dripping + Marie Goth + Marie Harlow + Marie Hime + Marika Milani + Marsha May + Martina Smeraldi + Mary Kalisy + Mary Popiense A + Matty 18 + Matty Can + Matty Love + Matty Sexy Brunette + Matty She + Matty Simon + Max Fills + MaxCartel Mells Blanco + Maximo + May Hashira + Mazy Myers + Mazzy Grace + Meagan Moore + Megan Faith + Megan Longoria + Megan Venturi + Megan Vs Wednesday + Meggan Mallone + MelRose Michaels + Melanie + Melanie Marie Cutie + Melissa Hot + Melissa Moore + Mellany + Mellany Lapiedra + Melody Parker + Melrose Michaels + Mercedes Mac + Mia Cheers + Mia Evans + Mia Grandy + Mia Julia + Mia Minou + Mia Molotov + Mia Trejsi + Michael + Michael Masters + Michaela Isizzu + Michelle Masque + Mih Ninfetinha + Mike Chapman + Mike Stefano + Mikey Star + Mila Koi + Milka + Milka Onyx + Milka Way + Milky + Milla Sexy + Mina Moreno + Mina Von D Minas + Mini Mitzi + Minililly + Mira + Mira Luv + Mischa Brooks + Misha Montana + Miss Sunset + MissLexa + Misty + Mleanie Marie + Molli + Molly Smith + Mollys Little + Mona Onyx + Monica Moon + Monika Fox + Monroe + Musa Phoenix + Muscle Mommy + My Cookie Jar + Myra Sure + Nadia Jay + Nadine Kerstas + Nala Brooks + Nami + Nancy A, Dominic Anne + Naomi Soraya Viper + Natalia A. + Natalie Brooke + Natalie Knight + Natalie Porkman + Natasha Rios + Natasha White + Nathan Bronson + Naty Evans + Nekane Sweet + Neko + Nelson Mandingo + Nelya A + Nelya Bound + Nesty + Nesty, Brandy + Nia Bleu + NickMarxx + Nickey Huntsman + Nicki Hunter + Nicky + Nico Robin + Nicole Aria Arias + Nicole Aria Park + Nicoledoshi + Nicolette Shea + Nigel + Niicky Baby + Niki Benz + Nikki + Nikki Hill + Nikki Sweet + Nikky Dream + Nikoleta + Niky Bimbodoll + Nina Costa + Nina Heels + Nina Nova + No Pushing Mongo + Nomi Melone + Norah Juliette + Nova Flame + Novella Night + NowFaceBaby + Octokuro Makima + Octokuro Shinobu Kocho + Odessa + Odessa Way + Odette Ortiz + Olivia Jayy + Olli And Ivans + Onyx Reign + Ophelia Dust + Ophelia K + Ophelia Purr + Orla Melissa + Oscar Battys + Paisley Porter + Paris Lincoln + PassionHD + Patty Michova + Paulina Soul + Payton + Pee + Penny Park + Petite + Petite Blonde + Petite Cutie + Petite Myra + Phantasia + Phoenix + Phoenix Marie + Pinky Promise + Poppy + Poppy Cox + Preslee + Pristine Edge + Proserpina Cabo Verde + Proxy Paige + Pufffypink + Putri Cinta + Queen Rogue + Queenie + Quinn + Quinn Saint + Quinton + Quintons + Qween Goddess + Rachel Steele + Raeley Love + Rafi + Raina + Raissa Bellini + Ramona Lapiedra + Rampant Redhead + Ranni + Raphael + Rara Knupps + Ray Collins + Raya Steele + Reagan Foxx + Realey Love + Rebecca + Rebel Lynn + Rebel Rhyder, Baby Kxtten + Reese + Reigns + Remy LaCroix + Remy Woods + Renata Fox + Renee Rose Smart + Renne Rose + Reya Sunshine + Reyna de la Cruz + Rez + Rob Piper + Roberta Faganelli + Rocky Emerson + Romy + Rosa Josefin + Rose Jane + Rose OB493 + Rossa Vaxx aka Rossavaxx + Rousse Black + Roxy Muray + Ruby + Ruby Moon + Ruby Sims + Rya + Ryan + Ryana + Ryana Montego + Ryder Rey + Sage + Sahara Skye + Sakura Hell + Salina Shein + Sam Bourne + Samantha + Samantha Cruuz + Samantha Reigns + Samantha Rouge + Samantha Saint + Sami Parker + Sandra Luberc + Sandra Sugar + Sandra Sweet + Sandralyd + Sandy + Sandy Love + Sara Bell + Sara Taylor + Sarah Cute + Sarah Lee + Sarah Taylor + Sasha Pearl + Sateen + Sav Shawz + Savanah Storm + Savannah Fox + Scarlett Sage + Scarlit + Selina Garcia + Selina Imai Sybian + Semilla + September Reign + Serina Gomez + Seth + Sexy Raven + Shaiden Rogue + Shalina + Shay + Sheena Shaw + Sheila Ortega + Shelena + Shelena Gorgeous + Sherice Sherice + Shiny Latina + Shrooms Q Savannah Storm + Shyla Jennings + Silencio + Silvia Dellai + Silvia Preslar + Simone + Sinderella + Size + Sky Bri + Skyler Nicole + Slim + Snatch + Sofi Adam + Sofi Adams + Sofi Ryan + Sofia + Sole Vargas + Sonny McKinley + Sooky Sin + Sophia Will + Sophie + Sophie Reade + Spiraling Spirit + Sporty Shorty + St. Martin + Stacy + Star + Stella Sedona + Stella Shes.A Femme Fatale + Stepsons + Stunning Brunette + Subil Arch + Summer Blonde + Summer Col + Summer Handle + Summer Kline + Summer Thirsty + Sunny Goldmelons + Super Nova + Susie Stellar + Suttin + Sweet Blowjob + Sybian + Sybil Alissa + Sybil Angel + Sybil Cream + Sybil La Sirena + Sybil Little + Sybil The Naked + Sylvia + Sylvia Wise + Tabatha + Talia Mint + Tatiana + Tatiana Blow + Tatiana MedellĂ­n + Taya Sour + Taylor Vixxen + Tea Mint + Teanna Trump + Teeny Passion + Telari Love + Teti + Thawany Alves + Thayana Babyy + The + The Dan + The Official Egypt + Thea Summers + Throatfuck + Tia Maria + Tiger Lilly + Tina Yoshi + Tiny Beauty + Tiny Brunnete + Tiny Jetsetter + Tommy Wood + Tropi + Tru + TxSnacks + Tyler + Umbria + Una Fairy + Useful + Val Steele + Valentina + Valentine + Van + Vanessa Angel + Vanessa Hillz + Vanessa Sky Brat + Vanna + Vanna Bardot Cumming + Vanna Bordot + Vasya + Venus + Venus Vera + Veronica Mendo + Vic Ass + Victoria Lobov + Viktoriia + Vinna Reed + Viola Cami + Viola Weber + Vivian Fox + Vivian Grace + Vivianne De Silva + Vivien Doll + Vixi + Volpetti + Wendy Raine + Whitney Westgate + Whitney Wright + Windell + Winter + Winter Jade + Winter Princess + Wisconsin Tiff + Wynn Rider + Xochi Moon + Xxlayna Marie Dredd + Yae + Yana West + Yazmin Royal + Yeye Guzman + Yoganna + Yogi Masters + Yorgelis Carrillo + Young Beauty + Zac Wilds + Zane + Zara Durose + Zazie + Ziggy Star + Zoe Clark + Zoe Grey + Zoey Di Giacomo + Zoey Luna Girthmasterr + Zoomer Girl Milka + lilijunex diff --git a/file_renamer.py b/file_renamer.py index 2c6f258..3597653 100755 --- a/file_renamer.py +++ b/file_renamer.py @@ -62,7 +62,9 @@ def parse_date(filename: str) -> ParsedDate | None: def from_us_format(): match = re_date_us.search(filename) m, d, y = map(int, match.groups()) - return ParsedDate(datetime.date(y + 2000, m, d), start=match.start(), end=match.end()) + return ParsedDate( + datetime.date(y + 2000, m, d), start=match.start(), end=match.end() + ) def from_iso(): match = re_date_iso.search(filename) @@ -72,7 +74,9 @@ def parse_date(filename: str) -> ParsedDate | None: def from_iso_short(): match = re_date_iso_short.search(filename) y, m, d = map(int, match.groups()) - return ParsedDate(datetime.date(y + 2000, m, d), start=match.start(), end=match.end()) + return ParsedDate( + datetime.date(y + 2000, m, d), start=match.start(), end=match.end() + ) def from_iso_reversed(): match = re_date_iso_rev.search(filename) @@ -82,7 +86,9 @@ def parse_date(filename: str) -> ParsedDate | None: def from_iso_reversed_short(): match = re_date_iso_rev_short.search(filename) d, m, y = map(int, match.groups()) - return ParsedDate(datetime.date(y + 2000, m, d), start=match.start(), end=match.end()) + return ParsedDate( + datetime.date(y + 2000, m, d), start=match.start(), end=match.end() + ) candidates = [] for fn in [ @@ -101,7 +107,9 @@ def parse_date(filename: str) -> ParsedDate | None: today = datetime.date.today() future_threshold = today + datetime.timedelta(days=60) past_threshold = datetime.date(2010, 1, 1) - candidates = [it for it in candidates if past_threshold < it.date < future_threshold] + candidates = [ + it for it in candidates if past_threshold < it.date < future_threshold + ] if not candidates: return @@ -139,23 +147,9 @@ def trash(path: Path): subprocess.run(cmd).check_returncode() -def filenames_to_actors(): - sources = [ - Path(r"/Users/abdus/Downloads/temp/"), - Path(r"/Volumes/BANDAID/_temp/__reenc/"), - Path(r"/Volumes/BANDAID/_temp/"), - ] - actors = set() - for it in sources: - for f in it.glob("*.mp4"): - if not f.is_file(): - continue - if r := parse_release(f.name): - actors.update(r.actors) - return actors - - -def parse_release(filename: str, known_actors: set[str] | None = None) -> Release | None: +def parse_release( + filename: str, known_actors: set[str] | None = None +) -> Release | None: if not known_actors: known_actors = set() if any(filename.lower().endswith(ext) for ext in [".mp4", ".mkv"]): @@ -174,7 +168,9 @@ def parse_release(filename: str, known_actors: set[str] | None = None) -> Releas title=title, released_at=datetime.date.fromisoformat(date), ) - case [actors, studio, date] if studio.startswith("@") and (parsed := parse_date(date)): + case [actors, studio, date] if studio.startswith("@") and ( + parsed := parse_date(date) + ): return Release( actors=sorted(actors.split(", ")), studio=studio.removeprefix("@"), @@ -210,14 +206,20 @@ def parse_release(filename: str, known_actors: set[str] | None = None) -> Releas # assert '.PRT' in filename remaining = re.sub(r"\.(720p|1080p|HEVC|x265|PRT|XXX)", " ", filename) studio = remaining[: remaining.index(".")] + remaining = remaining[len(studio) :] parsed_date = parse_date(remaining) - remaining = remaining[parsed_date.end :] + if parsed_date: + remaining = remaining[parsed_date.end :] remaining = re.sub(r"[. ]+", " ", remaining).strip() actors = [] title = None + # PornFidelity.E1109.Uma.Jolie match remaining.split(" "): + case [episode, *names] if episode.startswith("E") and episode[1:].isdigit(): + title = episode + actors = [" ".join(names)] case [a_first, a_last, "And", b_first, b_last]: actors = [f"{a_first} {a_last}", f"{b_first} {b_last}"] case [a_first, a_last, "And", b_first, b_last, *rest]: @@ -235,16 +237,12 @@ def parse_release(filename: str, known_actors: set[str] | None = None) -> Releas studio=studio, actors=sorted(actors), title=title, - released_at=parsed_date.date, + released_at=parsed_date.date if parsed_date else None, ) - def from_galaxxxy(): - pass - for fn in [ from_own, from_prt, - from_galaxxxy, ]: try: if res := fn(): @@ -255,7 +253,9 @@ def parse_release(filename: str, known_actors: set[str] | None = None) -> Releas def parse_args(): arger = argparse.ArgumentParser() - arger.add_argument("filenames", nargs="+", type=lambda v: Path(v).resolve(), help="Filenames") + arger.add_argument( + "filenames", nargs="+", type=lambda v: Path(v).resolve(), help="Filenames" + ) return arger.parse_args() diff --git a/file_renamer_test.py b/file_renamer_test.py index 4166a94..0c40f60 100644 --- a/file_renamer_test.py +++ b/file_renamer_test.py @@ -43,8 +43,8 @@ from file_renamer import Release ], [ "DadCrush.21.10.09.Ailee.Anne.My.Stepdaughters.Hot.XXX.1080p.HEVC.x265.PRT.mp4", - datetime.date(2021, 10, 9) - ] + datetime.date(2021, 10, 9), + ], ], ) def test_parse_date(filename: str, date: datetime.date | None): @@ -57,68 +57,154 @@ def test_parse_date(filename: str, date: datetime.date | None): assert parsed.date == date -@pytest.mark.parametrize(['filename', 'expected'], [ +@pytest.mark.parametrize( + ["filename", "expected"], [ - 'PenthouseGold.23.02.05.Tiffany.Tatum.XXX.720p.HEVC.x265.PRT', - Release(studio='DoctorAdventures', actors=['Jamie Michelle'], title='Nurse Jamie Knows Best', released_at=datetime.date(2021, 5, 26)), + [ + "PornFidelity.E1109.Uma.Jolie.XXX.720p.HEVC.x265.PRT", + Release( + studio="PornFidelity", + actors=["Uma Jolie"], + title="E1109", + ), + ], + [ + "PenthouseGold.23.02.05.Tiffany.Tatum.XXX.720p.HEVC.x265.PRT", + Release( + studio="DoctorAdventures", + actors=["Jamie Michelle"], + title="Nurse Jamie Knows Best", + released_at=datetime.date(2021, 5, 26), + ), + ], + [ + "Rebecca Volpetti -- @RealityKings -- Driving Him Crazy [1080p, x265] -- 2019-04-10", + Release( + actors=["Rebecca Volpetti"], + studio="RealityKings", + title="Driving Him Crazy", + released_at=datetime.date(2019, 4, 10), + ), + ], + [ + "Liz Jordan -- @Lubed -- Sopping Oil -- 2023-02-07 [1080p, x265]", + Release( + actors=["Liz Jordan"], + studio="Lubed", + title="Sopping Oil", + released_at=datetime.date(2023, 2, 7), + ), + ], + [ + "Liz Jordan--@Lubed--Sopping Oil--2023-02-07 [1080p, x265]", + Release( + actors=["Liz Jordan"], + studio="Lubed", + title="Sopping Oil", + released_at=datetime.date(2023, 2, 7), + ), + ], + [ + "Liz Jordan -- @Lubed -- 2023-02-07 [1080p, x265]", + Release( + actors=["Liz Jordan"], + studio="Lubed", + title=None, + released_at=datetime.date(2023, 2, 7), + ), + ], + [ + "Liz Jordan -- Sopping Oil -- 2023-02-07 [1080p, x265]", + Release( + actors=["Liz Jordan"], + studio=None, + title="Sopping Oil", + released_at=datetime.date(2023, 2, 7), + ), + ], + [ + "Liz Jordan -- Sopping Oil", + Release( + actors=["Liz Jordan"], + studio=None, + title="Sopping Oil", + released_at=None, + ), + ], + [ + "DadCrush.21.10.09.Ailee.Anne.My.Stepdaughters.Hot.XXX.1080p.HEVC.x265.PRT.mp4", + Release( + studio="DadCrush", + actors=["Ailee Anne"], + title="My Stepdaughters Hot", + released_at=datetime.date(2021, 10, 9), + ), + ], + [ + "Deeper.21.11.11.Kenzie.Anne.XXX.1080p.HEVC.x265.PRT.mkv", + Release( + studio="Deeper", + actors=["Kenzie Anne"], + title=None, + released_at=datetime.date(2021, 11, 11), + ), + ], + [ + "DevilsFilm.22.03.19.Kira.Noir.Wife.Swap.Schemes.2.XXX.1080p.HEVC.x265.PRT.mkv", + Release( + studio="DevilsFilm", + actors=["Kira Noir"], + title="Wife Swap Schemes 2", + released_at=datetime.date(2022, 3, 19), + ), + ], + [ + "DogHouseDigital.22.04.06.Maddy.May.Full.Service.Massage.XXX.1080p.HEVC.x265.PRT.mkv", + Release( + studio="DogHouseDigital", + actors=["Maddy May"], + title="Full Service Massage", + released_at=datetime.date(2022, 4, 6), + ), + ], + [ + "EvilAngel.22.04.05.Diana.Grace.XXX.1080p.HEVC.x265.PRT.mkv", + Release( + studio="EvilAngel", + actors=["Diana Grace"], + title=None, + released_at=datetime.date(2022, 4, 5), + ), + ], + [ + "Slayed.21.10.07.Izzy.Lush.And.Aidra.Fox.XXX.1080p.HEVC.x265.PRT.mkv", + Release( + studio="Slayed", + actors=["Aidra Fox", "Izzy Lush"], + title=None, + released_at=datetime.date(2021, 10, 7), + ), + ], + [ + "ExploitedCollegeGirls.22.06.30.Gaby.XXX.1080p.HEVC.x265.PRT.mkv", + Release( + studio="ExploitedCollegeGirls", + actors=["Gaby"], + title=None, + released_at=datetime.date(2022, 6, 30), + ), + ], + [ + "DoctorAdventures.21.05.26.Jamie.Michelle.Nurse.Jamie.Knows.Best.PRT.mp4", + Release( + studio="DoctorAdventures", + actors=["Jamie Michelle"], + title="Nurse Jamie Knows Best", + released_at=datetime.date(2021, 5, 26), + ), + ], ], - [ - 'Rebecca Volpetti -- @RealityKings -- Driving Him Crazy [1080p, x265] -- 2019-04-10', - Release(actors=['Rebecca Volpetti'], studio='RealityKings', title='Driving Him Crazy', released_at=datetime.date(2019, 4, 10)), - ], - [ - 'Liz Jordan -- @Lubed -- Sopping Oil -- 2023-02-07 [1080p, x265]', - Release(actors=['Liz Jordan'], studio='Lubed', title='Sopping Oil', released_at=datetime.date(2023, 2, 7)), - ], - [ - 'Liz Jordan--@Lubed--Sopping Oil--2023-02-07 [1080p, x265]', - Release(actors=['Liz Jordan'], studio='Lubed', title='Sopping Oil', released_at=datetime.date(2023, 2, 7)), - ], - [ - 'Liz Jordan -- @Lubed -- 2023-02-07 [1080p, x265]', - Release(actors=['Liz Jordan'], studio='Lubed', title=None, released_at=datetime.date(2023, 2, 7)), - ], - [ - 'Liz Jordan -- Sopping Oil -- 2023-02-07 [1080p, x265]', - Release(actors=['Liz Jordan'], studio=None, title='Sopping Oil', released_at=datetime.date(2023, 2, 7)), - ], - [ - 'Liz Jordan -- Sopping Oil', - Release(actors=['Liz Jordan'], studio=None, title='Sopping Oil', released_at=None), - ], - [ - 'DadCrush.21.10.09.Ailee.Anne.My.Stepdaughters.Hot.XXX.1080p.HEVC.x265.PRT.mp4', - Release(studio='DadCrush', actors=['Ailee Anne'], title='My Stepdaughters Hot', released_at=datetime.date(2021, 10, 9)) - ], - [ - 'Deeper.21.11.11.Kenzie.Anne.XXX.1080p.HEVC.x265.PRT.mkv', - Release(studio='Deeper', actors=['Kenzie Anne'], title=None, released_at=datetime.date(2021, 11, 11)), - ], - [ - 'DevilsFilm.22.03.19.Kira.Noir.Wife.Swap.Schemes.2.XXX.1080p.HEVC.x265.PRT.mkv', - Release(studio='DevilsFilm', actors=['Kira Noir'], title='Wife Swap Schemes 2', released_at=datetime.date(2022, 3, 19)), - ], - [ - 'DogHouseDigital.22.04.06.Maddy.May.Full.Service.Massage.XXX.1080p.HEVC.x265.PRT.mkv', - Release(studio='DogHouseDigital', actors=['Maddy May'], title='Full Service Massage', released_at=datetime.date(2022, 4, 6)), - ], - [ - 'EvilAngel.22.04.05.Diana.Grace.XXX.1080p.HEVC.x265.PRT.mkv', - Release(studio='EvilAngel', actors=['Diana Grace'], title=None, released_at=datetime.date(2022, 4, 5)), - ], - [ - 'Slayed.21.10.07.Izzy.Lush.And.Aidra.Fox.XXX.1080p.HEVC.x265.PRT.mkv', - Release(studio='Slayed', actors=['Aidra Fox', 'Izzy Lush'], title=None, released_at=datetime.date(2021, 10, 7)), - ], - [ - 'ExploitedCollegeGirls.22.06.30.Gaby.XXX.1080p.HEVC.x265.PRT.mkv', - Release(studio='ExploitedCollegeGirls', actors=['Gaby'], title=None, released_at=datetime.date(2022, 6, 30)), - ], - [ - 'DoctorAdventures.21.05.26.Jamie.Michelle.Nurse.Jamie.Knows.Best.PRT.mp4', - Release(studio='DoctorAdventures', actors=['Jamie Michelle'], title='Nurse Jamie Knows Best', released_at=datetime.date(2021, 5, 26)), - ], -]) +) def test_parse_release(filename: str, expected): parsed = file_renamer.parse_release(filename) assert parsed == expected