Normalize to double quotes across all files with Prettier

This commit is contained in:
X4Lo committed 2026-06-21 22:28:08 +01:00
1 parent 73bff72cec
commit a5659cf4c8
190 files changed
+9523 -8859

No files matched your search

+33 -35
View File
@@ -5,14 +5,12 @@ const Entry = require("../models/Entry");
const Genre = require("../models/Genre");
const Media = require("../models/Media");
async function initializeData() {
initializeGenres();
//markEntriesRequireCreditsSync();
// migrateAccuracyField();
}
// const collections = await Collection.findAll({
// where: {
// posterPath: { [Sequelize.Op.notLike]: '/%' }
@@ -36,14 +34,14 @@ async function initializeData() {
async function markEntriesRequireCreditsSync() {
try {
const [affectedCount] = await Entry.update(
{ entry_sync_status: 'RequireCreditsSync' },
{ where: { entry_sync_status: null } }
{ entry_sync_status: "RequireCreditsSync" },
{ where: { entry_sync_status: null } },
);
if (affectedCount > 0) {
console.log(`Marked ${affectedCount} entries as RequireCreditsSync`);
}
} catch (error) {
console.error('Error marking entries for credits sync:', error);
console.error("Error marking entries for credits sync:", error);
}
}
@@ -51,33 +49,33 @@ async function initializeGenres() {
try {
// * data to insert:
const initialGenres = [
{ id: 10759, name: 'Action & Adventure' },
{ id: 16, name: 'Animation' },
{ id: 35, name: 'Comedy' },
{ id: 80, name: 'Crime' },
{ id: 99, name: 'Documentary' },
{ id: 18, name: 'Drama' },
{ id: 10751, name: 'Family' },
{ id: 10762, name: 'Kids' },
{ id: 9648, name: 'Mystery' },
{ id: 10763, name: 'News' },
{ id: 10764, name: 'Reality' },
{ id: 10765, name: 'Sci-Fi & Fantasy' },
{ id: 10766, name: 'Soap' },
{ id: 10767, name: 'Talk' },
{ id: 10768, name: 'War & Politics' },
{ id: 37, name: 'Western' },
{ id: 28, name: 'Action' },
{ id: 12, name: 'Adventure' },
{ id: 14, name: 'Fantasy' },
{ id: 36, name: 'History' },
{ id: 27, name: 'Horror' },
{ id: 10402, name: 'Music' },
{ id: 10749, name: 'Romance' },
{ id: 878, name: 'Science Fiction' },
{ id: 10770, name: 'TV Movie' },
{ id: 53, name: 'Thriller' },
{ id: 10752, name: 'War' }
{ id: 10759, name: "Action & Adventure" },
{ id: 16, name: "Animation" },
{ id: 35, name: "Comedy" },
{ id: 80, name: "Crime" },
{ id: 99, name: "Documentary" },
{ id: 18, name: "Drama" },
{ id: 10751, name: "Family" },
{ id: 10762, name: "Kids" },
{ id: 9648, name: "Mystery" },
{ id: 10763, name: "News" },
{ id: 10764, name: "Reality" },
{ id: 10765, name: "Sci-Fi & Fantasy" },
{ id: 10766, name: "Soap" },
{ id: 10767, name: "Talk" },
{ id: 10768, name: "War & Politics" },
{ id: 37, name: "Western" },
{ id: 28, name: "Action" },
{ id: 12, name: "Adventure" },
{ id: 14, name: "Fantasy" },
{ id: 36, name: "History" },
{ id: 27, name: "Horror" },
{ id: 10402, name: "Music" },
{ id: 10749, name: "Romance" },
{ id: 878, name: "Science Fiction" },
{ id: 10770, name: "TV Movie" },
{ id: 53, name: "Thriller" },
{ id: 10752, name: "War" },
];
// * Check if the data already exists
@@ -85,7 +83,7 @@ async function initializeGenres() {
// ? If data already exists, return
if (existingGenres.length == initialGenres.length) {
console.log('Genres already initialized');
console.log("Genres already initialized");
return;
}
@@ -94,7 +92,7 @@ async function initializeGenres() {
console.log(`${initialGenres.length} Genres initialized successfully`);
} catch (error) {
console.error('Error initializing data:', error);
console.error("Error initializing data:", error);
}
}
@@ -102,7 +100,7 @@ module.exports = {
initializeData,
initializeGenres,
markEntriesRequireCreditsSync,
}
};
// async function migrateAccuracyField() {
// try {