Skip to content

Commit

Permalink
Merge branch 'dev'
Browse files Browse the repository at this point in the history
  • Loading branch information
nleush committed Oct 29, 2024
2 parents 1a555bf + bb35154 commit 1e007ca
Show file tree
Hide file tree
Showing 5 changed files with 39 additions and 61 deletions.
7 changes: 4 additions & 3 deletions lib/plugins/system/oembed/providers.json
Original file line number Diff line number Diff line change
Expand Up @@ -1145,9 +1145,10 @@
{
"name": "Everviz",
"templates": [
"app.everviz.com/show/([a-zA-Z0-9])+",
"app.everviz.com/embed/([a-zA-Z0-9])+"
"app.everviz.com/show/([a-zA-Z0-9_\\-]+)",
"app.everviz.com/embed/([a-zA-Z0-9_\\-]+)"
],
"endpoint": "https://api.everviz.com/oembed"
"endpoint": "https://api.everviz.com/oembed",
"url": "https://app.everviz.com/embed/{1}/"
}
]
32 changes: 20 additions & 12 deletions plugins/domains/500px/500px.com.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,18 +4,26 @@ export default {

mixins: ["*"],

getLinks: function(urlMatch, twitter) {
if (twitter.card === 'photo' && twitter.image) {
return {
template_context: {
title: twitter.title + ' | ' + twitter.site,
img_src: twitter.image.src,
id: urlMatch[1]
},
type: CONFIG.T.text_html,
rel: [CONFIG.R.image, CONFIG.R.ssl, CONFIG.R.inline],
"aspect-ratio": twitter.image.height ? twitter.image.width / twitter.image.height : null
}
getLinks: function(urlMatch, twitter, utils, options, cb) {
if (twitter.image) {
utils.getImageMetadata(twitter.image, options, function(error, data) {
if (data.width && data.height) {
return cb(null, {
template_context: {
title: twitter.title + ' | ' + twitter.site,
img_src: twitter.image,
id: urlMatch[1]
},
type: CONFIG.T.text_html,
rel: [CONFIG.R.image, CONFIG.R.ssl, CONFIG.R.inline],
"aspect-ratio": data.width / data.height
})
} else {
return cb();
}
});
} else {
return cb();
}
},

Expand Down
8 changes: 4 additions & 4 deletions plugins/domains/dailymotion.com/dailymotion.com.js
Original file line number Diff line number Diff line change
Expand Up @@ -10,22 +10,22 @@ export default {
"oembed-thumbnail",
"domain-icon",
"og-description",
"og-image",
"canonical",
"oembed-iframe",
"video"
],

getLink: function (url, iframe, options) {
var playlistParams = querystring.parse(options.getProviderOptions('dailymotion.get_params', '').replace(/^\?/, ''));
var playlistParams = querystring.parse(options.getProviderOptions('dailymotion.get_params', 'mute=true').replace(/^\?/, ''));

if (iframe.src && iframe.height) {
var player = {
href: iframe.replaceQuerystring(playlistParams),
type: CONFIG.T.text_html,
"rel": [CONFIG.R.player, CONFIG.R.oembed],
"aspect-ratio": iframe.width / iframe.height,
scrolling: 'no',
autoplay: "autoplay=1"
autoplay: "mute=false"
};

// Do not replace direct link to custom players
Expand Down Expand Up @@ -70,7 +70,7 @@ export default {

}
}, {
skipMixins: ["video", "og-description", "canonical"],
skipMixins: ["video", "og-description", "og-image", "canonical"],
skipMethods: ["getData"]
},
"https://www.dailymotion.com/video/x10bix2_ircam-mani-feste-2013-du-29-mai-au-30-juin-2013_creation#.Uaac62TF1XV",
Expand Down
33 changes: 11 additions & 22 deletions plugins/domains/dailymotion.com/dailymotion.playlist.js
Original file line number Diff line number Diff line change
@@ -1,34 +1,23 @@
export default {
/**
* Endpoint `http://www.dailymotion.com/services/oembed`
* does not provide oembed results for playlist url currently
*/

// Canonical playlists are covered by oEmbed `http://www.dailymotion.com/services/oembed`
re: [
/^https?:\/\/www\.dailymotion\.com\/playlist\//i,
/^https?:\/\/www\.dailymotion\.com\/embed\/playlist\//i,
/^https?:\/\/www\.dailymotion\.com\/embed\/playlist\/([a-zA-Z0-9]+)(?:\?.+)?$/i,
/^https?:\/\/geo\.dailymotion\.com\/player.html\?playlist=([a-zA-Z0-9]+)(?:&.+)?$/i,
],

mixins: [
"*"
],

getLink: function (url) {
var playlistUrl = url;
if (url.includes('playlist') && !url.includes('embed/playlist')) {
playlistUrl = url.replace('playlist', 'embed/playlist')
}
return {
href: playlistUrl,
type: CONFIG.T.text_html,
rel: [CONFIG.R.player, CONFIG.R.iframely]
};
getData: function(urlMatch, cb, options) {
cb(!options.redirectsHistory
? {
redirect: `https://www.dailymotion.com/playlist/${urlMatch[1]}`
} : null);
},

tests: [{
noFeeds: true
},
"https://www.dailymotion.com/playlist/x6hynp",
"https://www.dailymotion.com/embed/playlist/x6hynp"
// "https://www.dailymotion.com/playlist/x6hynp",
"https://www.dailymotion.com/embed/playlist/x6hynp",
"https://geo.dailymotion.com/player.html?playlist=x6hynp"
]
};
20 changes: 0 additions & 20 deletions plugins/domains/i.gifs.com.js

This file was deleted.

0 comments on commit 1e007ca

Please sign in to comment.