-
Notifications
You must be signed in to change notification settings - Fork 17
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #500 from leepeuker/add-stevenlu-list-for-radarr
Add a Radarr feed URL for watchlist sync
- Loading branch information
Showing
19 changed files
with
546 additions
and
9 deletions.
There are no files selected for viewing
24 changes: 24 additions & 0 deletions
24
db/migrations/mysql/20230908191445_AddRadarrFeedUuidColumnToUserTable.php
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
<?php declare(strict_types=1); | ||
|
||
use Phinx\Migration\AbstractMigration; | ||
|
||
final class AddRadarrFeedUuidColumnToUserTable extends AbstractMigration | ||
{ | ||
public function down() : void | ||
{ | ||
$this->execute( | ||
<<<SQL | ||
ALTER TABLE user DROP COLUMN radarr_feed_uuid | ||
SQL, | ||
); | ||
} | ||
|
||
public function up() : void | ||
{ | ||
$this->execute( | ||
<<<SQL | ||
ALTER TABLE user ADD COLUMN radarr_feed_uuid CHAR(36) DEFAULT NULL AFTER plex_scrobble_ratings | ||
SQL, | ||
); | ||
} | ||
} |
208 changes: 208 additions & 0 deletions
208
db/migrations/sqlite/20230908191445_AddRadarrFeedUuidColumnToUserTable.php
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,208 @@ | ||
<?php declare(strict_types=1); | ||
|
||
use Phinx\Migration\AbstractMigration; | ||
|
||
final class AddRadarrFeedUuidColumnToUserTable extends AbstractMigration | ||
{ | ||
public function down() : void | ||
{ | ||
$this->execute( | ||
<<<SQL | ||
CREATE TABLE `tmp_user` ( | ||
`id` INTEGER, | ||
`email` TEXT NOT NULL, | ||
`name` TEXT NOT NULL, | ||
`password` TEXT NOT NULL, | ||
`totp_uri` TEXT DEFAULT NULL, | ||
`is_admin` TINYINT(1) DEFAULT 0, | ||
`dashboard_visible_rows` TEXT DEFAULT NULL, | ||
`dashboard_extended_rows` TEXT DEFAULT NULL, | ||
`dashboard_order_rows` TEXT DEFAULT NULL, | ||
`jellyfin_access_token` TEXT DEFAULT NULL, | ||
`jellyfin_user_id` TEXT DEFAULT NULL, | ||
`jellyfin_server_url` TEXT DEFAULT NULL, | ||
`jellyfin_sync_enabled` TINYINT(1) DEFAULT 0, | ||
`privacy_level` INTEGER DEFAULT 1, | ||
`date_format_id` INTEGER DEFAULT 0, | ||
`trakt_user_name` TEXT, | ||
`plex_webhook_uuid` TEXT, | ||
`jellyfin_webhook_uuid` TEXT, | ||
`emby_webhook_uuid` TEXT, | ||
`trakt_client_id` TEXT, | ||
`plex_client_id` TEXT DEFAULT NULL, | ||
`plex_client_temporary_code` TEXT DEFAULT NULL, | ||
`plex_access_token` TEXT DEFAULT NULL, | ||
`plex_account_id` TEXT DEFAULT NULL, | ||
`plex_server_url` TEXT DEFAULT NULL, | ||
`jellyfin_scrobble_views` INTEGER DEFAULT 1, | ||
`emby_scrobble_views` INTEGER DEFAULT 1, | ||
`plex_scrobble_views` INTEGER DEFAULT 1, | ||
`plex_scrobble_ratings` INTEGER DEFAULT 0, | ||
`watchlist_automatic_removal_enabled` INTEGER DEFAULT 1, | ||
`country` TEXT DEFAULT NULL, | ||
`core_account_changes_disabled` INTEGER DEFAULT 0, | ||
`created_at` TEXT NOT NULL, | ||
PRIMARY KEY (`id`), | ||
UNIQUE (`email`), | ||
UNIQUE (`name`) | ||
) | ||
SQL, | ||
); | ||
$this->execute( | ||
'INSERT INTO `tmp_user` ( | ||
`id`, | ||
`email`, | ||
`name`, | ||
`password`, | ||
`totp_uri`, | ||
`is_admin`, | ||
`dashboard_visible_rows`, | ||
`dashboard_extended_rows`, | ||
`dashboard_order_rows`, | ||
`jellyfin_access_token`, | ||
`jellyfin_user_id`, | ||
`jellyfin_server_url`, | ||
`privacy_level`, | ||
`date_format_id`, | ||
`trakt_user_name`, | ||
`plex_webhook_uuid`, | ||
`jellyfin_webhook_uuid`, | ||
`emby_webhook_uuid`, | ||
`trakt_client_id`, | ||
`plex_client_id`, | ||
`plex_client_temporary_code`, | ||
`plex_access_token`, | ||
`plex_account_id`, | ||
`plex_server_url`, | ||
`jellyfin_scrobble_views`, | ||
`emby_scrobble_views`, | ||
`plex_scrobble_views`, | ||
`plex_scrobble_ratings`, | ||
`watchlist_automatic_removal_enabled`, | ||
`country`, | ||
`core_account_changes_disabled`, | ||
`created_at` | ||
) SELECT | ||
`id`, | ||
`email`, | ||
`name`, | ||
`password`, | ||
`totp_uri`, | ||
`is_admin`, | ||
`dashboard_visible_rows`, | ||
`dashboard_extended_rows`, | ||
`dashboard_order_rows`, | ||
`jellyfin_access_token`, | ||
`jellyfin_user_id`, | ||
`jellyfin_server_url`, | ||
`privacy_level`, | ||
`date_format_id`, | ||
`trakt_user_name`, | ||
`plex_webhook_uuid`, | ||
`jellyfin_webhook_uuid`, | ||
`emby_webhook_uuid`, | ||
`trakt_client_id`, | ||
`plex_client_id`, | ||
`plex_client_temporary_code`, | ||
`plex_access_token`, | ||
`plex_account_id`, | ||
`plex_server_url`, | ||
`jellyfin_scrobble_views`, | ||
`emby_scrobble_views`, | ||
`plex_scrobble_views`, | ||
`plex_scrobble_ratings`, | ||
`watchlist_automatic_removal_enabled`, | ||
`country`, | ||
`core_account_changes_disabled`, | ||
`created_at` FROM user', | ||
); | ||
$this->execute('DROP TABLE `user`'); | ||
$this->execute('ALTER TABLE `tmp_user` RENAME TO `user`'); | ||
} | ||
|
||
public function up() : void | ||
{ | ||
$this->execute( | ||
<<<SQL | ||
CREATE TABLE `tmp_user` ( | ||
`id` INTEGER, | ||
`email` TEXT NOT NULL, | ||
`name` TEXT NOT NULL, | ||
`password` TEXT NOT NULL, | ||
`totp_uri` TEXT DEFAULT NULL, | ||
`is_admin` TINYINT(1) DEFAULT 0, | ||
`dashboard_visible_rows` TEXT DEFAULT NULL, | ||
`dashboard_extended_rows` TEXT DEFAULT NULL, | ||
`dashboard_order_rows` TEXT DEFAULT NULL, | ||
`jellyfin_access_token` TEXT DEFAULT NULL, | ||
`jellyfin_user_id` TEXT DEFAULT NULL, | ||
`jellyfin_server_url` TEXT DEFAULT NULL, | ||
`jellyfin_sync_enabled` TINYINT(1) DEFAULT 0, | ||
`privacy_level` INTEGER DEFAULT 1, | ||
`date_format_id` INTEGER DEFAULT 0, | ||
`trakt_user_name` TEXT, | ||
`plex_webhook_uuid` TEXT, | ||
`jellyfin_webhook_uuid` TEXT, | ||
`emby_webhook_uuid` TEXT, | ||
`trakt_client_id` TEXT, | ||
`plex_client_id` TEXT DEFAULT NULL, | ||
`plex_client_temporary_code` TEXT DEFAULT NULL, | ||
`plex_access_token` TEXT DEFAULT NULL, | ||
`plex_account_id` TEXT DEFAULT NULL, | ||
`plex_server_url` TEXT DEFAULT NULL, | ||
`jellyfin_scrobble_views` INTEGER DEFAULT 1, | ||
`emby_scrobble_views` INTEGER DEFAULT 1, | ||
`plex_scrobble_views` INTEGER DEFAULT 1, | ||
`plex_scrobble_ratings` INTEGER DEFAULT 0, | ||
`radarr_feed_uuid` TEXT DEFAULT NULL, | ||
`watchlist_automatic_removal_enabled` INTEGER DEFAULT 1, | ||
`country` TEXT DEFAULT NULL, | ||
`core_account_changes_disabled` INTEGER DEFAULT 0, | ||
`created_at` TEXT NOT NULL, | ||
PRIMARY KEY (`id`), | ||
UNIQUE (`email`), | ||
UNIQUE (`name`) | ||
) | ||
SQL, | ||
); | ||
$this->execute( | ||
'INSERT INTO `tmp_user` ( | ||
`id`, | ||
`email`, | ||
`name`, | ||
`password`, | ||
`totp_uri`, | ||
`is_admin`, | ||
`dashboard_visible_rows`, | ||
`dashboard_extended_rows`, | ||
`dashboard_order_rows`, | ||
`jellyfin_access_token`, | ||
`jellyfin_user_id`, | ||
`jellyfin_server_url`, | ||
`jellyfin_sync_enabled`, | ||
`privacy_level`, | ||
`date_format_id`, | ||
`trakt_user_name`, | ||
`plex_webhook_uuid`, | ||
`jellyfin_webhook_uuid`, | ||
`emby_webhook_uuid`, | ||
`trakt_client_id`, | ||
`plex_client_id`, | ||
`plex_client_temporary_code`, | ||
`plex_access_token`, | ||
`plex_account_id`, | ||
`plex_server_url`, | ||
`jellyfin_scrobble_views`, | ||
`emby_scrobble_views`, | ||
`plex_scrobble_views`, | ||
`plex_scrobble_ratings`, | ||
`watchlist_automatic_removal_enabled`, | ||
`country`, | ||
`core_account_changes_disabled`, | ||
`created_at` | ||
) SELECT * FROM user', | ||
); | ||
$this->execute('DROP TABLE `user`'); | ||
$this->execute('ALTER TABLE `tmp_user` RENAME TO `user`'); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
## Radarr list | ||
|
||
### Description | ||
|
||
You can set up Radarr to automatically import movies added to your Movary watchlist via the Radarr [lists import feature](https://wiki.servarr.com/radarr/supported#stevenluimport). | ||
|
||
### Instruction | ||
|
||
- Generate the feed url in Movary on the Radarr integration settings page (`/settings/integrations/radarr`) | ||
- Go to your Radarr Settings and select "Lists" | ||
- Click on the plus to add a new list | ||
- In the section Advanced List select "StevenLu Custom" | ||
- Copy the Movary feed url to the "URL" input in Radarr and save | ||
|
||
Feel free to change any other settings of the StevenLu list, it doesn't affect Movary or the watchlist. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,44 @@ | ||
async function regenerateRadarrFeedId() { | ||
removeAlert('alertFeedUrlDiv') | ||
|
||
regenerateRadarrFeedRequest().then(webhookUrl => { | ||
setRadarrFeedUrl(webhookUrl) | ||
addAlert('alertFeedUrlDiv', 'Generated new feed url', 'success') | ||
document.getElementById('deleteRadarrFeedButton').classList.remove('disabled') | ||
}).catch((error) => { | ||
console.log(error) | ||
addAlert('alertFeedUrlDiv', 'Could not generate feed url', 'danger') | ||
}) | ||
} | ||
|
||
async function regenerateRadarrFeedRequest() { | ||
const response = await fetch('/settings/radarr/feed', {'method': 'put'}) | ||
|
||
if (!response.ok) { | ||
throw new Error(`HTTP error! status: ${response.status}`) | ||
} | ||
const data = await response.json() | ||
|
||
return data.url | ||
} | ||
|
||
async function deleteRadarrFeedId() { | ||
await fetch('/settings/radarr/feed', {'method': 'delete'}).then(response => { | ||
if (!response.ok) { | ||
throw new Error(`HTTP error! status: ${response.status}`) | ||
} | ||
|
||
setRadarrFeedUrl() | ||
addAlert('alertFeedUrlDiv', 'Deleted feed url', 'success'); | ||
}); | ||
} | ||
|
||
function setRadarrFeedUrl(webhookUrl) { | ||
if (webhookUrl) { | ||
document.getElementById('radarrFeedUrl').innerHTML = webhookUrl | ||
document.getElementById('deleteRadarrFeedButton').classList.remove('disabled') | ||
} else { | ||
document.getElementById('radarrFeedUrl').innerHTML = '-' | ||
document.getElementById('deleteRadarrFeedButton').classList.add('disabled') | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.