Compare commits

..

4 Commits

Author SHA1 Message Date
Chuck
4f96b69f1d Merge pull request #88 from ChuckPa/chuckpa/Prevent-Negative-Watch-Counts
DBRepair:   Prevent negative watch counts
2023-07-30 00:48:29 -04:00
ChuckPa
d54a44b2d8 Release notes. 2023-07-30 00:45:22 -04:00
Chuck
6307a9a5bf Merge pull request #87 from ChuckPa/chuckpa/Prevent-Negative-Watch-Counts
DBRepair:   Prevent negative watch counts
2023-07-30 00:41:21 -04:00
ChuckPa
91959549ac DBRepair: Prevent negative watch counts
Changes grouping and deletion.
Thanks @tkkg1994
2023-07-30 00:39:23 -04:00
2 changed files with 7 additions and 3 deletions

View File

@@ -1297,9 +1297,8 @@ DoImport(){
if [ $PurgeDuplicates -eq 1 ]; then if [ $PurgeDuplicates -eq 1 ]; then
cat <<EOF | "$PLEX_SQLITE" "$TMPDIR/$CPPL.db-IMPORT-$TimeStamp" cat <<EOF | "$PLEX_SQLITE" "$TMPDIR/$CPPL.db-IMPORT-$TimeStamp"
DELETE FROM metadata_item_settings DELETE FROM metadata_item_settings
WHERE id in (SELECT MIN(id) WHERE rowid NOT IN
FROM metadata_item_settings ( SELECT MIN(rowid) FROM metadata_item_settings GROUP BY guid, account_id );
GROUP BY guid HAVING COUNT(guid) > 1);
EOF EOF
fi fi

View File

@@ -9,6 +9,11 @@
# Release Info: # Release Info:
v1.0.10
- Correct bug when importing watch lists. Negative watch counts could occur.
This release corrects the issue.
v1.0.9 v1.0.9
- When recovering a damaged database, it is sometimes necessary to ignore constraint errors resulting from damaged indexes. - When recovering a damaged database, it is sometimes necessary to ignore constraint errors resulting from damaged indexes.