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

Add Readarr support #80

Closed
62 of 74 tasks
marksie1988 opened this issue Aug 9, 2021 · 5 comments
Closed
62 of 74 tasks

Add Readarr support #80

marksie1988 opened this issue Aug 9, 2021 · 5 comments
Assignees
Labels
type/feature New feature or request

Comments

@marksie1988
Copy link
Collaborator

marksie1988 commented Aug 9, 2021

Adding Readarr API support for e books

General

  • Get Calendar

Library

  • get book

  • Lookup Book

  • Add Book

  • Edit Book

  • Delete Book

  • Lookup Author

  • Add Author

  • Edit Author

  • Delete Author

  • List books

  • Mass Edit

Activity

  • Get Queue
  • Update item in Queue
  • Delete item in queue
  • get History
  • Get Blacklist
  • Delete Blacklist

Wanted

  • Get Missing
  • Get Cutoff Unmet

Settings

  • Get root folder
  • set root folder
  • update root folder
  • delete root folder
  • get remote path mappings
  • get book naming
  • get media management
  • update media management
  • get profiles
  • add profiles
  • edit profiles
  • delete profiles
  • get quality definitions
  • edit quality definitions
  • get indexers
  • add indexers
  • update indexers
  • delete indexers
  • get download clients
  • add download clients
  • update download clients
  • delete download clients
  • get import lists
  • add import lists
  • update import lists
  • delete import lists
  • get notification
  • add notification
  • edit notification
  • delete notification
  • get metadata provider
  • edit metadata provider
  • get tags
  • add tags
  • edit tags
  • delete tags
  • get tags detailed
  • get host
  • edit host
  • get ui
  • update ui

System

  • get status
  • get health
  • get disk space
  • get history
  • get task
  • post task
  • get command
  • post command
  • get backups
  • add backup
  • get updates
  • get log
  • get log file
@marksie1988 marksie1988 added the type/feature New feature or request label Aug 9, 2021
@marksie1988 marksie1988 self-assigned this Aug 15, 2021
@github-actions
Copy link

Branch 80-add_readarr_support created!

@Archmonger
Copy link
Contributor

Archmonger commented Aug 23, 2021

Hey @marksie1988 can you create a draft PR of 80-add_readarr_support and link it ("Linked pull requests" on the sidebar) to this issue for better tracking and visibility?

@marksie1988 marksie1988 mentioned this issue Aug 23, 2021
10 tasks
@marksie1988
Copy link
Collaborator Author

@Archmonger Just after your opinion on this one.

Currently when we add_movie or add_series we run _construct_xxx_json im wondering if a better way to do this would be to input the object rather than the IDs for example:

def add_book(self, book, quality_profile, other_vars):

   params_json = {
      "title": book["title"],
      "qualityProfileId": quality_profile["id"]
   }
   <other code here>

add_book(self.lookup_book("goodreads:123"), self.get_quality_profiles("1"), other_vars)

so rather than a user supplying the IDs and then doing a lookup, the lookup data is supplied as part of adding the book. this would be the same for the quality profile and any others that rely on functions within the API.

I haven't implemented or tested this yet, currently just a theory and may be that the way its currently done is best, but wanted to see what you thought.

@Archmonger
Copy link
Contributor

Archmonger commented Nov 12, 2021

The way it's currently being done is about the most "user friendly" way it could be implemented. Having the user supply the object would be less convenient.

Another option is to just use a dataclass rather than a dict, but that would really only make the current implementation less readable.

The only improvement I could think of it's optionally letting the user pass his own object=... as a kwarg. That would allow for forcibly overriding some values if needed, but that's still unnecessary since the best practice would be to use upd_* to change the value after the fact.

@marksie1988
Copy link
Collaborator Author

marksie1988 commented Nov 12, 2021

Ok after thinking about it you are probably right, assuming the user will understand passing the record rather than just an I'd may cause confusion and as doing a lookup in the construct isn't a major overhead it makes little sense to do it another way.

I'll also see what the required fields are for adding books as I think it may be more that sonarr/radarr require and the construct could get messy.

I'll do some testing and see As the API docs don't say what's required.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type/feature New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants