Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

make self.py3.replace helper #2242

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open

Conversation

lasers
Copy link
Contributor

@lasers lasers commented Mar 27, 2024

An alternative to PRs listed below.

I copied thresholds code. Minimal test. Allow users to be more specific.

Get placeholders_list first so we can target existing placeholders rather than all placeholders.
I don't know if this PR is the optimal solution, just an alternative.

Code untested on this player.. I tested on nvidia_smi. Sorry if you ran into issues.

This is just an idea / experiment.

Please test this.

# Ought to do dict (perform on matched string placeholders)
    replacements = {
        "artist": [
            "([\(\[][^)\]]*?(bonus|demo|edit|explicit|extended|feat|mono|remaster|stereo|version)[^)\]]*?[\)\]])",
            "([\-,;/])([^\-,;/])*(bonus|demo|edit|explicit|extended|feat|mono|remaster|stereo|version).*"
        ],
    }

# Ought to do list. (perform on all string placeholders)
    replacements = [
            "([\(\[][^)\]]*?(bonus|demo|edit|explicit|extended|feat|mono|remaster|stereo|version)[^)\]]*?[\)\]])",
            "([\-,;/])([^\-,;/])*(bonus|demo|edit|explicit|extended|feat|mono|remaster|stereo|version).*"
        ]

Solves #2234 (comment).

Closes #2234.
Closes #2237.

@lasers lasers force-pushed the replacements branch 7 times, most recently from 0596fad to 2d05477 Compare March 28, 2024 07:04
@lasers lasers marked this pull request as ready for review March 28, 2024 07:08
@lasers
Copy link
Contributor Author

lasers commented Mar 31, 2024

Ideally, we should separate this into artist and album. Who volunteer?

"([\(\[][^)\]]*?(bonus|demo|edit|explicit|extended|feat|mono|remaster|stereo|version)[^)\]]*?[\)\]])",
"([\-,;/])([^\-,;/])*(bonus|demo|edit|explicit|extended|feat|mono|remaster|stereo|version).*",

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant