Skip to content
Merged
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
1 change: 0 additions & 1 deletion .dockerignore
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,5 @@ node_modules/
package-lock.json
generate-poster-previews.js
README.md
rss.json
sample.env
sonar-project.properties
13 changes: 9 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -86,6 +86,13 @@ It supports the most popular torrenting clients (qBittorrent, deluge and µTorre

## 🧪 Pipeline

> [!IMPORTANT]
> This is currently slightly out of date due to che metadata changes.
>
> I moved to fetching metadata from [one-pace-api](https://github.com/eltharynd/one-pace-api), this means that we get all of the metadata at once and we don't need to check RSS feed anymore.
>
> When I have time to finish [one-pace-api](https://github.com/eltharynd/one-pace-api) and deploy it for the public, I will be able to just connect via WebSocket and get notifications without polling constantly.

The following diagram synthesizes the pipeline:

![pipeline](docs/pipeline.png?cache=2)
Expand Down Expand Up @@ -253,7 +260,7 @@ services:


# Metadata Settings
#- METADATA_URL=https://raw.githubusercontent.com/ladyisatis/one-pace-metadata/refs/heads/v2/metadata/data.json
#- METADATA_URL=https://raw.githubusercontent.com/eltharynd/one-pace-api/refs/heads/main/output/metadata.json
#- METADATA_LANGUAGE=en
#- METADATA_POSTER_SET=default
#- METADATA_CHECK_INTERVAL=3600
Expand Down Expand Up @@ -473,7 +480,7 @@ If you're not sure what Mount Path Mappings are you can have a read on [TRaSH Gu

| Metadata Variables | Default | Description |
| :--- | :--- | :--- |
| `METADATA_URL` | `https://raw.githubusercontent.com/ladyisatis/one-pace-metadata/refs/heads/v2/metadata/data.json` | Metadata url (untested with different ones). |
| `METADATA_URL` | `https://raw.githubusercontent.com/eltharynd/one-pace-api/refs/heads/main/output/metadata.json` | Metadata url (untested with different ones). |
| `METADATA_LANGUAGE` | `en` | Currently only language supported. |
| `METADATA_POSTER_SET` | `default` | Currently `default` equals `piratezekk`. There are also `official` and `mizzoufan523` available. If a set is missing a poster it uses `default`. |
| `METADATA_CHECK_INTERVAL` | 3600 | Seconds between checking for new metadata. |
Expand Down Expand Up @@ -513,8 +520,6 @@ If you want to contribute to the posters or create an entire new set, first of a
This project wouldn't be possible without the incredible work of the community:

- **[One Pace](https://onepace.net/en):** The incredible team behind the unofficial fan edits.
- **[Ladyisatis](https://github.com/ladyisatis):** For maintaining the
[one-pace-metadata](https://github.com/ladyisatis/one-pace-metadata) repository.
- For the custom poster artwork sets:
- `piratezekk` (default) by **[/u/piratezekk](https://reddit.com/user/piratezekk)**.
- `mizzoufan523` by **[/u/Mizzoufan523](https://reddit.com/user/Mizzoufan523)**.
Expand Down
6 changes: 0 additions & 6 deletions nodemon.json

This file was deleted.

7 changes: 3 additions & 4 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
"scripts": {
"build": "tsc",
"start": "node --enable-source-maps dist/index.js",
"dev": "nodemon dist/index.js",
"dev": "nodemon --enable-source-maps dist/index.js",
"test": "vitest run",
"test:dev": "vitest",
"test:coverage": "vitest run --coverage"
Expand All @@ -28,11 +28,10 @@
"cors": "^2.8.6",
"dotenv": "^17.4.2",
"express": "^5.2.1",
"ez-ts-logger": "^1.0.8",
"ez-ts-logger": "^1.0.11",
"multer": "^2.2.0",
"reflect-metadata": "^0.2.2",
"routing-controllers": "^0.11.3",
"rss-parser": "^3.13.0",
"xml-js": "^1.6.11"
},
"devDependencies": {
Expand All @@ -44,4 +43,4 @@
"typescript": "^6.x",
"vitest": "^4.1.9"
}
}
}
2 changes: 1 addition & 1 deletion sample.env
Original file line number Diff line number Diff line change
Expand Up @@ -167,7 +167,7 @@ TORRENT_CHECK_INTERVAL=60
####################################

# Metadata url (untested with different ones).
#METADATA_URL=https://raw.githubusercontent.com/ladyisatis/one-pace-metadata/refs/heads/v2/metadata/data.json
#METADATA_URL=https://raw.githubusercontent.com/eltharynd/one-pace-api/refs/heads/main/output/metadata.json
# Currently only language supported.
#METADATA_LANGUAGE=en
# Currently `default` equals `piratezekk`. There are also `official` and `mizzoufan523` available. If a set is missing a poster it uses `default`.
Expand Down
14 changes: 8 additions & 6 deletions src/environment.ts
Original file line number Diff line number Diff line change
Expand Up @@ -52,11 +52,13 @@ export default {
process.env.PIPELINE_SKIP_POSTERS || process.env.SKIP_POSTERS || 'false',
),

PIPELINE_INCLUDE_SPECIALS: /true/i.test(
process.env.PIPELINE_INCLUDE_SPECIALS ||
process.env.INCLUDE_SPECIALS ||
'false',
),
// TODO reimplement
// PIPELINE_INCLUDE_SPECIALS: /true/i.test(
// process.env.PIPELINE_INCLUDE_SPECIALS ||
// process.env.INCLUDE_SPECIALS ||
// 'false',
// ),
PIPELINE_INCLUDE_SPECIALS: false,
PIPELINE_PREFER_EXTENDED: /true/i.test(
process.env.PIPELINE_PREFER_EXTENDED ||
process.env.PREFER_EXTENDED ||
Expand Down Expand Up @@ -172,7 +174,7 @@ export default {
*/
METADATA_URL:
process.env.METADATA_URL ||
`https://raw.githubusercontent.com/ladyisatis/one-pace-metadata/refs/heads/v2/metadata/data.json`,
`https://raw.githubusercontent.com/eltharynd/one-pace-api/refs/heads/main/output/metadata.json`,
METADATA_LANGUAGE: process.env.METADATA_LANGUAGE || 'en',
METADATA_POSTER_SET: process.env.METADATA_POSTER_SET || 'default',
METADATA_CHECK_INTERVAL:
Expand Down
2 changes: 0 additions & 2 deletions src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@ import { Express } from './api/express.js'
import { LibraryController } from './library/library.controller.js'
import { MetadataController } from './metadata/metadata.controller.js'
import { PipelineController } from './pipeline/pipeline.controller.js'
import { RSSController } from './rss/rss.controller.js'
import { LabelsDisabledInDelugeError } from './torrent/clients/deluge.controller.js'
import { TorrentController } from './torrent/torrent.controller.js'
import { TorrentConnectionError } from './torrent/torrent.model.js'
Expand Down Expand Up @@ -67,7 +66,6 @@ const startApp = async () => {
PIPELINE_RETRY_INTERVAL: environment.PIPELINE_RETRY_INTERVAL,
})
Context.metadata = new MetadataController()
Context.rss = new RSSController()
Context.library = new LibraryController()
Context.torrent = new TorrentController()

Expand Down
5 changes: 1 addition & 4 deletions src/library/clients/emby.controller.ts
Original file line number Diff line number Diff line change
Expand Up @@ -111,10 +111,7 @@ export class EmbyController implements ILibraryController {
episodeDescription?: { title: string; description: string },
): Promise<TargetLibraryFile> {
if (!episodeDescription) {
episodeDescription = await Context.metadata.getEpisodeDescription(
arc,
episode,
)
episodeDescription = await Context.metadata.getEpisode(arc, episode)
}

let embyLibraryPath = await Context.library.getLibraryFolder()
Expand Down
5 changes: 1 addition & 4 deletions src/library/clients/jellyfin.controller.ts
Original file line number Diff line number Diff line change
Expand Up @@ -111,10 +111,7 @@ export class JellyfinController implements ILibraryController {
episodeDescription?: { title: string; description: string },
): Promise<TargetLibraryFile> {
if (!episodeDescription) {
episodeDescription = await Context.metadata.getEpisodeDescription(
arc,
episode,
)
episodeDescription = await Context.metadata.getEpisode(arc, episode)
}

let jellyfinLibraryPath = await Context.library.getLibraryFolder()
Expand Down
10 changes: 2 additions & 8 deletions src/library/clients/local-folder.controller.ts
Original file line number Diff line number Diff line change
Expand Up @@ -46,10 +46,7 @@ export class LocalFolderController implements ILibraryController {
)
mkdirSync(targetPath, { recursive: true })

let episodeDescription = await Context.metadata.getEpisodeDescription(
arc,
episode,
)
let episodeDescription = await Context.metadata.getEpisode(arc, episode)
let targetFileName = LibraryController.resolveEpisodeTargetFileName(
arc,
episode,
Expand Down Expand Up @@ -93,10 +90,7 @@ export class LocalFolderController implements ILibraryController {
episodeDescription?: { title: string; description: string },
): Promise<TargetLibraryFile> {
if (!episodeDescription) {
episodeDescription = await Context.metadata.getEpisodeDescription(
arc,
episode,
)
episodeDescription = await Context.metadata.getEpisode(arc, episode)
}

let targetPath = `${path.resolve(
Expand Down
11 changes: 4 additions & 7 deletions src/library/clients/plex.controller.ts
Original file line number Diff line number Diff line change
Expand Up @@ -117,10 +117,7 @@ export class PlexController implements ILibraryController {
episodeDescription?: { title: string; description: string },
): Promise<TargetLibraryFile> {
if (!episodeDescription) {
episodeDescription = await Context.metadata.getEpisodeDescription(
arc,
episode,
)
episodeDescription = await Context.metadata.getEpisode(arc, episode)
}

let plexLibraryPath = await Context.library.getLibraryFolder()
Expand Down Expand Up @@ -239,7 +236,7 @@ export class PlexController implements ILibraryController {

async updateSeasonMetadata(arc: number) {
Logger.debug(`Updating Season ${arc} Metadata in Plex...`)
let description = await Context.metadata.getSeasonDescription(arc)
let description = await Context.metadata.getArc(arc)

let season = await this.show.season(arc)

Expand All @@ -266,10 +263,10 @@ export class PlexController implements ILibraryController {

async updateShowMetadata() {
Logger.debug(`Updating Show Metadata in Plex...`)
let description = await Context.metadata.getShowDescription()
let show = await Context.metadata.getShow()

await this.show.editTitle(environment.LIBRARY_SERIES_NAME)
await this.show.editSummary(description.plot)
await this.show.editSummary(show.description)

if (!environment.PIPELINE_SKIP_POSTERS) {
Logger.debug(`Updating Show poster in Plex...`)
Expand Down
Loading
Loading