Giter Site home page Giter Site logo

sinusbot-stream's People

Contributors

crank015 avatar ebencollins avatar

Stargazers

 avatar  avatar  avatar

Watchers

 avatar  avatar

sinusbot-stream's Issues

darkly/bootstrap.min.css moved

In index.php we need to change "https://bootswatch.com/darkly/bootstrap.min.css" line 60 by

"https://bootswatch.com/3/darkly/bootstrap.min.css"

[dev branch] Is It working actually for you ?

(Sinusbot 0.10.6-ea49bdc) Because for me not, got this error on console log via chrome :

GET http://ipofmyvps:8101/api/v1/bot/i/20372271-2d4d-4fb2-8e88-a680c0cea32e/stream/uQHwWHsiaSI6ImFjZjVjZWM3LWFmMjAtNDJkNi04OTMyLTA3ZWZhNDliNDdmMSIsImIiOiJkNGY1ZmExNS05MTk4LTRkNjctYTZmOC1lYzhmMDA1OTA0MTMiLCJ1AVbwW2RtaW4iLCJ0IjoxNTEwMTk2NjcyLCJzIjoiYjA5OTg2NWFlN2Q3ZjY0ZjU1ZTM1MmNjMDM5MDgyZDllZTkyNzgzNTYyMTU2OGUzYTU0NDQ5Yjc5YWMzMmVkYSJ9 401 (Unauthorized)

[Issue] Keep getting error 401

I keep getting error 401 despite editing the config.php

$user = "I created this user"; //username to login to the web panel
$passwd = "I provided the correct password"; //corresponding password
$title = "HyperVize-Radio"; //title to display
$teamspeakJoinLink="https://hypervize.nl"; //generate link in teamspeak by doing the following: Click tools on the menu bar, select invite buddy, select in my current server (or channel if you want), invitation ts3server link, paste the link here.

$instanceIDS = array("407c1ba1-8aa1-4467-aa76-removed");
$instanceNames = array("Now Playing...");
$defaultInstance = 0;

[Enhancement] Add youtube link redirect to the video directly

Like in the YT-search 2.1 (by Patrick15a) from Sinusbot Forum

It gave the possibility to get the direct link to the youtube video streamed by youtube-dl

I don't know if you can make an adaptation of this script for the SinusBot-Stream :)

Take a Look to the code :


registerPlugin({
name: 'YT-Search',
version: '2.1',
description: 'Search the current track on YouTube!',
author: 'Patrick15a [email protected]',
vars: [
{
name: 'ytCommand',
title: 'YouTube Search-Command',
type: 'string',
placeholder: 'Default: !ytsearch'
},
{
name: 'scCommand',
title: 'SoundCloud Search-Command',
type: 'string',
placeholder: 'Default: !scsearch'
},
{
name: 'prefix',
title: 'Prefix',
type: 'string',
placeholder: 'Default: [b][COLOR=#aa0000][[/COLOR][COLOR=#005500]YT-Search[/COLOR][COLOR=#aa0000]][/COLOR][/b]'
}
]
}, function(sinusbot, config) {

` var backend = require('backend');
var event = require('event');
var audio = require('audio');
var media = require('media');

//Set Default's
if (typeof config.prefix == 'undefined' || config.prefix === '') {
	var prefix = '[b][COLOR=#aa0000][[/COLOR][COLOR=#005500]YTsearch[/COLOR][COLOR=#aa0000]][/COLOR][/b]';
}
if (typeof config.ytCommand == 'undefined' || config.ytCommand === '') {
	var ytcmd = '!ytsearch';
}
if (typeof config.scCommand == 'undefined' || config.scCommand === '') {
    var sccmd = '!scsearch';
}

//Get current TrackInfos
function getTrack() {
	var track = media.getCurrentTrack();
	
	if (typeof track.tempTitle() != 'undefined' && track.tempTitle() != '') {
		var title = track.tempTitle();
	} else if (track.title() != 'undefined' && track.title() != '') {
		var title = track.title();
	} else {
		var title = '';
	}
	if (typeof track.tempArtist() != 'undefined' && track.tempArtist() != '') {
		var artist = track.tempArtist();
    } else if (track.artist() != 'undefined' && track.artist() != '') {
		var artist = track.artist();
	} else if (typeof track.album() != 'undefined' && track.album() != ''){
		var artist = track.album();
	} else {
		var artist = '';
	}
	
	title = title.replace(/ /g, '+');
	title = title.replace(/&/g, '%26');
	title = title.replace(/'?'/g, '%3F');
	
	artist = artist.replace(/ /g, '+');
	artist = artist.replace(/&/g, '%26');
	artist = artist.replace(/'?'/g, '%3F');
	
	var search = artist + '+-+' + title;
	
	return search;
}

//Create Search-link
function getSearchLink(provider) {
    
    var search = getTrack();
    
	if (provider == 'youtube') {
        var track = media.getCurrentTrack();
		if (track.type() == 'ytdl' && typeof track.url() != 'undefined') {
			var ytwatch = 'https://www.youtube.com/watch?v='
			var ytlink = ytwatch + track.url().split('url=')[1];
			var finishlink = '[URL=' + ytlink + ']Youtube[/URL]';
		} else {
			
			var ytsearchquery = 'https://www.youtube.com/results?search_query=';
			var ytlink = ytsearchquery + search;
			var finishlink = '[URL=' + ytlink + ']Youtube[/URL]';
		}
		
        
		
	} else if (provider == 'soundcloud') {
        
        var scsearchquery = 'https://soundcloud.com/search?q=';
        var sclink = scsearchquery + search;
        
        var finishlink = '[URL=' + sclink + ']SoundCloud[/URL]';
		
	}
	
	return finishlink;
}

//Send Message with Search-Link to User
event.on('chat', function(ev) {
	
	if (audio.isPlaying()) {
		switch (ev.text) {
			case ytcmd:
				link = getSearchLink('youtube');
				ev.client.chat(prefix + ' Search the current track on ' + link + '.');
			break;
			
			case sccmd:
				link = getSearchLink('soundcloud');
				ev.client.chat(prefix + ' Search the current track on ' + link + '.');
			break;
		}
	} else {
		switch (ev.text) {
			case ytcmd:
				ev.client.chat(prefix + ' Sorry but the Bot is currently not playing music.');
			break;
			
			case sccmd:
				ev.client.chat(prefix + ' Sorry but the Bot is currently not playing music.');
			break;
		}
	}
	
});

});`

Opera compatibility

The video player appears with the correct poster image, but continues to have a loading icon forever. Song name also loads properly.

Artist not shown

If we use the artist category in sinusbot like in this picture, the artist name not shown
1

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.