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

--no-prompt command line option for unattended mode #17

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

Conversation

gotson
Copy link
Contributor

@gotson gotson commented Jan 20, 2021

This adds a -P --no-prompt command line option that will remove all prompts for user input:

  • if the directory is not found, the release will be skipped
  • if the torrent contains filenames (directory + filename) that are over 180 characters, the script will auto-shorten the directory name
  • if the release is actually FLAC 24bits, it will skip editing the existing torrent to mark it as such

@undaunt
Copy link

undaunt commented Jan 21, 2021

@gotson I temporarily pulled this, plus #14, into my forked master. I haven't gotten around to manually merging in your forced year option. Just wondering if you'd be interested in adding documentation to the readme and the -H command in app to show info around the unattended flags and new features.

Also, I have a branch I'm testing to accomodate for the Index out of range error (#3) that seems to be tied to torrents that have no artist record. I reviewed the API on the RED wiki and a few example torrents that hit me or a few other users - no artist. One had a composer, a few performers, and a conductor, and one had a DJ. I built in some nested logic to first check for multiple composers, then 1 composer, then 1 DJ, to try and avoid the error crash.

Not sure how often iw00t is updating this as he indicated he's not working on the python branch anymore due to the new C++ development.

@gotson
Copy link
Contributor Author

gotson commented Jan 21, 2021

My 3 PRs are available in gotson/redbetter:latest if you're interested.

Just wondering if you'd be interested in adding documentation to the readme and the -H command in app to show info around the unattended flags and new features.

Argparse generates -h automatically.

@undaunt
Copy link

undaunt commented Jan 21, 2021

@gotson I saw the argparse, I meant in the readme. I've added it to my master readme. Thanks for all your work on this!

@gotson
Copy link
Contributor Author

gotson commented Jan 22, 2021

I realized that shortening the folder name arbitrarily could lead to trumpable torrents. I will try to revisit this by applying some patterns instead.

@gotson
Copy link
Contributor Author

gotson commented Jan 22, 2021

I have revamped the shortening algo, it will try to shorten by removing some attributes from the name.

Full name is: artist - album (remaster)[year][media][format]

Various Artists is always shortened to VA

If the name is too long, it will try to drop in that order:

  • remaster
  • media
  • year
  • artist

If everything fails, it will shorten the remaining (album) by trimming extra characters.

@undaunt
Copy link

undaunt commented Jan 23, 2021

There is still issues with this branch with regard to romanization, ie duplicate or incorrect romanization, of which i've been contacted by a moderator about.

Eg, see: torrents.php?id=1242969&torrentid=3135251#torrent3135251

You'll Melt More! (ゆるめるモ!) - Surpriser (サプライザー) [2020] [Album] is the torrent group

Source folder name: /ゆるめるモ! - サプライザー {YOU'LL - YLRC-038} (2020) [24bit WEB-FLAC]
Converted: You'll Melt More! (yurumerumo!) - Surpriser (sapuraiza)[2020][WEB][FLAC]

Something to be aware of for others if they're not paying attention.

@gotson
Copy link
Contributor Author

gotson commented Jan 24, 2021

There is still issues with this branch with regard to romanization, ie duplicate or incorrect romanization, of which i've been contacted by a moderator about.

Eg, see: torrents.php?id=1242969&torrentid=3135251#torrent3135251

You'll Melt More! (ゆるめるモ!) - Surpriser (サプライザー) [2020] [Album] is the torrent group

Source folder name: /ゆるめるモ! - サプライザー {YOU'LL - YLRC-038} (2020) [24bit WEB-FLAC]
Converted: You'll Melt More! (yurumerumo!) - Surpriser (sapuraiza)[2020][WEB][FLAC]

Something to be aware of for others if they're not paying attention.

Isn't this because of the unicode conversion, which was there before my changes? In the current version, if the folder is not too long, the folder will be converted anyway and romanization would happen anyway.

@undaunt
Copy link

undaunt commented Jan 24, 2021

Yes, what I meant to say is because of the unattended feature, people may not catch that the romanization will happen automatically (and incorrectly due to the master branch).

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.

2 participants