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

feat: categories/labels #98

Merged
merged 12 commits into from
Aug 24, 2024
Merged

feat: categories/labels #98

merged 12 commits into from
Aug 24, 2024

Conversation

micielski
Copy link
Contributor

@micielski micielski commented Aug 20, 2024

TODO:

  • Config file
  • Figure out whether category's prefix should be inserted into torrent's name or be a seperate header
  • Ask about a category when adding a new magnet
  • Don't ask about a category when there are no categories
  • Ask about a category when adding a new magnet from search tab (this will take many lines of code probably)
  • New task - change category with default binding to c (but don't allow adding a completely new category this way)
  • Auto completion when being asked about a category in a task
  • Remove "Bar" from tasks' name
  • Calculate icon and category length better

@micielski micielski added this to the 0.5 milestone Aug 20, 2024
@micielski micielski linked an issue Aug 20, 2024 that may be closed by this pull request
@micielski micielski added the enhancement New feature or request label Aug 20, 2024
@micielski
Copy link
Contributor Author

There's a new config: categories.toml

# Example category:
# [[category]]
# name = "Classical Music"             # required
# icon = "[M]"                         # optional, default: ""
# default_dir = "/mnt/Music/Classical" # optional, default: transmission's default
# color = "Green"                      # optional, default: "White"

and a new option in config.toml under [torrents_tab]:

[search_tab]
# Whether to insert category icon into name as declared in categories.toml.
# An alternative to inserting category's icon into torrent's name is adding a
# CategoryIcon header into your headers.
category_icon_insert_into_name = true

The user is now being asked about a category when adding a magnet:

image

(you can press TAB or CTRL-f or right arrow to autocomplete).

After that, the default directory for given category is set:

image

In the torrents tab a torrent with a category may look something like this:

image

There are also two new headers: CategoryIcon and Category, so you can customize how do you want to display info about a category

@aidanaden Could you give it a try?

@micielski micielski marked this pull request as ready for review August 24, 2024 06:50
@micielski micielski merged commit ac00650 into intuis:main Aug 24, 2024
7 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

categories/labels
1 participant