Git Product home page Git Product logo

starr's Introduction

Starr

GoDoc Go Report Card MIT License discord

The correct way to say *arr.

Go library to interact with APIs in all the Starr apps.

Custom Scripts support is also included. Check out the types and methods to get that data.

One ๐ŸŒŸ To Rule Them All

This library is slowly updated as new methods are needed or requested. If you have specific needs this library doesn't currently meet, but should or could, please let us know!

This library is currently in use by:

Usage

Get it:

go get golift.io/starr

Use it:

import "golift.io/starr"

Example

package main

import (
	"fmt"

	"golift.io/starr"
	"golift.io/starr/lidarr"
)

func main() {
	// Get a starr.Config that can plug into any Starr app.
	// starr.New(apiKey, appURL string, timeout time.Duration)
	c := starr.New("abc1234ahsuyka123jh12", "http://localhost:8686", 0)
	// Lets make a lidarr server with the default starr Config.
	l := lidarr.New(c)

	// In addition to GetSystemStatus, you have things like:
	// * l.GetAlbum(albumID int)
	// * l.GetQualityDefinition()
	// * l.GetQualityProfiles()
	// * l.GetRootFolders()
	// * l.GetQueue(maxRecords int)
	// * l.GetAlbum(albumUUID string)
	// * l.GetArtist(artistUUID string)
	status, err := l.GetSystemStatus()
	if err != nil {
		panic(err)
	}

	fmt.Println(status)
}

starr's People

Contributors

aetaric avatar austinwbest avatar craigjmidwinter avatar davidnewhall avatar fuochi avatar fyb3roptik avatar hhuggles avatar jackdallas avatar renovate[bot] avatar rtrox avatar smantic avatar woiza avatar

Stargazers

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

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar

starr's Issues

radarr custom formats alignment

@davidnewhall I was looking into radarr customformats methods. It would be great to align them with indexer/downloadclient/notification. However, I haven't made a PR for that, because there are few elements that I'm not sure how will impact your existing usage. Here few examples of changes that I'm not sure about:

  • I don't understand the scope of this:

    if format == nil {
    return &output, nil
    }

  • This I think can be omitted if we add the omitempty flag to ID, it shouldn't be a big deal:

    format.ID = 0 // ID must be zero when adding.

  • I would like to remove the cfID input from here, and always use format.ID, is there any case in which the 2 would differ from each other?

    func (r *Radarr) UpdateCustomFormat(cf *CustomFormat, cfID int) (*CustomFormat, error) {
    return r.UpdateCustomFormatContext(context.Background(), cf, cfID)
    }
    // UpdateCustomFormatContext updates an existing custom format and returns the response.
    func (r *Radarr) UpdateCustomFormatContext(ctx context.Context, format *CustomFormat, cfID int) (*CustomFormat, error) {
    if cfID == 0 {
    cfID = format.ID
    }

  • Also, to align the behaviour we should use 2 structs CustomFormatInput and CustomFormatOutput, and leverage the structs starr.FieldInput and starr.FieldInput. However, this would mean a lot of breaking changes for this endpoint.

In short, If you are already using this in some places, I think it would be better if you update this to be the least disruptive as possible. If you aren't using this much, I can make a PR and we can work on that.

Bazarr and Jackett

I am actually working on a project, when I ran into your library for Sonarr and Radarr which I need; however, another library that would go hand in hand with your collection would be Bazarr (A subtitle framework) and Jackett (a torrent indexer framework) which go hand in hand with your current collection of Go-SDK's. Unfortunately I don't have the skills or knowledge to do so myself. Please tell me your thoughts or how I can help.

Thanks,
Napoleon
[email protected]

RadarrLookup by IMDBID

I need to be able to use the /lookup/imdb endpoint. Any chance at getting that? Thanks

Support the Parse endpoint

Sonarr has a /api/v3/parse endpoint that takes a generic text string Title and can parse it and return series/episode data. Very useful to convert a filename into structured data.

Context: I'm creating a script that will automatically watch a folder for IO changes, run Parse on any files added, and if it detects a series/episode, automatically issue a ManualImportReprocess command with the filename and the details from the Parse (e.g. which series and episode ID it should be processed against).

I'm not sure if I'm going about this the right way or not - essentially I am trying to create a way to automatically import files from a source that isn't supported by Sonarr (think an Emby instance or some other fileshare service that Sonarr doesn't integrate with directly).

