Skip to content

Commit

Permalink
version 1.4.2
Browse files Browse the repository at this point in the history
+ Added
	- Sports: NJPW
	- Game groups: BFHiSO, BReWErS, CLONECD, CUBiC, CXZiSO, DARKZER0, DEViANCE, DVN, DYNAMIX, gimpsRus, GMiSO, HBD, HYBRID, iMMERSiON, MYSTERY, MYTH, PiZZA, PWZ, razorcd, RiTUEL, Souldrinker, TDUJAM, TECHNiC, TNT
	- App groups: AGAiN, BRD, CADZ, CROSSFiRE, DAMN, DiSTiNCT, DSi, dT, ECU, ECZ, ENFUSiA, HERiTAGE, iNFECTED, LaTeX, LUCiD, MAS, MIDNIGHT, NiTROUS, PROPHECY, RENEGADE, RiSE, ROR, RORiSO, SCOTCH, SCRiPTMAFiA, SoSISO, SSG, TEDOX, TFTDOX, TZ7iSO, UnderPl, ZWT, ZWTiSO
	- Bookware: ActualTests, Fravo, Pass4sure, testking, Testnow, Skillsoft
~ Improved
	- Sports: Nascar, V8 Supercars, Rugby, IPL, NRL, BBL, Olympics, WWE, Boxing
	- Multi lang
	- Patterns at the end of release name
	- CD EP source
	- Saturn device pattern
	- DiVX format pattern
  • Loading branch information
pr0pz committed Sep 23, 2023
1 parent 9ae93da commit abb1411
Show file tree
Hide file tree
Showing 4 changed files with 45 additions and 28 deletions.
6 changes: 3 additions & 3 deletions ReleaseParser.php
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
*
* @package ReleaseParser
* @author Wellington Estevo
* @version 1.4.1
* @version 1.4.2
*/

