Skip to content

Commit

Permalink
Updated to 0.2.2.0
Browse files Browse the repository at this point in the history
Updated to 0.2.2.0, fixed the adding error
  • Loading branch information
Ephellon authored May 9, 2018
1 parent f87f0b5 commit f176042
Show file tree
Hide file tree
Showing 23 changed files with 956 additions and 638 deletions.
Binary file modified hbilanbgadaclhnklppoaflllpndndno.crx
Binary file not shown.
Binary file modified hbilanbgadaclhnklppoaflllpndndno.zip
Binary file not shown.
451 changes: 247 additions & 204 deletions src/background.js

Large diffs are not rendered by default.

10 changes: 5 additions & 5 deletions src/imdb.js
Original file line number Diff line number Diff line change
Expand Up @@ -13,18 +13,18 @@ function isList() {
return window.location.pathname.startsWith('/list/');
}

function getImdbId() {
function getIMDbID() {
let tag = document.querySelector('meta[property="pageId"]');
return tag && tag.content;
}

const IMDbID = getIMDbID();

function cleanYear(year) {
// The year can contain `()`, so we need to strip it out.
return parseInt(year.trim().replace(/^\(|\)$/g, ''));
}

const IMDbID = getImdbId();

function renderPlexButton($parent) {
if (!$parent)
return;
Expand Down Expand Up @@ -93,9 +93,9 @@ function addInListItem(el) {
let type = ($date.textContent.includes('TV Series') ? 'show' : 'movie'),
title = $title.textContent.trim(),
year = cleanYear($date.textContent),
myImdbId = $IMDbID.dataset.tlet;
IMDbID = $IMDbID.dataset.tconst;

findPlexMedia({ type, title, year, button: $button, IMDbID: myImdbId });
findPlexMedia({ type, title, year, button: $button, IMDbID });
}

function initList() {
Expand Down
Binary file added src/img/flenix.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added src/img/imdb.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added src/img/letterboxd.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified src/img/movieo.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added src/img/noise.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added src/img/tmdb.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added src/img/trakt.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added src/img/tv-maze.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added src/img/tvdb.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added src/img/vrv.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
2 changes: 1 addition & 1 deletion src/manifest.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
"description": "Adds a button on various movie & TV show sites to open it in Plex.",
"homepage_url": "https://github.com/Ephellon/web-to-plex/",
"manifest_version": 2,
"version": "0.2.1.3",
"version": "0.2.2.0",
"icons": {
"16": "img/16.png",
"48": "img/48.png",
Expand Down
2 changes: 1 addition & 1 deletion src/manifest_firefox.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
"description": "Adds a button on various movie & TV show sites to open it in Plex.",
"homepage_url": "https://github.com/Ephellon/web-to-plex/",
"manifest_version": 2,
"version": "0.2.0.3",
"version": "0.2.2.0",
"icons": {
"16": "img/16.png",
"48": "img/48.png",
Expand Down
6 changes: 2 additions & 4 deletions src/movieo.js
Original file line number Diff line number Diff line change
Expand Up @@ -52,9 +52,9 @@ function initPlexThingy() {

let title = $title.dataset.title.trim(),
year = parseInt($date.content.slice(0, 4)),
imdbId = getIMDbID();
IMDbID = getIMDbID();

findPlexMedia({ title, year, button: $button, imdbId });
findPlexMedia({ title, year, button: $button, IMDbID });
}

function renderPlexButton() {
Expand Down Expand Up @@ -87,6 +87,4 @@ function getIMDbID() {
);
if ($link)
return $link.href.replace('http://www.imdb.com/title/', '');

return;
}
101 changes: 63 additions & 38 deletions src/options/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -8,15 +8,15 @@
}

body {
background: url(noise.png), url(../img/256.png) no-repeat fixed center, #3f4245 !important;
background: url(../img/noise.png), url(../img/256.png) no-repeat fixed center, #3f4245 !important;
color: #333 !important;
font-family: Open Sans Regular, Helvetica Neue, Helvetica, Arial, sans-serif, system;
font-size: 18px !important;
padding: 1em;
width: 90vw;
flex-grow: 1;
padding: 25px;
overflow: hidden auto;
overflow: auto;
position: absolute;
}

Expand Down Expand Up @@ -106,7 +106,7 @@
padding: 15px !important;
}

summary {
summary, option {
margin-bottom: 20px !important;
padding-left: 0;
list-style: none !important;
Expand All @@ -115,11 +115,15 @@
cursor: pointer;
}

option {
background: url(../img/noise.png), #3f4245 !important;
}

details:last-child > summary {
margin-bottom: 0 !important;
}

details[open] > summary {
details[open] > summary, h1, h2, h3 ,h4, h5, h6 {
color: #cc7b19 !important;
}

Expand All @@ -138,13 +142,34 @@
body::-webkit-scrollbar-track {
background: rgba(0, 0, 0, 0.2);
}

input::placeholder, input:placeholder {
color: #999;
}

::-webkit-input-placeholder {
color: #999;
}

::-moz-placeholder {
color: #999;
}

:-ms-input-placeholder {
color: #999;
}

:-moz-placeholder {
color: #999;
}
</style>
</head>

<body>
<h1>Plex Settings</h1>
<p>
<label>Plex Token</label>
<input type="text" id="plex_token" data-option="plexToken"/>
<input type="text" id="plex_token" data-option="plexToken" placeholder="Enter your Plex token"/>
<div>
<a href="https://support.plex.tv/hc/en-us/articles/204059436-Finding-your-account-token-X-Plex-Token" target="_blank">How to find your token.</a>
</div>
Expand All @@ -160,44 +185,43 @@
</select>
</p>

<br/>
<h1>Manager Settings</h1>

<article>
<!--
<details>
<summary>CouchPotato Settings</summary>
<summary>CouchPotato Settings (TV Shows)</summary>

<h2>Connection Settings</h2>
<p>
<label>CouchPotato URL</label>
<input type="text" data-option="couchpotatoUrlRoot"/>
<input type="text" data-option="couchpotatoURLRoot" placeholder="What's your CouchPotato URL?"/>
<div>
Such as <em>https://example.com/couchpotato</em> or <em>http://192.168.1.100:5050</em>
</div>
</p>

<p>
<label>CouchPotato API Key</label>
<input type="text" data-option="couchpotatoToken"/>
<input type="text" data-option="couchpotatoToken" placeholder="What's your CouchPotato API key?"/>
<div>
1. Go to CouchPotato | Settings<br/>
2. Copy/Paste the "API Key."<br/>
Such as <em>aa756d33242f6g8ffbca2b3963586f21</em>
</div>
</p>

<h3>Login Settings <em>(optional)</em></h3>
<p>
<label>CouchPotato Login: username <em>(optional)</em></label>
<input type="text" data-option="couchpotatoBasicAuthUsername"/>
<div>Only use this if you setup a CouchPotato password.</div>
<label>username</label>
<input type="text" data-option="couchpotatoBasicAuthUsername" placeholder="Enter your CouchPotato username"/>
<div>Only use this if you setup a CouchPotato username.</div>
</p>
<p>
<label>CouchPotato Login: password <em>(optional)</em></label>
<input type="text" data-option="couchpotatoBasicAuthPassword"/>
<label>password</label>
<input type="text" data-option="couchpotatoBasicAuthPassword" placeholder="Enter your CouchPotato password"/>
<div>Only use this if you setup a CouchPotato password.</div>
</p>

<p>
<button type="button" id="couchpotato_test" style="background: #cc7b19 !important;">Test CouchPotato Settings</button>
<span id="couchpotato_test_status"></span>
Expand All @@ -209,22 +233,22 @@
</select>
</p>
</details>
-->

<details>
<summary>Radarr Settings</summary>
<summary>Radarr Settings (Movies)</summary>

<h2>Connection Settings</h2>
<p>
<label>Radarr URL</label>
<input type="text" data-option="radarrUrlRoot"/>
<input type="text" data-option="radarrURLRoot" placeholder="What's your Radarr URL?"/>
<div>
Such as <em>https://example.com/radarr</em> or <em>http://192.168.1.100:7878</em>
</div>
</p>

<p>
<label>Radarr API Key</label>
<input type="text" data-option="radarrToken"/>
<input type="text" data-option="radarrToken" placeholder="What's your Radarr API key?"/>
<div>
1. Go to Radarr | Settings | General<br/>
2. Click on "Show advanced," then copy/paste the "API Key."<br/>
Expand All @@ -234,22 +258,22 @@

<p>
<label>Radarr Storage Path</label>
<input type="text" data-option="radarrStoragePath"/>
<input type="text" data-option="radarrStoragePath" placeholder="Where does Radarr save movies?"/>
<div>
This should be the same path (verbatim) used in Radarr.<br/>
Such as <em>/storage/Movies/</em>
</div>
</p>

<h3>Login Settings <em>(optional)</em></h3>
<p>
<label>Radarr Login: username <em>(optional)</em></label>
<input type="text" data-option="radarrBasicAuthUsername"/>
<div>Only use this if you setup a Radarr password.</div>
<label>username</label>
<input type="text" data-option="radarrBasicAuthUsername" placeholder="Enter your Radarr username"/>
<div>Only use this if you setup a Radarr username.</div>
</p>

<p>
<label>Radarr Login: password <em>(optional)</em></label>
<input type="text" data-option="radarrBasicAuthPassword"/>
<label>password</label>
<input type="text" data-option="radarrBasicAuthPassword" placeholder="Enter your Radarr password"/>
<div>Only use this if you setup a Radarr password.</div>
</p>

Expand All @@ -266,19 +290,20 @@
</details>

<details>
<summary>Sonarr Settings</summary>
<summary>Sonarr Settings (TV Shows)</summary>

<h2>Connection Settings</h2>
<p>
<label>Sonarr URL</label>
<input type="text" data-option="sonarrUrlRoot"/>
<input type="text" data-option="sonarrURLRoot" placeholder="What's your Sonarr URL?"/>
<div>
Such as <em>https://example.com/sonarr</em> or <em>http://192.168.1.100:8989</em>
</div>
</p>

<p>
<label>Sonarr API Key</label>
<input type="text" data-option="sonarrToken"/>
<input type="text" data-option="sonarrToken" placeholder="What's your Sonarr API key?"/>
<div>
1. Go to Sonarr | Settings | General<br/>
2. Click on "Show advanced," then copy/paste the "API Key."<br/>
Expand All @@ -288,22 +313,22 @@

<p>
<label>Sonarr Storage Path</label>
<input type="text" data-option="sonarrStoragePath"/>
<input type="text" data-option="sonarrStoragePath" placeholder="Where does Sonarr save TV Shows?"/>
<div>
This should be the same path (verbatim) used in Sonarr.<br/>
Such as <em>/storage/Movies/</em>
</div>
</p>

<h3>Login Settings <em>(optional)</em></h3>
<p>
<label>Sonarr Login: username <em>(optional)</em></label>
<input type="text" data-option="sonarrBasicAuthUsername"/>
<div>Only use this if you setup a Sonarr password.</div>
<label>username</label>
<input type="text" data-option="sonarrBasicAuthUsername" placeholder="Enter your Sonarr username"/>
<div>Only use this if you setup a Sonarr username.</div>
</p>

<p>
<label>Sonarr Login: password <em>(optional)</em></label>
<input type="text" data-option="sonarrBasicAuthPassword"/>
<label>password</label>
<input type="text" data-option="sonarrBasicAuthPassword" placeholder="Enter your Sonarr password"/>
<div>Only use this if you setup a Sonarr password.</div>
</p>

Expand Down
Loading

0 comments on commit f176042

Please sign in to comment.