Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
192 changes: 189 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# Curd

A cli application to stream anime with [Anilist](https://anilist.co/) integration and Discord RPC written in golang.
A cli application to stream anime with [Anilist](https://anilist.co/) and [MyAnimeList](https://myanimelist.net/) integration and Discord RPC written in golang.
Works on Windows and Linux

## Join the discord server
Expand All @@ -21,7 +21,8 @@ https://github.com/user-attachments/assets/cbf799bc-9fdd-4402-ab61-b4e31f1e264d

## Features
- Stream anime online
- Update anime in Anilist after completion
- **Dual Provider Support**: Choose between [Anilist](https://anilist.co/) or [MyAnimeList (MAL)](https://myanimelist.net/) to track your anime
- Update anime progress automatically on your chosen provider after completion
- Skip anime Intro and Outro
- Skip Filler and Recap episodes
- Discord RPC about the anime
Expand Down Expand Up @@ -337,11 +338,193 @@ You can quit it anytime and the resume time would be saved in the history file
more settings can be found at config file.
config file is located at ```~/.config/curd/curd.conf```

## Using MyAnimeList (MAL) with Curd

Curd supports both AniList and MyAnimeList as anime tracking providers. Here's a comprehensive step-by-step guide to set up and use MAL with Curd.

### Quick Overview

**What you'll need:**
- A MyAnimeList account
- MAL API Client credentials (Client ID and Client Secret)
- 5-10 minutes for setup

**Setup Steps:**
1. Create a MAL API Client → Get Client ID and Secret
2. Configure Curd → Add credentials to config file
3. Authenticate → Login via OAuth
4. Start watching → Enjoy automatic progress tracking!

---

### Step 1: Create a MAL API Client

Before you can use Curd with MyAnimeList, you need to create a MAL API client to get your Client ID and Client Secret.

1. **Sign in to MyAnimeList**
- Go to [MyAnimeList](https://myanimelist.net/) and log in to your account
- If you don't have an account, create one first

2. **Access API Settings**
- Navigate to [MAL API Client Registration](https://myanimelist.net/apiconfig)
- Or go to: Profile → Account Settings → API

3. **Create New Client**
- Click on "Create ID" or "Add New Client"
- Fill in the required information:
- **App Name**: `Curd` (or any name you prefer)
- **App Type**: Select `web`
- **App Description**: `Curd is a anime streaming CLI application that I use to watch anime and track my progress on MyAnimeList.`
- **App Redirect URL**: `http://localhost:8080/callback`
- **Homepage URL**: `https://github.com/Wraient/curd` (optional)
- **Commercial/Non-Commercial**: Select `non-commercial`

4. **Save Your Credentials**
- After creating, you'll receive:
- **Client ID**: A string of characters (save this)
- **Client Secret**: Another string of characters (save this securely)
- **Important**: Keep these credentials private and secure!

### Step 2: Configure Curd to Use MAL

1. **Edit the Curd Configuration File**
```bash
curd -e
```

Or manually open the config file:
- **Linux/macOS**: `~/.config/curd/curd.conf`
- **Windows**: `C:\Users\USERNAME\AppData\Roaming\Curd\curd.conf`

2. **Update the Following Settings**
```conf
AnimeProvider = mal
MALClientID = your_client_id_here
MALClientSecret = your_client_secret_here
```

Replace `your_client_id_here` and `your_client_secret_here` with the credentials you saved from Step 1.

3. **Save the Configuration File**

### Step 3: Authenticate with MAL

1. **Run Curd for the First Time**
```bash
curd
```

2. **OAuth Authentication Flow**
- Curd will automatically open your default web browser
- You'll be redirected to MyAnimeList's authorization page
- Click "Allow" or "Authorize" to grant Curd access to your MAL account

3. **Complete Authentication**
- After authorization, you'll be redirected to a callback page
- The authentication token will be saved automatically
- You can close the browser window

4. **Token Storage**
- Your MAL token is securely stored at:
- **Linux/macOS**: `~/.local/share/curd/mal_token.json`
- **Windows**: `C:\.local\share\curd\mal_token.json`

### Step 4: Start Using Curd with MAL

Once authenticated, Curd will:
- Display your MAL anime lists (Watching, Completed, On Hold, Dropped, Plan to Watch)
- Automatically update your MAL progress as you watch episodes
- Sync your scores and status changes
- Allow you to add new anime to your MAL lists

**Example Usage:**
```bash
# Start watching from your Currently Watching list
curd

# Continue your last watched anime
curd -c

# Add a new anime to your MAL list
curd -new

# Watch with rofi interface
curd -rofi
```

### Step 5: Managing Your MAL Integration

#### Switching Back to AniList
If you want to switch back to AniList:
1. Edit the config: `curd -e`
2. Change: `AnimeProvider = anilist`
3. Save and restart Curd

#### Re-authenticating MAL
If you need to re-authenticate (token expired, changed accounts, etc.):
1. Delete the token file:
```bash
# Linux/macOS
rm ~/.local/share/curd/mal_token.json

# Windows
del C:\.local\share\curd\mal_token.json
```
2. Run `curd` again to start the authentication process

#### Viewing Your Token
Your MAL authentication token is stored in JSON format at the token file location. It includes:
- Access token
- Refresh token
- Token expiration time

### Troubleshooting

**Problem**: "Failed to get MAL user info" or authentication errors

**Solutions**:
1. Verify your Client ID and Client Secret in the config file
2. Ensure the redirect URI in your MAL API settings matches: `http://localhost:8080/callback`
3. Delete the token file and re-authenticate
4. Check that port 8080 is not blocked by a firewall

**Problem**: Anime not updating on MAL

**Solutions**:
1. Check your internet connection
2. Verify the token hasn't expired (re-authenticate if needed)
3. Check the debug log at: `~/.local/share/curd/debug.log` (Linux/macOS) or `C:\.local\share\curd\debug.log` (Windows)

**Problem**: Can't find anime when searching

**Solutions**:
1. Try searching with the English title instead of Romaji
2. Use alternative titles or abbreviations
3. The anime might not be in MAL's database yet

### MAL vs AniList Comparison

| Feature | AniList | MyAnimeList |
|---------|---------|-------------|
| Anime Coverage | Extensive | Extensive |
| Scoring System | 0-100 | 0-10 |
| Image Previews in Rofi | Yes | Yes |
| Progress Tracking | Yes | Yes |
| Status Categories | 6 categories | 5 categories |
| OAuth Setup | Simple | Requires API Client |

### Additional Notes

- MAL uses a 0-10 scoring system, while AniList uses 0-100
- When switching providers, your local watch history remains intact
- Both providers work with all Curd features (Discord RPC, skip features, etc.)
- You can maintain lists on both platforms by switching the provider setting

| **Option** | **Type** | **Valid Values** | **Description** |
|---------------------------|------------|-------------------------------------------|---------------------------------------------------------------------------------------------------|
| `DiscordPresence` | Boolean | `true`, `false` | Enables or disables Discord Rich Presence integration. |
| `AnimeNameLanguage` | Enum | `english`, `romaji` | Sets the preferred language for anime names. |
| `MpvArgs` | List | all mpv args eg ["--fullscreen=yes", "--mute=yes"] | Add args to mpv player |
| `MpvArgs` | List | all mpv args eg ["--fullscreen=yes", "--mute=yes"] | Add args to mpv player |
| `AddMissingOptions` | Boolean | `true`, `false` | Automatically adds missing configuration options with default values to the config file. |
| `AlternateScreen` | Boolean | `true`, `false` | Toggles the use of an alternate screen buffer for cleaner UI. |
| `RofiSelection` | Boolean | `true`, `false` | Enables or disables anime selection via Rofi. |
Expand All @@ -358,6 +541,9 @@ config file is located at ```~/.config/curd/curd.conf```
| `Player` | String | `mpv` (redundant rn) | Specifies the media player used for streaming or playing anime. |
| `SaveMpvSpeed` | Boolean | `true`, `false` | Retains the playback speed set in MPV for next episode. |
| `SkipFiller` | Boolean | `true`, `false` | Skips filler episodes when supported. |
| `AnimeProvider` | Enum | `anilist`, `mal` | Specifies which anime tracking service to use (AniList or MyAnimeList). |
| `MALClientID` | String | Your MAL Client ID | Client ID from MyAnimeList API (required when using MAL as provider). |
| `MALClientSecret` | String | Your MAL Client Secret | Client Secret from MyAnimeList API (required when using MAL as provider). |

## Todo (fix)
- Use Powershell for windows token input instead of notepad or cmd
Expand Down
Loading