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
6 changes: 3 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -26,15 +26,15 @@
- Granular permission system.
- Support for various notification agents.
- Mobile-friendly design, for when you need to approve requests on the go!
- Support for watchlisting & blacklisting media.
- Support for watchlisting & blocklisting media.

With more features on the way! Check out our [issue tracker](/../../issues) to see the features which have already been requested.

## Getting Started

Check out our documentation for instructions on how to install and run Seerr:

https://docs.seerr.dev/getting-started/
<https://docs.seerr.dev/getting-started/>

## Preview

Expand All @@ -49,7 +49,7 @@ https://docs.seerr.dev/getting-started/

## API Documentation

You can access the API documentation from your local Seerr install at http://localhost:5055/api-docs
You can access the API documentation from your local Seerr install at <http://localhost:5055/api-docs>

## Community

Expand Down
4 changes: 2 additions & 2 deletions cypress/config/settings.cypress.json
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,8 @@
"discoverRegion": "",
"streamingRegion": "",
"originalLanguage": "",
"blacklistedTags": "",
"blacklistedTagsLimit": 50,
"blocklistedTags": "",
"blocklistedTagsLimit": 50,
"trustProxy": false,
"mediaServerType": 1,
"partialRequestsEnabled": true,
Expand Down
4 changes: 2 additions & 2 deletions docs/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -23,10 +23,10 @@ Welcome to the Seerr Documentation.
- Localization into other languages.
- Support for **PostgreSQL** and **SQLite** databases.
- Support for various notification agents.
- Easily **Watchlist** or **Blacklist** media.
- Easily **Watchlist** or **Blocklist** media.
- More features to come!

## We need your help!
## We need your help