class ReleaseParser extends ReleasePatterns
Expand Down Expand Up @@ -1628,7 +1628,7 @@ private function parseAttribute( array $attribute, string $type = '' )
if ( \str_contains( $pattern, '$' ) )
{
$pattern = \str_replace( '$', '', $pattern );
$regex_pattern = '/' . $separators . $pattern . '-(?:[\w.-]+){1,2}$/' . $flags;
$regex_pattern = '/' . $separators . $pattern . '(?:-[\w.]+){1,2}$/' . $flags;

// Check if pattern is inside release name
\preg_match( $regex_pattern, $release_name_cleaned, $matches );
Expand All @@ -1643,7 +1643,7 @@ private function parseAttribute( array $attribute, string $type = '' )
// Check if is last keyword before group
if ( empty( $matches ) )
{
$regex_pattern = '/' . $separators . $pattern . '-(?:[\w.-]+){1,2}$/' . $flags;
$regex_pattern = '/' . $separators . $pattern . '(?:-[\w.]+){1,2}$/' . $flags;
\preg_match( $regex_pattern, $release_name_cleaned, $matches );
}

Expand Down
47 changes: 24 additions & 23 deletions ReleasePatterns.php
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
*
* @package ReleaseParser
* @author Wellington Estevo
* @version 1.4.1
* @version 1.4.2
*/

class ReleasePatterns {
Expand Down Expand Up @@ -122,7 +122,7 @@ class ReleasePatterns {
'CAM' => '(?:new)?cam([._-]?rip)?',
'CBS' => 'CBS', // CBS Corporation (P2P)
'CD Album' => '\d*cda', // CD Album
'CD EP' => 'cdep',
'CD EP' => '\d*cd.?ep',
'CD Single' => [ 'cds', '(?:cd[._-]?)single' ], // CD Single
'Comedy Central' => 'CC', // (P2P)
'Console Disc' => [ 'xbox.*dvd[r\d]*', 'dvd[r\d]*.*xbox', 'cd.*xbox', 'ps2.?dvd[r\d]*', 'ps3.?bd[r\d]*', '(?:blue?ray).*ps3', 'xbox360.?dvd[r\d]*', 'Wii[iu]?(.?dvd[r\d]?)' ],
Expand Down Expand Up @@ -215,7 +215,7 @@ class ReleasePatterns {
'XViD' => 'XViD',
// Type of Divx codecs:
// SBC (Smart bitrate control), VKI (Variable Keyframe Intervals), MM4
'DiVX' => [ 'DiVX\d*', 'VKI', 'SBC', 'MM4' ],
'DiVX' => [ '(?:DV)?DiVX\d*', 'VKI', 'SBC', 'MM4' ],
'x264' => 'x\.?264',
'x265' => 'x\.?265',
'h264' => 'h\.?264',
Expand Down Expand Up @@ -360,15 +360,15 @@ class ReleasePatterns {
'Sega Dreamcast' => [ 'DC$', 'DREAMCAST' ],
'Sega Mega CD' => 'MEGACD',
'Sega Mega Drive' => 'SMD',
'Sega Saturn' => 'SATURN',
'Sega Saturn' => 'SATURN$',
'Tiger Telematics Gizmondo' => 'GIZMONDO',
'VTech V.Flash' => 'VVD',
'Microsoft Xbox' => 'xbox(?:.?dvdr?i?p?\d?|rip|full|cd|manual|pack)?',
'Microsoft Xbox One' => 'XBOXONE',
'Microsoft Xbox360' => [ 'XBOX.?360(?:.?dvd)?', 'X360' ],
// Higher prio (last has higher prio) for Wii + NDS, because of virtual console and release titles containing older consoles
'Nintendo DS' => 'N3?DS(?:.dsi)?',
'Nintendo 3DS' => '(?:vc[._](?:\w+[._])?)?3DS(?!.max|max|.max\d|max\d)(?:ware)?',
'Nintendo DS' => '3?DS(?:.dsi)?',
'Nintendo 3DS' => '(?:vc[._](?:\w+[._])?|new|n)?3DS(?!.max|max|.max\d|max\d)(?:ware)?',
'Nintendo WII' => '(?:vc[._](?:\w+[._])?)?Wiii?(.?dvd[r\d]?|clone|ware)?',
'Nintendo WII-U' => '(?:vc[._](?:\w+[._])?)?WII[._-]?U',
];
Expand Down Expand Up @@ -456,7 +456,7 @@ class ReleasePatterns {
'vi' => 'Vietnamese',
'zh' => [ 'Chinese', 'CH[ST]' ],
// Misc
'multi' => [ 'Multilingual', 'Multi.?(?:languages?|lang|\d*)?', 'EURO?P?A?E?', '(?<!WEB.)[MD]L', 'DUAL(?!.Audio)' ],
'multi' => [ 'Multilingual', 'Multi.?(?:languages?|lang|lingual|\d*)?', 'EURO?P?A?E?', '(?<!WEB.)[MD]L', 'DUAL(?!.Audio)' ],
'nordic' => [ 'Nordic', 'SCANDiNAViAN' ]

];
Expand Down Expand Up @@ -580,7 +580,7 @@ class ReleasePatterns {
'Trackfix' => 'TRACK.?FiX', // Music
'Trailer' => 'TRAILER',
'TRAiNER' => 'Trainer(?!.XXX)(?:.(?:%flags%))?',
'Tutorial' => 'TUTORIAL',
'Tutorial' => 'TUT(?:ORIALS?)?',
'TV Dubbed' => 'tv.?dubbed',
'Unabridged' => [ 'UNABRIDGED', 'Ungekuerzt' ], // Audiobook
'Uncensored' => 'UNCENSORED',
Expand Down Expand Up @@ -655,12 +655,12 @@ class ReleasePatterns {
'afc.asian', // Asian
'match.of.the.day', // Misc football
// Racing
'Formul[ae].?[1234E].\d{4}', 'Formel.?[1234E].\d{4}', '(?:british.)?F\d.\d{4}',
'Superleague.Formula', 'Nascar.(?:cup|truck|xfinity)', 'Indycar\.(series|racing|\d{4})',
'Formul[ae].?[1234E].\d{4}', 'Formel.?[1234E].\d{4}', '(?:british.)?F\d.\d{4}.Grosser',
'Superleague.Formula', 'Nascar.(?:cup|truck|xfinity|monster|raceday|camping|america|sprint|nextel|busch|\d{4})', 'Indycar\.(series|racing|\d{4})',
'DTM.(\d{2,4}|spa|lauszitzring|gp\d+|\d+.lauf)', // Deutsche Tourenwagen Masters
'DTC.\d{4}', // Danish Touringcar Championship
'wrc.(?:fia|\d{4})', // Rallye
'Supercars.championship', 'V8.Supercars', 'Porsche.(Carrera|sprint)', 'Volkswagen.Racing.Cup', 'W.series.\d{4}',
'Supercars.championship', 'V8.Supercars.\d{4}', 'Porsche.(Carrera|sprint)', 'Volkswagen.Racing.Cup', 'W.series.\d{4}',
'Moto.?(GP|\d).\d{4}',
// Cycling
'Cycling.(?:volta|giro|tour|strade|paris|criterium|liege|fleche|amstel|la.vuelta)', // International
Expand All @@ -670,28 +670,29 @@ class ReleasePatterns {
'UCI', // International
// Rugby
'rugby.\d{4}',
'(?:Super.|international.)?rugby(.world.cup|.championship|.pacific|.aupiki|.league|.league.test.match)',
'IPL', // India
'NRL', // Australasian
'(?:Super.|international.)?rugby(.world.cup|.championship|.pacific|.aupiki|.league.(?:test.match|anzak|challenge|nsw|four|toyota|trans|state|super|womens|international|world|\d{4}))',
'IPL.\d{4}', // India
'NRL.(\d{4}|state)', // Australasian
// Basketball
'NBA.(?:\d{4}.)?(?:East|eastern|West|western|Finals|playoffs|\d{2}.\d{2})', 'WNBA.\d{4}', 'Eurocup',
// Cricket
'T20', 'BBL',
'T20', 'BBL.\d{4}',
// American Football
'NFL.(?:pre.?season|super.bowl|pro.bowl|conference|divisional|wild.card|[an]fc|football|week\d+|\d{4})',
// Wrestle
'wwe.(?:nxt|friday|this|main|monday|wrestlemania)', 'aew.(?:collision|dynamite|dark)', 'New.Japan.Pro-Wrestling', 'Game.changer.wrestling',
'wwe.(?:nxt|friday|this|main|monday|wrestlemania|velocity|raw|smackdown|confidential|heat)', 'aew.(?:collision|dynamite|dark)', 'New.Japan.Pro.Wrestling', 'NJPW', 'Game.changer.wrestling',
// Icehockey
'NHL\.(?:\d{4}|stanley.cup|playoffs)',
'Elitserien', // Swedish icehockey
// Baseball
'MLB.(?:\d{4}|spring|world.series|pre.?season|playoffs|ws|alcs)',
// Fighting
'boxing.\d{4}.\d{2}.\d{2}', 'Grand.Sumo', 'UFC.(\d+|on.espn|fight.night)',
'(hbo.|uk.)?boxing.\d{4}.\d{2}.\d{2}', 'Grand.Sumo', 'UFC.(\d+|on.espn|fight.night)',
// Olympics
'\w+.winter.(paralympics|olympics)',
'(\w+.)?(?:winter|summer).(paralympics|olympics)',
'\w+.(paralympics|olympics)',
// Tennis
'wimbledon.(?:tennis.)?\d{4}', 'us.open.\d{4}', 'french.open(?:.tennis)?.\d{4}', 'australien.open', 'WTA.\d{4}',
'wimbledon.(?:tennis.)?\d{4}', 'us.open.\d{4}', 'french.open(?:.tennis)?.\d{4}', 'australian.open', 'WTA.\d{4}',
// eSports
'LPL.PRO',
// World cup of whatever
Expand All @@ -700,15 +701,15 @@ class ReleasePatterns {

// Bookware/elearning platforms
const BOOKWARE = [
'Artstation', 'Ask.?video', 'Bassgorilla', 'Career.Academy', 'CBT.?Nuggets', 'CG.?(Circuit|workshops?|cookie)', 'Cloud.academy', 'CreativeLive', 'Digital.?tutors', 'Foundation.patreon', 'Groove3', 'Gumroad', 'Infinite.?skills', 'Kelby.?Training', 'LinkedIn(?:.learning)?', 'Lynda(?:.com)?', 'MacProVideo.com', 'Mixwiththemasters', 'Mycodeteacher.com', 'ostraining', 'packt', 'PluralSight', 'PSD.tutorials', 'Retouching.Academy', 'Skillshare', 'skillfeed', 'Sonic.academy', 'Syngress', 'teamtreehouse', 'Trainsignal', 'Train.?simple', 'Tutsplus', 'Video2Brain', 'Videomaker.com', 'Udemy(?:.com)?'
'Actualtests', 'Artstation', 'Ask.?video', 'Bassgorilla', 'Career.Academy', 'CBT.?Nuggets', 'CG.?(Circuit|workshops?|cookie)', 'Cloud.academy', 'CreativeLive', 'Digital.?tutors', 'Fravo', 'Foundation.patreon', 'Groove3', 'Gumroad', 'Infinite.?skills', 'Kelby.?Training', 'LinkedIn(?:.learning)?', 'Lynda(?:.com)?', 'MacProVideo.com', 'Mixwiththemasters', 'Mycodeteacher.com', 'ostraining', 'packt', 'Pass4sure', 'PluralSight', 'PSD.tutorials', 'Retouching.Academy', 'Skillshare', 'skillfeed', 'Skillsoft', 'Sonic.academy', 'Syngress', 'teamtreehouse', 'Testking', 'Testnow', 'Trainsignal', 'Train.?simple', 'Tutsplus', 'Video2Brain', 'Videomaker.com', 'Udemy(?:.com)?'
];

const GROUPS_GAMES = [
'0x0007', '0x0815', '1C', 'ABSiSO', 'ACTiVATED', 'ADDONiA', 'ALiAS', 'ANOMALY', 'AUGETY', 'AVENGED', 'BACKLASH', 'bADkARMA', 'Bamboocha', 'BAT', 'BAZOOKA', 'BiTE', 'BLASTCiTY', 'BREW[SZ]', 'CiFE', 'CLS', 'CODEX', 'COGENT', 'DARKSiDERS', 'DELiGHT', 'DINOByTES', 'DOGE', 'DVNiSO', 'ENiGMA', 'FANiSO', 'FAS', 'FASiSO', 'FASDOX', 'FCKDRM', 'FLT', 'FLTDOX', 'GENESIS', 'GOW', 'GREENPEACE', 'HATRED', 'HEiST', 'HI2U', 'HOODLUM', 'HR', 'I_KnoW', 'iNLAWS', 'iTWINS', 'JAGDOX', 'JAGUAR', 'LiGHTFORCE', 'LUMA', 'MONEV', 'NiiNTENDO', 'NNSSWW', 'OUTLAWS', 'PiKMiN', 'PiMoCK', 'PiZZADOX', 'PLAZA', 'POSTMORTEM', 'PRELUDE', 'PROPHET', 'PS5B', 'PUSSYCAT', 'TENOKE', 'THG', 'TiNYiSO', 'TRSi', 'TSC', 'RELOADED', 'RAZOR', 'Razor1911', 'RazorDOX', 'RUNE', 'SCRUBS', 'SiLENTGATE', 'SiMPLEX', 'SKIDROW', 'SMACKs', 'SPLATTER', 'SPLATTERKiNGS', 'STEAMPUNKS', 'SUXXORS', 'VACE', 'VENGEANCE', 'VENOM', 'ViTALiTY', 'VREX', 'Unleashed', 'YOUCANTNUKE', 'ZEKE'
'0x0007', '0x0815', '1C', 'ABSiSO', 'ACTiVATED', 'ADDONiA', 'ALiAS', 'ANOMALY', 'AUGETY', 'AVENGED', 'BACKLASH', 'bADkARMA', 'Bamboocha', 'BAT', 'BAZOOKA', 'BFHiSO', 'BiTE', 'BLASTCiTY', 'BReWErS', 'BREWS', 'BREWZ', 'CiFE', 'CLONECD', 'CLS', 'CODEX', 'COGENT', 'CUBiC', 'CXZiSO', 'DARKSiDERS', 'DARKZER0', 'DELiGHT', 'DEViANCE', 'DINOByTES', 'DOGE', 'DVN', 'DVNiSO', 'DYNAMIX', 'ENiGMA', 'FANiSO', 'FAS', 'FASiSO', 'FASDOX', 'FCKDRM', 'FLT', 'FLTDOX', 'GENESIS', 'gimpsRus', 'GMiSO', 'GOW', 'GREENPEACE', 'HATRED', 'HBD', 'HEiST', 'HI2U', 'HOODLUM', 'HR', 'HYBRID', 'I_KnoW', 'iMMERSiON', 'iNLAWS', 'iTWINS', 'JAGDOX', 'JAGUAR', 'LiGHTFORCE', 'LUMA', 'MONEV', 'MYSTERY', 'MYTH', 'NiiNTENDO', 'NNSSWW', 'OUTLAWS', 'PiKMiN', 'PiMoCK', 'PiZZA', 'PiZZADOX', 'PLAZA', 'POSTMORTEM', 'PRELUDE', 'PROPHET', 'PS5B', 'PUSSYCAT', 'PWZ', 'TENOKE', 'TENOKE1', 'THG', 'TiNYiSO', 'TRSi', 'TSC', 'RELOADED', 'RAZOR', 'Razor1911', 'RAZORCD', 'RazorDOX', 'ReVOLVeR', 'RiTUEL', 'RUNE', 'SCRUBS', 'SiLENTGATE', 'SiMPLEX', 'SKIDROW', 'SMACKs', 'Souldrinker', 'SPLATTER', 'SPLATTERKiNGS', 'STEAMPUNKS', 'SUXXORS', 'TDUJAM', 'TECHNiC', 'TEDOX', 'TNT', 'VACE', 'VENGEANCE', 'VENOM', 'ViTALiTY', 'VREX', 'Unleashed', 'YOUCANTNUKE', 'ZEKE'
];

const GROUPS_APPS = [
'ACME', 'AMPED', 'BLiZZARD', 'BTCR', 'BTCRiSO', 'CAFE', 'CaviaR', 'CODEX', 'CORE', 'CRD', 'CYGiSO', 'DARKLEASH', 'DIGERATI', 'DVT', 'ECLiPSE', 'EMBRACE', 'EPS', 'EXPLOSiON', 'F4CG', 'FALLEN', 'FCN', 'iNTENSiON', 'ISO', 'ISOBelix', 'LAXiTY', 'LND', 'Lz0', 'Lz0PDA', 'MASCHiNE', 'MAGNiTUDE', 'MSGPDA', 'MYTH', 'NGEN', 'ORiON', 'PARADOX', 'PGC', 'rG', 'RINDVIEH', 'RLTS', 'SCOTCH', 'SONiTUS', 'TBE', 'TE', 'TFTISO', 'TMG', 'TNO', 'TSZ', 'ViRiLiTY', 'UCF', 'XFORCE'
'ACME', 'AGAiN', 'AMPED', 'BLiZZARD', 'BRD', 'BTCR', 'BTCRiSO', 'CADZ', 'CAFE', 'CaviaR', 'CORE', 'CRD', 'CROSSFiRE', 'CYGiSO', 'DAMN', 'DARKLEASH', 'DIGERATI', 'DiSTiNCT', 'DSi', 'dT', 'DVT', 'ECLiPSE', 'ECU', 'ECZ', 'EMBRACE', 'ENFUSiA', 'EPS', 'EXPLOSiON', 'F4CG', 'FALLEN', 'FCN', 'HERiTAGE', 'iNFECTED', 'iNTENSiON', 'ISO', 'ISOBelix', 'LaTeX', 'LAXiTY', 'LND', 'LUCiD', 'Lz0', 'Lz0PDA', 'MAS', 'MASCHiNE', 'MAGNiTUDE', 'MIDNIGHT', 'MSGPDA', 'NGEN', 'NiTROUS', 'ORiON', 'PARADOX', 'PGC', 'PROPHECY', 'RENEGADE', 'rG', 'RINDVIEH', 'RiSE', 'RLTS', 'ROR', 'RORiSO', 'SCOTCH', 'SCRiPTMAFiA', 'SONiTUS', 'SoSISO', 'SSG', 'TBE', 'TE', 'TFTDOX', 'TFTISO', 'TMG', 'TNO', 'TSZ', 'TZ7iSO', 'ViRiLiTY', 'UCF', 'UnderPl', 'XFORCE', 'ZWT', 'ZWTiSO'
];

// Put together some flag/format arrays for better type parsing.
Expand All @@ -728,7 +729,7 @@ class ReleasePatterns {
// Sources
const SOURCES_GAMES = [ 'Console Disc', 'Nintendo eShop', 'XBLA', 'PSN' ];
const SOURCES_MOVIES = [ 'Bluray', 'CAM', 'DVD', 'HDCAM', 'HDTC', 'Screener', 'Telecine', 'Telesync', 'UHDBD' ];
const SOURCES_MUSIC = [ 'AUD', 'Cable', 'CD Album', 'CD EP', 'CD Single', 'DAT Tape', 'DVDA', 'EP', 'FM', 'LP', 'Maxi CD', 'Maxi Single', 'MP3 CD', 'SBD', 'Tape', 'VLS', 'Vinyl', 'Web Single' ];
const SOURCES_MUSIC = [ 'AUD', 'CD Album', 'CD EP', 'CD Single', 'DAT Tape', 'DVDA', 'EP', 'FM', 'LP', 'Maxi CD', 'Maxi Single', 'MP3 CD', 'SBD', 'Tape', 'VLS', 'Vinyl', 'Web Single' ];
const SOURCES_MVID = [ 'DDC', 'MBluray', 'MDVDR' ];
const SOURCES_TV = [ 'ATVP', 'DSR', 'EDTV', 'HDTV', 'PDTV', 'SDTV', 'UHDTV', 'ABC', 'BBC iPlayer', 'CBS', 'Comedy Central', 'DC Universe', 'Discovery Plus', 'HBO Max', 'Hulu', 'MTV Networks', 'NBC', 'TBS' ];

Expand Down
16 changes: 16 additions & 0 deletions changelog.txt
Original file line number Diff line number Diff line change
@@ -1,3 +1,19 @@
version 1.4.2 ( updated 23.09.2023 )
+ Added
- Sports: NJPW
- Game groups: BFHiSO, BReWErS, CLONECD, CUBiC, CXZiSO, DARKZER0, DEViANCE, DVN, DYNAMIX, gimpsRus, GMiSO, HBD, HYBRID, iMMERSiON, MYSTERY, MYTH, PiZZA, PWZ, razorcd, RiTUEL, Souldrinker, TDUJAM, TECHNiC, TNT
- App groups: AGAiN, BRD, CADZ, CROSSFiRE, DAMN, DiSTiNCT, DSi, dT, ECU, ECZ, ENFUSiA, HERiTAGE, iNFECTED, LaTeX, LUCiD, MAS, MIDNIGHT, NiTROUS, PROPHECY, RENEGADE, RiSE, ROR, RORiSO, SCOTCH, SCRiPTMAFiA, SoSISO, SSG, TEDOX, TFTDOX, TZ7iSO, UnderPl, ZWT, ZWTiSO
- Bookware: ActualTests, Fravo, Pass4sure, testking, Testnow, Skillsoft
~ Improved
- Sports: Nascar, V8 Supercars, Rugby, IPL, NRL, BBL, Olympics, WWE, Boxing
- Multi lang
- Patterns at the end of release name
- CD EP source
- Saturn device pattern
- DiVX format pattern

***

version 1.4.1 ( updated 17.09.2023 )
+ Added
+ Sports: Fodbold (danish), Volkswagen Racing Cup, DTC (danish), V8 Supercars
Expand Down
4 changes: 2 additions & 2 deletions composer.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "propz/release-parser",
"version": "1.4.1",
"version": "1.4.2",
"description": "A library for parsing scene release names into human readable data.",
"keywords": [
"parser",
Expand All @@ -16,7 +16,7 @@
],
"homepage": "https://github.com/pr0pz/scene-release-parser-php#readme",
"readme": "README.md",
"time": "2023-09-12",
"time": "2023-09-23",
"license": "MIT",
"autoload": {
"classmap": [
Expand Down

0 comments on commit abb1411

Please sign in to comment.