Merge pull request #67 from LBRYFoundation/bug_fix

Bug fix
This commit is contained in:
kodxana 2021-08-28 22:05:25 +02:00 committed by GitHub
commit 9a9b51bbba
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
5 changed files with 8 additions and 6 deletions

View file

@ -6,7 +6,7 @@ export interface LbrySettings {
export const DEFAULT_SETTINGS: LbrySettings = { enabled: true, redirect: 'lbry.tv' };
export const redirectDomains = {
'lbry.tv': { prefix: 'https://lbry.tv/', display: 'lbry.tv' },
'madiator.com': { prefix: 'https://madiator.com/', display: 'madiator.com' },
odysee: { prefix: 'https://odysee.com/', display: 'odysee' },
app: { prefix: 'lbry://', display: 'App' },
};

View file

@ -2,7 +2,7 @@ import chunk from 'lodash/chunk';
import groupBy from 'lodash/groupBy';
import pickBy from 'lodash/pickBy';
const LBRY_API_HOST = 'https://api.lbry.com';
const LBRY_API_HOST = 'https://api.odysee.com';
const QUERY_CHUNK_SIZE = 300;
interface YtResolverResponse {

View file

@ -1,12 +1,14 @@
{
"name": "Watch on LBRY",
"version": "1.7.2",
"version": "1.7.3",
"permissions": [
"https://www.youtube.com/",
"https://invidio.us/channel/*",
"https://invidio.us/watch?v=*",
"https://api.lbry.com/*",
"https://api.odysee.com/*",
"https://lbry.tv/*",
"https://odysee.com/*",
"https://madiator.com/*",
"tabs",
"storage"
],

View file

@ -35,7 +35,7 @@ async function ctxFromURL(url: string): Promise<UpdateContext | void> {
// handles lbry.tv -> lbry app redirect
chrome.tabs.onUpdated.addListener(async (tabId, changeInfo, { url: tabUrl }) => {
const { enabled, redirect } = await getSettingsAsync('enabled', 'redirect');
if (!enabled || redirect !== 'app' || !changeInfo.url || !tabUrl?.startsWith('https://lbry.tv/')) return;
if (!enabled || redirect !== 'app' || !changeInfo.url || !tabUrl?.startsWith('https://odysee.com/')) return;
const url = appRedirectUrl(tabUrl, { encode: true });
if (!url) return;

View file

@ -20,7 +20,7 @@ interface ButtonSettings {
const buttonSettings: Record<LbrySettings['redirect'], ButtonSettings> = {
app: { text: 'Watch on LBRY', icon: chrome.runtime.getURL('icons/lbry/lbry-logo.svg') },
'lbry.tv': { text: 'Watch on LBRY', icon: chrome.runtime.getURL('icons/lbry/lbry-logo.svg') },
'madiator.com': { text: 'Watch on LBRY', icon: chrome.runtime.getURL('icons/lbry/lbry-logo.svg') },
odysee: {
text: 'Watch on Odysee', icon: chrome.runtime.getURL('icons/lbry/odysee-logo.svg'),
style: { backgroundColor: '#1e013b' },