Skip to content

Commit

Permalink
Fix radarr element selector
Browse files Browse the repository at this point in the history
  • Loading branch information
dmzoneill committed Jan 4, 2024
1 parent 900dbba commit 07efde0
Showing 1 changed file with 7 additions and 9 deletions.
16 changes: 7 additions & 9 deletions chrome-plugin/contentscript.js
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ class Sodarr {
static id_prefix = 'sodarr-'
static modified = false
static debug_enabled = false
static port = null
// static port = null

constructor () {
Sodarr.instance = this
Expand Down Expand Up @@ -153,12 +153,11 @@ class Sonarr extends Sodarr {

const res = await this.post_data(Sodarr.serviceEndpoint + '/open', encodeURIComponent(dst))

chrome.runtime.sendMessage(
"flnaknbcpejonkbcjnkjcmackdakbpbd",
{
file: encodeURIComponent(dst)
}, (response)=>console.log("Got response: ", response))

// chrome.runtime.sendMessage(
// "flnaknbcpejonkbcjnkjcmackdakbpbd",
// {
// file: encodeURIComponent(dst)
// }, (response)=>console.log("Got response: ", response))

this.remove_element_by_id('loading')

Expand Down Expand Up @@ -265,7 +264,7 @@ class Radarr extends Sodarr {

Sodarr.debug('Found films in the active tab')

const moviePath = document.querySelectorAll("td[class*='MovieFileEditorRow-relativePath']")[0].innerText
const moviePath = document.querySelectorAll("td[class*='MovieFileEditorRow-relativePath']")[0].innerText
const path = document.querySelectorAll("span[class*='MovieDetails-path']")[0].innerText
const target = document.querySelectorAll("span[class*='MovieDetails-links']")[0]

Expand All @@ -282,7 +281,6 @@ class Radarr extends Sodarr {

Sodarr.debug('attached to the onclick event')

selected.click()
Sodarr.modified = false
} catch (error) {
Sodarr.debug(error.stack)
Expand Down

0 comments on commit 07efde0

Please sign in to comment.