GithubHelp home page GithubHelp logo

pr0pz / scene-release-parser Goto Github PK

View Code? Open in Web Editor NEW
20.0 2.0 3.0 194 KB

A library for parsing scene release names into human readable data.

JavaScript 100.00%
parser release scene warez warez-scripts warezscene scene-release parser-library predb

scene-release-parser's Introduction

Creative Chaos Director

Hi, Iโ€™m @pr0pz, the Creative Chaos Director from ๐Ÿ‡ง๐Ÿ‡ท/๐Ÿ‡ฉ๐Ÿ‡ช - Loving Design, Gaming, Coding, E-Sports and Nerd Stuff.

Follow on Twitter Watch on Twitch Join on Discord Donate on Ko-Fi

scene-release-parser's People

Contributors

offriend avatar pr0pz avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

scene-release-parser's Issues

Issue with "release-parser" CLI command

I'm facing an issue with the "release-parser" command when using the term "DHR19". When I try to execute the following command:

release-parser Diephuis--Mirrors_EP-(DHR19)-WEB-2023-dh

I receive the following error message:

DHR19 : The term 'DHR19' is not recognized as the name of a cmdlet, function, script file, or operable program. 
Check the spelling of the name, or if a path was included, verify that the path is correct and try again.
At line:1 char:38
+ release-parser Diephuis--Mirrors_EP-(DHR19)-WEB-2023-dh
+                                      ~~~~~
    + CategoryInfo          : ObjectNotFound: (DHR19:String) [], CommandNotFoundException
    + FullyQualifiedErrorId : CommandNotFoundException

Additional Details:

"release-parser" Version: Last commits
Node: v18.17.1

Please, kindly assist me in resolving this issue.
Thank you, and congratulations for this project .

section.match is not a function

Hello I detect a problem, I developed a react application, everything works well until the announcement of a release which has this name Naili-Juste_Un_Petale..-WEB-FR-2024-OND, then react returns this message :

`Uncaught runtime errors:
ร—
ERROR
section.match is not a function
TypeError: section.match is not a function
    at guessTypeBySection (http://localhost:3000/static/js/bundle.js:52320:33)
    at parseType (http://localhost:3000/static/js/bundle.js:52180:20)
    at ReleaseParser (http://localhost:3000/static/js/bundle.js:53362:3)
    at ReleaseCard (http://localhost:3000/static/js/bundle.js:1980:83)
    at renderWithHooks (http://localhost:3000/static/js/bundle.js:24028:22)
    at mountIndeterminateComponent (http://localhost:3000/static/js/bundle.js:27312:17)
    at beginWork (http://localhost:3000/static/js/bundle.js:28608:20)
    at HTMLUnknownElement.callCallback (http://localhost:3000/static/js/bundle.js:13624:18)
    at Object.invokeGuardedCallbackDev (http://localhost:3000/static/js/bundle.js:13668:20)
    at invokeGuardedCallback (http://localhost:3000/static/js/bundle.js:13725:35)`

it looks like this is happening at your function level :

`const guessTypeBySection = ( section ) =>
	{
		let type = ''

		// No Section, no chocolate!
		if ( section )
		{
			// Loop all types
			for ( const typeParentKey in patterns.TYPE )
			{
				let typeValue = patterns.TYPE[ typeParentKey ]

				// Transform every var to array, so we can loop
				if ( !Array.isArray( typeValue ) )
					typeValue = [ typeValue ]

				// Loop all type patterns
				for ( const value of typeValue )
				{
					// Match type
					let matches = section.match( ( '/' + value + '/i' ).toRegExp() )

					// Match found, set type parent key as type
					if ( matches )
					{
						type = typeParentKey
						break
					}
				}

				if ( type !== '' ) break;
			}
		}

		return type
	}`

Thank you for the correction.

Ambigious TV-Shows such as "Wilfred.US" wrecks title parsing

Hello.

Nice lib, but there is one issue I found that I think needs to be fixed, I'll gladly help as long as we can agree on the issue.

For example Wilfred exists as both an AU and US show.

AU (first released, 2007)

https://www.themoviedb.org/tv/3297

US (2011)

https://www.themoviedb.org/tv/39525-wilfred

This means that now the title is parsed as Wilfred US.

It would be a safe assumption to think that any tag in capitalized country-code US|UK|AU|NZ|CA would mean ambigous titles and narrowing down to the specific show in respective country.

Of course the rare occassion could happen that some title would be.. Toys.R.Us, but unlikely that it would be capitalized.. If so thats a real corner-case not worth optimizing for!

https://scenerules.org/html/2020_WDX_unformatted.html

    19.8) Different shows with the same title produced in different countries must have the ISO 3166-1 alpha 2 country code in  the show name.
        19.8.1) Except for UK shows, which must use UK, not GB.
        19.8.2) This rule does not apply to an original show, only shows that succeed the original.
                e.g. The.Office.S01E01 and The.Office.US.S01E01.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.