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

Docker, error when searching and recent #105

Open
mrasmith opened this issue Jan 28, 2024 · 6 comments
Open

Docker, error when searching and recent #105

mrasmith opened this issue Jan 28, 2024 · 6 comments

Comments

@mrasmith
Copy link

I'm trying to run a local instance of debridmediamanager (in docker). Most lists work, i.e. browse/today, browse/best etc but I get this errors when I try recent:

Error: JSON.parse: unexpected character at line 1 column 1 of the JSON data

Also when I try use the search feature I get the following error:

Error: Invalid prisma.search.findUnique()invocation: error: Error validating datasourcedb: the URL must start with the protocol mysql://. --> schema.prisma:10 | 9 | provider = "mysql" 10 | url = env("DATABASE_URL") | Validation Error Count: 1

I believe I've set up the database correctly on PlanetScale as described on the setup instructions. I've also entered keys for TMDB, MDBLIST, OMDB and Jackett

Am I missing something else that's required ?

@alceasan
Copy link

Same problem here, using local database in my case. In any case, PlanetScale has already stop offering its free tier, so a local database option should also be included in the setup instructions.

@yowmamasita
Copy link
Collaborator

The ideal migration path would be to self host the database as well. It should be straightforward since I am using Prisma.

@amcgready
Copy link

Unfortunately, I am having the same errors on my end as well.

@12nick12
Copy link

12nick12 commented Jun 9, 2024

Is there a .sql file available to create the correct database schema since it appears the docker container doesn't create the schema on first start.

@st-ivan
Copy link

st-ivan commented Jun 20, 2024

Is there a .sql file available to create the correct database schema since it appears the docker container doesn't create the schema on first start.

facing this same issue. docker setup doesnt provide any search result. did you fix your setup?

@nicopowa
Copy link

nicopowa commented Nov 10, 2024

I read this issue and wrote a lazy prompt :

can you convert this prisma schema to mysql ? there is a problem with prisma findUnique

Search still not working but the error is gone.

CREATE TABLE `Cache` (
    `key` VARCHAR(191) NOT NULL,
    `value` JSON NOT NULL,
    `updatedAt` DATETIME(3) NOT NULL,
    PRIMARY KEY (`key`)
) DEFAULT CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci;

-- Create Scraped table
CREATE TABLE `Scraped` (
    `key` VARCHAR(191) NOT NULL,
    `value` JSON NOT NULL,
    `updatedAt` DATETIME(3) NOT NULL,
    PRIMARY KEY (`key`)
) DEFAULT CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci;

-- Create ScrapedTrue table
CREATE TABLE `ScrapedTrue` (
    `key` VARCHAR(191) NOT NULL,
    `value` JSON NOT NULL,
    `updatedAt` DATETIME(3) NOT NULL,
    PRIMARY KEY (`key`)
) DEFAULT CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci;

-- Create Search table
CREATE TABLE `Search` (
    `key` VARCHAR(191) NOT NULL,
    `value` JSON NOT NULL,
    `updatedAt` DATETIME(3) NOT NULL,
    PRIMARY KEY (`key`)
) DEFAULT CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci;

-- Create Cast table
CREATE TABLE `Cast` (
    `id` VARCHAR(191) NOT NULL,
    `imdbId` VARCHAR(191) NOT NULL,
    `userId` VARCHAR(191) NOT NULL,
    `hash` VARCHAR(191) NOT NULL,
    `url` VARCHAR(191) NOT NULL,
    `updatedAt` DATETIME(3) NOT NULL,
    `duration` INTEGER NOT NULL DEFAULT 0,
    `bitrate` INTEGER NOT NULL DEFAULT 0,
    `size` INTEGER NOT NULL DEFAULT 0,
    `mediaInfo` JSON NULL,
    PRIMARY KEY (`id`),
    UNIQUE INDEX `Cast_imdbId_userId_hash_key`(`imdbId`, `userId`, `hash`),
    INDEX `Cast_imdbId_userId_updatedAt_idx`(`imdbId`, `userId`, `updatedAt`)
) DEFAULT CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci;

-- Create Titles table
CREATE TABLE `Titles` (
    `imdbid` VARCHAR(191) NOT NULL,
    `title` VARCHAR(191) NOT NULL,
    `is_original_title` BOOLEAN NOT NULL,
    `year` INTEGER NOT NULL,
    PRIMARY KEY (`imdbid`),
    UNIQUE INDEX `Titles_imdbid_is_original_title_key`(`imdbid`, `is_original_title`),
    UNIQUE INDEX `Titles_imdbid_title_key`(`imdbid`, `title`)
) DEFAULT CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci;

-- Create Anime table
CREATE TABLE `Anime` (
    `id` INTEGER NOT NULL AUTO_INCREMENT,
    `anidb_id` INTEGER NULL,
    `anime_planet_id` VARCHAR(191) NULL,
    `kitsu_id` INTEGER NULL,
    `mal_id` INTEGER NULL,
    `imdb_id` VARCHAR(191) NULL,
    `title` VARCHAR(191) NOT NULL,
    `type` VARCHAR(191) NOT NULL,
    `aliases` JSON NOT NULL,
    `description` TEXT NOT NULL,
    `poster_url` VARCHAR(191) NOT NULL,
    `background_url` VARCHAR(191) NOT NULL,
    `rating` FLOAT NOT NULL,
    PRIMARY KEY (`id`),
    UNIQUE INDEX `Anime_anidb_id_key`(`anidb_id`),
    UNIQUE INDEX `Anime_anime_planet_id_key`(`anime_planet_id`),
    UNIQUE INDEX `Anime_kitsu_id_key`(`kitsu_id`),
    UNIQUE INDEX `Anime_mal_id_key`(`mal_id`),
    UNIQUE INDEX `Anime_imdb_id_key`(`imdb_id`),
    INDEX `Anime_anidb_id_idx`(`anidb_id`),
    INDEX `Anime_anime_planet_id_idx`(`anime_planet_id`),
    INDEX `Anime_kitsu_id_idx`(`kitsu_id`),
    INDEX `Anime_mal_id_idx`(`mal_id`),
    INDEX `Anime_imdb_id_idx`(`imdb_id`)
) DEFAULT CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci;

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

7 participants