Thanks!

Sonarr monitoring options

I am struggling with monitoring options:

monitor

Did you miss something?

Sonarr api docs:

"addOptions": {
    "ignoreEpisodesWithFiles": true,
    "ignoreEpisodesWithoutFiles": true,
    "monitor": "unknown",
    "searchForMissingEpisodes": true,
    "searchForCutoffUnmetEpisodes": true
  },

starr:

type AddSeriesOptions struct {
   SearchForMissingEpisodes     bool `json:"searchForMissingEpisodes"`
   SearchForCutoffUnmetEpisodes bool `json:"searchForCutoffUnmetEpisodes,omitempty"`
   IgnoreEpisodesWithFiles      bool `json:"ignoreEpisodesWithFiles,omitempty"`
   IgnoreEpisodesWithoutFiles   bool `json:"ignoreEpisodesWithoutFiles,omitempty"`
}

Sonarr version 4.0.2.1183

Dont pass 0 ids to endpoints

The endpoints that fetch the library (v3/movie) is shared with the details endpoint (v3/movie/[1-9]) so if the library endpoint is called without an id, it is appending ?tmdbId=0 and this is an issue.

Currently in radarr it is allowed (a bug?)
ASP radarr does this check properly and it doesn't return the library, however it returns an empty object (bug?) instead of a 404 so i'll deal with that over there.

Sonarr Version 4: Open Issues

This issue will track known issue with Sonarr version 4.

  • Release Profiles changed. It appears only two fields were removed, so this should be OK. (commit)
  • Quality Definitions changed. It appears some fields were added, and this does or doesn't seem to be a problem for v3. (testing now). (commit)
  • Custom Formats were added, but they only work in V4. (commit)
  • The rumor mill tells me that language profiles are broken in V4.
  • more to come....

Sonarr/Sonarr@b04b400

Whisparr support

Hello,

The Whisparr team was kind enough to let us know that they've changed from the Radarr API to the Sonarr API with V2 of their application. I was wondering if there could be an explicit interface added to integrate with this application (even if it's just a name ptr) so for future integration purposes/changes it can be handled upstream (this library). I think this is the only arr application that's not in here presently.

Dependency Dashboard

This issue lists Renovate updates and detected dependencies. Read the Dependency Dashboard docs to learn more.

This repository currently has no open or pending branches.

Detected dependencies

github-actions
.github/workflows/codetests.yml
  • actions/checkout v4
  • codespell-project/actions-codespell v2
  • actions/checkout v4
  • actions/checkout v4
  • actions/setup-go v5
  • actions/setup-go v5
  • actions/checkout v4
  • golangci/golangci-lint-action v6
  • actions/setup-go v5
  • actions/checkout v4
  • golangci/golangci-lint-action v6
gomod
go.mod
  • go 1.20
  • github.com/stretchr/testify v1.9.0

  • Check this box to trigger a request for Renovate to run again on this repository

Add seasonPass endpoint

Need to make mass changes. Look into the seasonPass endpoint, at least in Sonarr.

example POST

{
    "series": [
        {
            "id": 777,
            "monitored": true
        }
    ],
    "monitoringOptions": {
        "monitor": "all"
    }
}

Season statistics missing

Hi,

I think season statistics are missing/broken (Sonarr 4.0.2.1183):

for _, season := range command.series.Seasons {
	fmt.Printf("Season Number: %+v\n", season.SeasonNumber)
	fmt.Printf("Season monitored: %+v\n", season.Monitored)
	fmt.Printf("Season statistics: %+v\n", season.Statistics)
}
Season Number: 5
Season monitored: true
Season statistics: <nil>
Season Number: 4
Season monitored: false
Season statistics: <nil>
Season Number: 3
Season monitored: false
Season statistics: <nil>
Season Number: 2
Season monitored: false
Season statistics: <nil>
Season Number: 1
Season monitored: false
Season statistics: <nil>
Season Number: 0
Season monitored: false
Season statistics: <nil>

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.