Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

youtube info fix - changelog update #248

Merged
merged 4 commits into from
Jan 21, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
21 changes: 18 additions & 3 deletions actions/mod_info_changelog_MOD.js
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ subtitle: function(data) {
author: "DBM Mods",

// The version of the mod (Defaults to 1.0.0)
version: "1.9.6 ~ beta",
version: "1.9.7 ~ beta",

// A short description to show on the mod line for this mod (Must be on a single line)
short_description: "Changelog overview",
Expand Down Expand Up @@ -85,15 +85,21 @@ html: function(isEvent, data) {
return `
<div>
<div id ="wrexdiv" style="width: 550px; height: 350px; overflow-y: scroll;">
<p>
<h2>1.9.7: Someone come up with a tagline plz</h2>
● Revised Youtube Info Mod<br>
</p>
<p>
<h2>1.9.6: Almost everything requires beta! WOO!</h2>
● Added Check if File Exists<br>
● Added Check if File Exists Mod<br>
● Added Generate Random Word<br>
● Added Merge Lists Mod<br>
● Added Slice Mod<br>
● Added Play Youtube (Revised default action)<br>
● Added Create Anchor Mod<br>
● Added Jump To Anchor Mod<br>
● Added Inspect List or Object Mod<br>
● Added Filter List or Object Mod<br>
● Revised Check If Member<br>
● Revised Parse From Sored JSON<br>
● Revised Read File<br>
Expand All @@ -107,8 +113,17 @@ html: function(isEvent, data) {
● Revised Youtube Info Mod<br>
● Revised Check If User Reacted Mod<br>
● Revised Convert Seconds To Days Mod<br>
Revissed File Control (V4)<br>
Revised File Control (V4) Mod<br>
● Revised Game Server Mod<br>
● Revised Add Embed Field<br>
● Revised Set Embed Description<br>
● Revised Send Embed Message<br>
● Revised Send Image Mod<br>
● Revised Send Gif Mod<br>
● Revised Send Log Message<br>
● Revised Find Emoji<br>
● Revised Find Emoji in MSG Server Mod<br>
● Revised Check Variable<br>
● Fixed Create Voice Channel<br>
● Fixed Create Channel<br>
● Fixed Create Category<br>
Expand Down
8 changes: 7 additions & 1 deletion actions/store_audio_info_MOD.js

Large diffs are not rendered by default.

13 changes: 3 additions & 10 deletions actions/youtube_info_MOD.js
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ module.exports = {

// The version of the mod (Defaults to 1.0.0)
version: "1.9.6", //Added in 1.9.4?
version2: "1.0.0", // Just to keep track of this version compared to mod pack version
version2: "1.1.0", // Just to keep track of this version compared to mod pack version

// A short description to show on the mod line for this mod (Must be on a single line)
short_description: "Gets extra video information on YouTube based on video ID.",
Expand Down Expand Up @@ -239,21 +239,14 @@ module.exports = {
const fetchVideoInfo = WrexMods.require('youtube-info');
const TimeFormat = WrexMods.require('hh-mm-ss');
const ytdl = WrexMods.require('ytdl-core');
const getInfoAsync = WrexMods.require('util')
.promisify(ytdl.getInfo);
let result;

// Check if everything is ok:
if (!video) return console.log("Please specify a video id to get video informations.");

const song = await getInfoAsync(video)
.catch((err) => {
console.error(err);
});

if (!song.video_id) return console.log('Could not find song ID in youtube_info_MOD. This is probably due to ytdl-core being outdated.');
const songID = ytdl.getVideoID(video);

fetchVideoInfo(song.video_id, function (err, videoInfo) {
fetchVideoInfo(songID, function (err, videoInfo) {
if (err) return console.error(err);

switch (info) {
Expand Down
48 changes: 33 additions & 15 deletions node_modules/ytdl-core/README.md

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

32 changes: 32 additions & 0 deletions node_modules/ytdl-core/lib/cache.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading