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

Implement automatic sync #63

Merged
merged 48 commits into from
May 26, 2021
Merged
Show file tree
Hide file tree
Changes from 46 commits
Commits
Show all changes
48 commits
Select commit Hold shift + click to select a range
f808f59
Fix endless state loop in history pages
rafaelgomesxyz May 10, 2021
7433dc7
Add percentage watched for Netflix
rafaelgomesxyz May 10, 2021
a044f47
Fix Netflix watched date
rafaelgomesxyz May 10, 2021
c547b5b
Fix HBO Go scrobble/sync
rafaelgomesxyz May 10, 2021
8d4f7fe
Make saving/loading models easier
rafaelgomesxyz May 10, 2021
925d4d0
Add support for max value in number inputs
rafaelgomesxyz May 10, 2021
1bbbd38
Add option to filter history items by minimum percentage watched
rafaelgomesxyz May 10, 2021
003dd42
Change header buttons style
rafaelgomesxyz May 10, 2021
513a217
Implement rotating browser action icon
rafaelgomesxyz May 10, 2021
759a2a0
Allow enabling scrobble/sync separately
rafaelgomesxyz May 10, 2021
c6e63e5
Add option to enable automatic sync
rafaelgomesxyz May 10, 2021
e4149f3
Implement automatic sync cache
rafaelgomesxyz May 10, 2021
aa664c3
Allow loading items from different services in a single history page
rafaelgomesxyz May 10, 2021
779bad7
Remove item from the Trakt history when correcting an item that was a…
rafaelgomesxyz May 10, 2021
f5a8934
Allow adding missing watched date to multiple items at the same time
rafaelgomesxyz May 10, 2021
067a39e
Store options globally
rafaelgomesxyz May 16, 2021
b64834b
Replace regular tooltips with Material tooltips
rafaelgomesxyz May 12, 2021
4eaa446
Implement automatic sync
rafaelgomesxyz May 10, 2021
819d7fd
NB translations
MrMamen May 16, 2021
cb222c0
Fix bug that happens when enabling/disabling streaming service options
rafaelgomesxyz May 16, 2021
0f88463
Fix bug that does not show checkbox for items
rafaelgomesxyz May 17, 2021
3cdb7e5
Use initial last sync date for as long as the history page is open
rafaelgomesxyz May 17, 2021
00c5a96
Show better message when reaching the end of the history
rafaelgomesxyz May 17, 2021
d361b56
Fix bug that happens when clearing storage
rafaelgomesxyz May 19, 2021
0401a3f
Improve options layout
rafaelgomesxyz May 19, 2021
2fc0f42
Correct README
rafaelgomesxyz May 20, 2021
d87271c
Render empty auto sync page instead of rendering a blank page
rafaelgomesxyz May 20, 2021
2f9ca6d
Add button to continue loading history past last sync date
rafaelgomesxyz May 21, 2021
6f2d11d
Use hash history instead of browser history
rafaelgomesxyz May 22, 2021
b8bfe60
Improve options layout
rafaelgomesxyz May 22, 2021
0e3de3c
Store date format globally
rafaelgomesxyz May 23, 2021
6f56342
Show last sync date when hovering over the Clear Last Sync button
rafaelgomesxyz May 23, 2021
abf3478
Improve how models are saved/loaded
rafaelgomesxyz May 23, 2021
938ff1e
Store release date as moment instead of string
rafaelgomesxyz May 23, 2021
d6a8eb2
Change how adding with release date works
rafaelgomesxyz May 24, 2021
a150c4b
Add option to add with release date only for items that are missing t…
rafaelgomesxyz May 24, 2021
0883148
Fix bug that only checks services to sync if a scrobbler is enabled
rafaelgomesxyz May 24, 2021
afd49dc
Show that the auto sync is happening when hovering over the browser a…
rafaelgomesxyz May 24, 2021
f394175
NB translations
MrMamen May 24, 2021
bbafc5d
Ignore translation keys for specific files
rafaelgomesxyz May 25, 2021
dd4b8df
Implement logic to upgrade/downgrade storage if necessary
rafaelgomesxyz May 25, 2021
6c90334
Remove all items of a service from sync cache when clearing last sync…
rafaelgomesxyz May 26, 2021
cefe734
Fix bug that does not save last sync date when syncing
rafaelgomesxyz May 26, 2021
58c37fe
Trigger auto sync check when enabling/disabling auto sync or changing…
rafaelgomesxyz May 26, 2021
771f2a5
Save current date instead of the item watched date during auto sync
rafaelgomesxyz May 26, 2021
95799e0
Fix bug that duplicates auto sync cache
rafaelgomesxyz May 26, 2021
f65fc8a
Refresh options component when they change in another tab
rafaelgomesxyz May 26, 2021
ed93331
Fix errors
rafaelgomesxyz May 26, 2021
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 4 additions & 1 deletion .eslintrc.js
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,10 @@ module.exports = {
],
},
settings: {
'@rafaelgomesxyz/i18n-json/ignore-keys': ['*.description', '*.placeholders'],
'@rafaelgomesxyz/i18n-json/ignore-keys': {
'**': ['*.description', '*.placeholders'],
'**/pt_BR/**': ['serviceScrobble'],
},
},
},
{
Expand Down
5 changes: 4 additions & 1 deletion .eslintrc.typed.js
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,10 @@ module.exports = {
],
},
settings: {
'@rafaelgomesxyz/i18n-json/ignore-keys': ['*.description', '*.placeholders'],
'@rafaelgomesxyz/i18n-json/ignore-keys': {
'**': ['*.description', '*.placeholders'],
'**/pt_BR/**': ['serviceScrobble'],
},
},
},
{
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ If you want to scrobble / sync from Netflix, this is the only Trakt.tv [plugin](
### Which streaming services are supported?

- Amazon Prime (Scrobble only)
- HBO Go (Scrobble only - tested only for Latin America)
- HBO Go (Only available for Latin America, can only sync the 30 last watched items)
- Netflix
- NRK
- Viaplay (Sync only)
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@
"@babel/preset-typescript": "^7.10.4",
"@babel/runtime": "^7.11.2",
"@octokit/rest": "^18.0.4",
"@rafaelgomesxyz/eslint-plugin-i18n-json": "^3.1.2",
"@rafaelgomesxyz/eslint-plugin-i18n-json": "^3.2.0",
"@svgr/webpack": "^5.4.0",
"@types/fs-extra": "^9.0.1",
"@types/gulp": "^4.0.6",
Expand Down
8 changes: 4 additions & 4 deletions pnpm-lock.yaml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

99 changes: 92 additions & 7 deletions src/_locales/en/messages.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,15 @@
"add": {
"message": "Add"
},
"addDate": {
"message": "Add date"
},
"addMissingWatchedDateFailed": {
"message": "Failed to add missing watched date."
},
"addWithReleaseDateMissingName": {
"message": "Add with release date only for items that are missing the watched date."
},
"addWithReleaseDateName": {
"message": "Add with release date."
},
Expand All @@ -23,6 +29,18 @@
"appDescription": {
"message": "A universal sync for Trakt.tv."
},
"autoSync": {
"message": "Automatic Sync"
},
"autoSyncNotActivated": {
"message": "Automatic sync not activated. You need to sync manually in the history page first, so that the last sync date can be saved."
},
"autoSyncPageMessage": {
"message": "These are the items that were automatically synced or failed to automatically sync since the last review. If any corrections are needed, apply them, select the items that need to be corrected, and click the Sync button. When you do that, the cache will be deleted and these items will no longer appear on this page. If no corrections are needed, simply click the Clear Sync Cache button and the same thing will happen."
},
"autoSyncing": {
"message": "Automatically syncing..."
},
"cancel": {
"message": "Cancel"
},
Expand All @@ -32,6 +50,9 @@
"cannotSyncMissingWatchedDate": {
"message": "Some items are missing the watched date. Resolve each item or enable the option to add with release date and try again."
},
"clearLastSync": {
"message": "Clear Last Sync Date"
},
"clearStorage": {
"message": "Clear Storage"
},
Expand All @@ -41,6 +62,9 @@
"clearStorageSuccess": {
"message": "Storage cleared."
},
"clearSyncCache": {
"message": "Clear Sync Cache"
},
"clearTraktCache": {
"message": "Clear Trakt Cache"
},
Expand All @@ -54,18 +78,38 @@
"description": "This is the verb, as in 'to close'.",
"message": "Close"
},
"confirmClearLastSyncMessage": {
"message": "You'll need to sync manually in the history page of the streaming service again to reactivate the automatic sync."
},
"confirmClearLastSyncTitle": {
"message": "Clear last sync date for $SERVICE$?",
"placeholders": {
"service": {
"content": "$1"
}
}
},
"confirmClearStorageMessage": {
"message": "All of the options will be reset to their default values and you will have to login again."
},
"confirmClearStorageTitle": {
"message": "Clear storage?"
},
"confirmClearSyncCacheMessage": {
"message": "All of the items in the current page will be removed from the cache and you'll no longer be able to review them."
},
"confirmClearSyncCacheTitle": {
"message": "Clear sync cache?"
},
"confirmClearTraktCacheMessage": {
"message": "All of the items you have corrected will be reset."
},
"confirmClearTraktCacheTitle": {
"message": "Clear Trakt cache?"
},
"continueLoading": {
"message": "Continue Loading"
},
"correct": {
"description": "This is the verb, as in 'to correct'.",
"message": "Correct"
Expand All @@ -82,11 +126,11 @@
"darkTheme": {
"message": "Dark"
},
"disableScrobblingDescription": {
"message": "With this option enabled, the extension will not automatically scrobble what you are watching. This is useful if you only want to use the history sync."
"days": {
"message": "Days"
},
"disableScrobblingName": {
"message": "Disable scrobbling."
"daysDescription": {
"message": "How often the automatic sync will happen."
},
"errorNotification": {
"message": "An error has occurred. :("
Expand All @@ -103,6 +147,9 @@
"from": {
"message": "from"
},
"goToHistoryPage": {
"message": "Go to History Page"
},
"grantCookiesDescription": {
"message": "With this option enabled, the extension will work with Firefox Containers, by retrieving the cookies from the current container that you are on. Only enable it if you use Firefox Containers."
},
Expand Down Expand Up @@ -144,6 +191,9 @@
"itemsPerLoadName": {
"message": "Items per load."
},
"lastSync": {
"message": "Last Sync Date"
},
"lightTheme": {
"message": "Light"
},
Expand All @@ -162,6 +212,9 @@
"logout": {
"message": "Logout"
},
"minPercentageWatchedName": {
"message": "Minimum percentage watched."
},
"missingWatchedDate": {
"message": "Missing watched date"
},
Expand All @@ -173,6 +226,14 @@
}
}
},
"missingWatchedDateDialogContentMultiple": {
"message": "Choose how you want to add the missing watched date for the $ITEMS$ items.",
"placeholders": {
"items": {
"content": "$1"
}
}
},
"missingWatchedDateDialogDateLabel": {
"message": "Select the date"
},
Expand All @@ -185,12 +246,12 @@
"no": {
"message": "No"
},
"noMoreHistory": {
"message": "Reached the end of the history."
},
"noStreamingServices": {
"message": "No streaming services enabled. You can enable streaming services in the options page."
},
"notAvailable": {
"message": "Not Available"
},
"notFound": {
"message": "Not Found"
},
Expand Down Expand Up @@ -220,9 +281,21 @@
}
}
},
"reachedHistoryEnd": {
"message": "Reached the end of the history."
},
"reachedLastSyncDate": {
"message": "Reached the last sync date. If you wish to load items past this point, click the button below."
},
"readMore": {
"message": "Read More"
},
"recentAutoSync": {
"message": "Some items were recently automatically synced. Click here to review them and make sure that the correct items were synced."
},
"recentAutoSyncError": {
"message": "Some items recently failed to automatically sync. Click here to review and correct them."
},
"save": {
"message": "Save"
},
Expand Down Expand Up @@ -262,6 +335,15 @@
"sendReceiveSuggestionsName": {
"message": "Send / receive correction suggestions."
},
"service": {
"message": "Service"
},
"serviceScrobble": {
"message": "Scrobble"
},
"serviceSync": {
"message": "Sync"
},
"showNotificationsDescription": {
"message": "With this option enabled, you will receive browser notifications whenever you start / stop scrobbling something."
},
Expand Down Expand Up @@ -337,6 +419,9 @@
"wrongItemDialogInvalidUrlLabel": {
"message": "Please enter a valid Trakt URL!"
},
"wrongItemDialogSyncedWarning": {
"message": "WARNING: You are correcting an item that was already synced. If you proceed, the previously synced item will be removed from your Trakt history."
},
"yes": {
"message": "Yes"
}
Expand Down
Loading