[Seerr](https://github.com/seerr-team/seerr) is an ambitious project developers/contributors poured a lot of work into, and we still have a lot more to do. Seerr is the result of a collaborative effort between the original Overseerr project and the Jellyseerr fork, created to deliver an excellent request management solution for Plex, Jellyfin and Emby users.

Expand Down
2 changes: 1 addition & 1 deletion docs/using-seerr/backups.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ These settings are stored in the `settings.json` file located in the Seerr data

## User Data

Apart from the settings, all other data—including user accounts, media requests, blacklist etc. are stored in the database (either SQLite or PostgreSQL).
Apart from the settings, all other data—including user accounts, media requests, blocklist etc. are stored in the database (either SQLite or PostgreSQL).

# Backup

Expand Down
12 changes: 6 additions & 6 deletions docs/using-seerr/settings/general.md
Original file line number Diff line number Diff line change
Expand Up @@ -62,13 +62,13 @@ Set the default display language for Seerr. Users can override this setting in t

These settings filter content shown on the "Discover" home page based on regional availability and original language, respectively. The Streaming Region filters the available streaming providers on the media page. Users can override these global settings by configuring these same options in their user settings.

## Blacklist Content with Tags and Limit Content Blacklisted per Tag
## Blocklist Content with Tags and Limit Content Blocklisted per Tag

These settings blacklist any TV shows or movies that have one of the entered tags. The "Process Blacklisted Tags" job adds entries to the blacklist based on the configured blacklisted tags. If a blacklisted tag is removed, any media blacklisted under that tag will be removed from the blacklist when the "Process Blacklisted Tags" job runs.
These settings blocklist any TV shows or movies that have one of the entered tags. The "Process Blocklisted Tags" job adds entries to the blocklist based on the configured blocklisted tags. If a blocklisted tag is removed, any media blocklisted under that tag will be removed from the blocklist when the "Process Blocklisted Tags" job runs.

The limit setting determines how many pages per tag the job will process, with each page containing 20 entries. The job cycles through all 16 available discovery sort options, querying the defined number of pages to blacklist media that is most likely to appear at the top of each sort. Higher limits will create a more accurate blacklist, but will require more storage.
The limit setting determines how many pages per tag the job will process, with each page containing 20 entries. The job cycles through all 16 available discovery sort options, querying the defined number of pages to blocklist media that is most likely to appear at the top of each sort. Higher limits will create a more accurate blocklist, but will require more storage.

Blacklisted tags are disabled until at least one tag is entered. These settings cannot be overridden in user settings.
Blocklisted tags are disabled until at least one tag is entered. These settings cannot be overridden in user settings.

## Hide Available Media

Expand All @@ -78,9 +78,9 @@ Available media will still appear in search results, however, so it is possible

This setting is **disabled** by default.

## Hide Blacklisted Items
## Hide Blocklisted Items

When enabled, media that has been blacklisted will not appear on the "Discover" home page, for all administrators. This can be useful to hide content that you don't want to see, such as content with specific tags or content that has been manually blacklisted when you have the "Manage Blacklist" permission.
When enabled, media that has been blocklisted will not appear on the "Discover" home page, for all administrators. This can be useful to hide content that you don't want to see, such as content with specific tags or content that has been manually blocklisted when you have the "Manage Blocklist" permission.

This setting is **disabled** by default.

Expand Down
38 changes: 19 additions & 19 deletions seerr-api.yml
Original file line number Diff line number Diff line change
Expand Up @@ -38,8 +38,8 @@ tags:
description: Endpoints related to getting service (Radarr/Sonarr) details.
- name: watchlist
description: Collection of media to watch later
- name: blacklist
description: Blacklisted media from discovery page.
- name: blocklist
description: Blocklisted media from discovery page.
servers:
- url: '{server}/api/v1'
variables:
Expand All @@ -48,7 +48,7 @@ servers:

components:
schemas:
Blacklist:
Blocklist:
type: object
properties:
tmdbId:
Expand Down Expand Up @@ -4529,10 +4529,10 @@ paths:
restricted:
type: boolean
example: false
/blacklist:
/blocklist:
get:
summary: Returns blacklisted items
description: Returns list of all blacklisted media
summary: Returns blocklisted items
description: Returns list of all blocklisted media
tags:
- settings
parameters:
Expand All @@ -4558,11 +4558,11 @@ paths:
name: filter
schema:
type: string
enum: [all, manual, blacklistedTags]
enum: [all, manual, blocklistedTags]
default: manual
responses:
'200':
description: Blacklisted items returned
description: Blocklisted items returned
content:
application/json:
schema:
Expand Down Expand Up @@ -4593,25 +4593,25 @@ paths:
type: number
example: 438631
post:
summary: Add media to blacklist
summary: Add media to blocklist
tags:
- blacklist
- blocklist
requestBody:
required: true
content:
application/json:
schema:
$ref: '#/components/schemas/Blacklist'
$ref: '#/components/schemas/Blocklist'
responses:
'201':
description: Item succesfully blacklisted
description: Item succesfully blocklisted
'412':
description: Item has already been blacklisted
/blacklist/{tmdbId}:
description: Item has already been blocklisted
/blocklist/{tmdbId}:
get:
summary: Get media from blacklist
summary: Get media from blocklist
tags:
- blacklist
- blocklist
parameters:
- in: path
name: tmdbId
Expand All @@ -4622,11 +4622,11 @@ paths:
type: string
responses:
'200':
description: Blacklist details in JSON
description: Blocklist details in JSON
delete:
summary: Remove media from blacklist
summary: Remove media from blocklist
tags:
- blacklist
- blocklist
parameters:
- in: path
name: tmdbId
Expand Down
2 changes: 1 addition & 1 deletion server/constants/media.ts
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,6 @@ export enum MediaStatus {
PROCESSING,
PARTIALLY_AVAILABLE,
AVAILABLE,
BLACKLISTED,
BLOCKLISTED,
DELETED,
}
44 changes: 22 additions & 22 deletions server/entity/Blacklist.ts → server/entity/Blocklist.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import { MediaStatus, type MediaType } from '@server/constants/media';
import dataSource from '@server/datasource';
import Media from '@server/entity/Media';
import { User } from '@server/entity/User';
import type { BlacklistItem } from '@server/interfaces/api/blacklistInterfaces';
import type { BlocklistItem } from '@server/interfaces/api/blocklistInterfaces';
import { DbAwareColumn } from '@server/utils/DbColumnHelper';
import type { EntityManager } from 'typeorm';
import {
Expand All @@ -19,7 +19,7 @@ import type { ZodNumber, ZodOptional, ZodString } from 'zod';

@Entity()
@Unique(['tmdbId'])
export class Blacklist implements BlacklistItem {
export class Blocklist implements BlocklistItem {
@PrimaryGeneratedColumn()
public id: number;

Expand All @@ -38,65 +38,65 @@ export class Blacklist implements BlacklistItem {
})
user?: User;

@OneToOne(() => Media, (media) => media.blacklist, {
@OneToOne(() => Media, (media) => media.blocklist, {
onDelete: 'CASCADE',
})
@JoinColumn()
public media: Media;

@Column({ nullable: true, type: 'varchar' })
public blacklistedTags?: string;
public blocklistedTags?: string;

@DbAwareColumn({ type: 'datetime', default: () => 'CURRENT_TIMESTAMP' })
public createdAt: Date;

constructor(init?: Partial<Blacklist>) {
constructor(init?: Partial<Blocklist>) {
Object.assign(this, init);
}

public static async addToBlacklist(
public static async addToBlocklist(
{
blacklistRequest,
blocklistRequest,
}: {
blacklistRequest: {
blocklistRequest: {
mediaType: MediaType;
title?: ZodOptional<ZodString>['_output'];
tmdbId: ZodNumber['_output'];
blacklistedTags?: string;
blocklistedTags?: string;
};
},
entityManager?: EntityManager
): Promise<void> {
const em = entityManager ?? dataSource;
const blacklist = new this({
...blacklistRequest,
const blocklist = new this({
...blocklistRequest,
});

const mediaRepository = em.getRepository(Media);
let media = await mediaRepository.findOne({
where: {
tmdbId: blacklistRequest.tmdbId,
tmdbId: blocklistRequest.tmdbId,
},
});

const blacklistRepository = em.getRepository(this);
const blocklistRepository = em.getRepository(this);

await blacklistRepository.save(blacklist);
await blocklistRepository.save(blocklist);

if (!media) {
media = new Media({
tmdbId: blacklistRequest.tmdbId,
status: MediaStatus.BLACKLISTED,
status4k: MediaStatus.BLACKLISTED,
mediaType: blacklistRequest.mediaType,
blacklist: Promise.resolve(blacklist),
tmdbId: blocklistRequest.tmdbId,
status: MediaStatus.BLOCKLISTED,
status4k: MediaStatus.BLOCKLISTED,
mediaType: blocklistRequest.mediaType,
blocklist: Promise.resolve(blocklist),
});

await mediaRepository.save(media);
} else {
media.blacklist = Promise.resolve(blacklist);
media.status = MediaStatus.BLACKLISTED;
media.status4k = MediaStatus.BLACKLISTED;
media.blocklist = Promise.resolve(blocklist);
media.status = MediaStatus.BLOCKLISTED;
media.status4k = MediaStatus.BLOCKLISTED;

await mediaRepository.save(media);
}
Expand Down
6 changes: 3 additions & 3 deletions server/entity/Media.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import SonarrAPI from '@server/api/servarr/sonarr';
import { MediaStatus, MediaType } from '@server/constants/media';
import { MediaServerType } from '@server/constants/server';
import { getRepository } from '@server/datasource';
import { Blacklist } from '@server/entity/Blacklist';
import { Blocklist } from '@server/entity/Blocklist';
import type { User } from '@server/entity/User';
import { Watchlist } from '@server/entity/Watchlist';
import type { DownloadingItem } from '@server/lib/downloadtracker';
Expand Down Expand Up @@ -123,8 +123,8 @@ class Media {
@OneToMany(() => Issue, (issue) => issue.media, { cascade: true })
public issues: Issue[];

@OneToOne(() => Blacklist, (blacklist) => blacklist.media)
public blacklist: Promise<Blacklist>;
@OneToOne(() => Blocklist, (blocklist) => blocklist.media)
public blocklist: Promise<Blocklist>;

@DbAwareColumn({ type: 'datetime', default: () => 'CURRENT_TIMESTAMP' })
public createdAt: Date;
Expand Down
8 changes: 4 additions & 4 deletions server/entity/MediaRequest.ts
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ export class RequestPermissionError extends Error {}
export class QuotaRestrictedError extends Error {}
export class DuplicateMediaRequestError extends Error {}
export class NoSeasonsAvailableError extends Error {}
export class BlacklistedMediaError extends Error {}
export class BlocklistedMediaError extends Error {}

type MediaRequestOptions = {
isAutoRequest?: boolean;
Expand Down Expand Up @@ -139,14 +139,14 @@ export class MediaRequest {
mediaType: requestBody.mediaType,
});
} else {
if (media.status === MediaStatus.BLACKLISTED) {
logger.warn('Request for media blocked due to being blacklisted', {
if (media.status === MediaStatus.BLOCKLISTED) {
logger.warn('Request for media blocked due to being blocklisted', {
tmdbId: tmdbMedia.id,
mediaType: requestBody.mediaType,
label: 'Media Request',
});

throw new BlacklistedMediaError('This media is blacklisted.');
throw new BlocklistedMediaError('This media is blocklisted.');
}

if (media.status === MediaStatus.UNKNOWN && !requestBody.is4k) {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,15 +1,15 @@
import type { User } from '@server/entity/User';
import type { PaginatedResponse } from '@server/interfaces/api/common';

export interface BlacklistItem {
export interface BlocklistItem {
tmdbId: number;
mediaType: 'movie' | 'tv';
title?: string;
createdAt?: Date;
user?: User;
blacklistedTags?: string;
blocklistedTags?: string;
}

export interface BlacklistResultsResponse extends PaginatedResponse {
results: BlacklistItem[];
export interface BlocklistResultsResponse extends PaginatedResponse {
results: BlocklistItem[];
}
2 changes: 1 addition & 1 deletion server/interfaces/api/settingsInterfaces.ts
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ export interface PublicSettingsResponse {
applicationTitle: string;
applicationUrl: string;
hideAvailable: boolean;
hideBlacklisted: boolean;
hideBlocklisted: boolean;
localLogin: boolean;
mediaServerLogin: boolean;
movie4kEnabled: boolean;
Expand Down
Loading