Skip to content

Commit

Permalink
chore: trim whitespaces for the last commit
Browse files Browse the repository at this point in the history
Since I forgot.

[skip ci]
  • Loading branch information
revam committed Dec 7, 2024
1 parent 6fe68cd commit 2880905
Show file tree
Hide file tree
Showing 2 changed files with 45 additions and 45 deletions.
62 changes: 31 additions & 31 deletions Shoko.Server/Repositories/Cached/AnimeEpisodeRepository.cs
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ public SVR_AnimeEpisode GetByAniDBEpisodeID(int epid)


/// <summary>
/// Get the AnimeEpisode
/// Get the AnimeEpisode
/// </summary>
/// <param name="name">The filename of the anime to search for.</param>
/// <returns>the AnimeEpisode given the file information</returns>
Expand Down Expand Up @@ -132,61 +132,61 @@ public List<SVR_AnimeEpisode> GetWithMultipleReleases(bool ignoreVariations, int
}

private const string DuplicateFilesWithAnimeQuery = @"
SELECT
SELECT
ani.EpisodeID
FROM
FROM
(
SELECT
vlp.VideoLocal_Place_ID,
vl.FileSize,
SELECT
vlp.VideoLocal_Place_ID,
vl.FileSize,
vl.Hash
FROM
FROM
VideoLocal AS vl
INNER JOIN
VideoLocal_Place AS vlp
INNER JOIN
VideoLocal_Place AS vlp
ON vlp.VideoLocalID = vl.VideoLocalID
WHERE
WHERE
vl.Hash != ''
GROUP BY
GROUP BY
vl.VideoLocalID
HAVING
HAVING
COUNT(vl.VideoLocalID) > 1
) AS filtered_vlp
INNER JOIN
CrossRef_File_Episode ani
ON filtered_vlp.Hash = ani.Hash
INNER JOIN
CrossRef_File_Episode ani
ON filtered_vlp.Hash = ani.Hash
AND filtered_vlp.FileSize = ani.FileSize
WHERE ani.AnimeID = :animeID
GROUP BY
GROUP BY
ani.EpisodeID
";

private const string DuplicateFilesQuery = @"
SELECT
SELECT
ani.EpisodeID
FROM
FROM
(
SELECT
vlp.VideoLocal_Place_ID,
vl.FileSize,
SELECT
vlp.VideoLocal_Place_ID,
vl.FileSize,
vl.Hash
FROM
FROM
VideoLocal AS vl
INNER JOIN
VideoLocal_Place AS vlp
INNER JOIN
VideoLocal_Place AS vlp
ON vlp.VideoLocalID = vl.VideoLocalID
WHERE
WHERE
vl.Hash != ''
GROUP BY
GROUP BY
vl.VideoLocalID
HAVING
HAVING
COUNT(vl.VideoLocalID) > 1
) AS filtered_vlp
INNER JOIN
CrossRef_File_Episode ani
ON filtered_vlp.Hash = ani.Hash
INNER JOIN
CrossRef_File_Episode ani
ON filtered_vlp.Hash = ani.Hash
AND filtered_vlp.FileSize = ani.FileSize
GROUP BY
GROUP BY
ani.EpisodeID
";

Expand Down
28 changes: 14 additions & 14 deletions Shoko.Server/Repositories/Cached/AnimeSeriesRepository.cs
Original file line number Diff line number Diff line change
Expand Up @@ -346,29 +346,29 @@ public List<SVR_AnimeSeries> GetWithMultipleReleases(bool ignoreVariations)
private const string DuplicateFilesQuery = @"
SELECT DISTINCT
ani.AnimeID
FROM
FROM
(
SELECT
vlp.VideoLocal_Place_ID,
vl.FileSize,
SELECT
vlp.VideoLocal_Place_ID,
vl.FileSize,
vl.Hash
FROM
FROM
VideoLocal AS vl
INNER JOIN
VideoLocal_Place AS vlp
INNER JOIN
VideoLocal_Place AS vlp
ON vlp.VideoLocalID = vl.VideoLocalID
WHERE
WHERE
vl.Hash != ''
GROUP BY
GROUP BY
vl.VideoLocalID
HAVING
HAVING
COUNT(vl.VideoLocalID) > 1
) AS vlp_selected
INNER JOIN
CrossRef_File_Episode ani
ON vlp_selected.Hash = ani.Hash
INNER JOIN
CrossRef_File_Episode ani
ON vlp_selected.Hash = ani.Hash
AND vlp_selected.FileSize = ani.FileSize
GROUP BY
GROUP BY
ani.AnimeID
";

Expand Down

0 comments on commit 2880905

Please sign in to comment.