Skip to content

Commit

Permalink
boost and search fix
Browse files Browse the repository at this point in the history
  • Loading branch information
Ben Sarmiento committed Aug 27, 2023
1 parent 9f48279 commit e1768ce
Show file tree
Hide file tree
Showing 3 changed files with 2 additions and 1 deletion.
1 change: 1 addition & 0 deletions src/services/btdigg.ts
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,7 @@ export const flattenAndRemoveDuplicates = (arr: SearchResult[][]): SearchResult[

export const groupByParsedTitle = (results: SearchResult[]): SearchResult[] => {
const frequency: Record<string, number> = {};
results = results.filter((result) => result.info.title);
for (const result of results) {
const mediaId = getMediaId(result.info, result.mediaType, true);
if (mediaId in frequency) {
Expand Down
1 change: 1 addition & 0 deletions src/services/planetscale.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ export class PlanetScaleCache {

constructor() {
this.prisma = new PrismaClient();
this.prisma.$queryRaw`SET @@boost_cached_queries = true`
}

public async cacheJsonValue<T>(key: string[], value: T) {
Expand Down
1 change: 0 additions & 1 deletion src/utils/mediaId.ts
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,6 @@ export const getMediaId = (
return `${systemOnlyId ? info.title.toLocaleLowerCase() : info.title}${
info.year ? ` (${info.year})` : ''
}`;

const { title, seasons, fullSeason, isMultiSeason, episodeNumbers } = info as ParsedShow;
const titleStr = systemOnlyId ? title.toLocaleLowerCase() : title;
if (tvShowTitleOnly) {
Expand Down

0 comments on commit e1768ce

Please sign in to comment.