AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Plugins (https://forums.alliedmods.net/forumdisplay.php?f=108)
-   -   [ANY] Grooveshark 1.2.5 (https://forums.alliedmods.net/showthread.php?t=226704)

DontWannaName 09-21-2013 19:39

[ANY] Grooveshark 1.2.5
 
3 Attachment(s)
Grooveshark powered by TinySong API

http://i.imgur.com/owl9ySU.png


Description: This plugin allows players to play songs on Grooveshark without leaving the game. It is lightweight and shouldn't cause any lag for most players.

Compatibility: TF2, CSS, DODS, CSGO and any other Source based mods that use a MOTD and SM.

Commands:
sm_grooveshark (No Parameters) - Launch Grooveshark.com in MOTD browser for manual usage. *
sm_grooveshark <Name of Song/Artist> - Play song that best matches your query
sm_gs <Name of Song/Artist> - Alias for sm_grooveshark
sm_gsstop - Stop currently playing song
sm_gsplay - Replay the last song you selected with sm_grooveshark
sm_gscurrent - Displays information about the last song you selected with sm_grooveshark

Required Cvar:
sm_tinysong_api_key "" - Grab an API key from Tinysong's site and set it in the auto created cfg in cfg/sourcemod

Required Extension:
Latest Sockets Extension

Instructions:

  1. Go to http://tinysong.com/api and grab an API key
  2. Place the Grooveshark smx into your server's plugins folder
  3. Load the plugin or restart your server
  4. Paste the API key into the newly created config in cfg/sourcemod
  5. Restart your server

ChangeLog:

1.2.5 - Added FCVAR PROTECTED to API cvar so people cant steal your key

1.2.4 - Re-Released

-Special thanks to the previous authors, I do not take credit for the original plugin. I will continue to support this version.

Caliban Avenged 09-21-2013 20:00

Re: [ANY] Grooveshark 1.2.4
 
DWN, thank you for taking on this effort - we were using Grooveshark 2.0.5, and were very sad to see it fall apart after that Valve update.

Am curious about your version. Is there a way to control the volume of the playback in yours? 2.0.5 let us bring up /gs to change the volume, like yours seems to, only the console in your version doesn't save the settings.

doze 09-24-2013 02:43

Re: [ANY] Grooveshark 1.2.4
 
Thanks.

Yes, a way to control the volume would be nice.

A message displaying when players join informing them of GS and its commands would also be nice.

k3rex 09-24-2013 09:45

Re: [ANY] Grooveshark 1.2.4
 
Can't listen to any song, its say im gonna listen but i hear nothing, what is the problem?

doze 09-24-2013 23:47

Re: [ANY] Grooveshark 1.2.4
 
Quote:

Originally Posted by k3rex (Post 2039981)
Can't listen to any song, its say im gonna listen but i hear nothing, what is the problem?

You need adobe flash player for other browsers installed.

DontWannaName 09-25-2013 02:15

Re: [ANY] Grooveshark 1.2.4
 
Quote:

Originally Posted by Caliban Avenged (Post 2038779)
DWN, thank you for taking on this effort - we were using Grooveshark 2.0.5, and were very sad to see it fall apart after that Valve update.

Am curious about your version. Is there a way to control the volume of the playback in yours? 2.0.5 let us bring up /gs to change the volume, like yours seems to, only the console in your version doesn't save the settings.

Unfortunately, I think it reloads the player with every song so the volume wouldnt be saved. I also dont think the player has a variable that can be used in the code to change volume.

I think game volume in the game controls motd volume?

DontWannaName 09-25-2013 02:16

Re: [ANY] Grooveshark 1.2.4
 
Quote:

Originally Posted by doze (Post 2039877)
Thanks.

Yes, a way to control the volume would be nice.

A message displaying when players join informing them of GS and its commands would also be nice.

Wouldnt be hard to add, but wouldnt an advertisement work better?

Battles Clan 09-26-2013 22:59

Re: [ANY] Grooveshark 1.2.4
 
Currently this plugin does not work in CS: GO

Caliban Avenged 09-28-2013 18:18

[ANY] Grooveshark 1.2.4
 
Quote:

Originally Posted by DontWannaName (Post 2040260)
Unfortunately, I think it reloads the player with every song so the volume wouldnt be saved. I also dont think the player has a variable that can be used in the code to change volume.

I think game volume in the game controls motd volume?

I suppose - but disruptive to players with casual listening needs.

Peeked at your code - saw that you're essentially using the flash player widget for Facebook from GS; hence, no volume control. Is that the only option for playback? I seem to recall a general-purpose flash player that could be invoked with volume controls, connected with a karaoke plug-in; the specific one escapes me at the moment. Does the TinySong API we're calling here make it possible to feed the song URL to a different player?

cool_myll 09-29-2013 05:11

Re: [ANY] Grooveshark 1.2.4
 
I agree. I only uninstalled the old grooveshark plugin cause of no volume options.

Spartan_C001 11-07-2013 12:13

Re: [ANY] Grooveshark 1.2.4
 
hmmm !gsstop does not work on my server any more

a bit weird

Spartan_C001 11-07-2013 12:29

Re: [ANY] Grooveshark 1.2.4
 
okay i found the problem,

hope someone knows how to fix this ^^

Blocking MOTD URL 'about:blank'; must begin with 'http://' or 'https://'
[

ShiiTake 11-08-2013 14:15

Re: [ANY] Grooveshark 1.2.4
 
Groove shark now send-me this error:

http://i.imgur.com/9xoNX18.png

The other problem is when the player say !gs <some music> the ping up to 600ms+

Spartan_C001 11-08-2013 15:23

Re: [ANY] Grooveshark 1.2.4
 
Quote:

Originally Posted by ShiiTake (Post 2058455)
Groove shark now send-me this error:

http://i.imgur.com/9xoNX18.png

The other problem is when the player say !gs <some music> the ping up to 600ms+

Ping going high is a no-brainer, your streaming an mp3, of course it will lag, and yeah the grooveshark site seems to have changed again

asherkin 11-13-2013 09:28

Re: [ANY] Grooveshark 1.2.4
 
API keys (sm_tinysong_api_key) and other private convars should be marked FCVAR_PROTECTED.

DontWannaName 11-14-2013 01:45

Re: [ANY] Grooveshark 1.2.4
 
Ill update that and fix the stop command.

Per Grooveshark:
"If you are running into issues with the number of requests that you need to make, please fill out the API Request form and let us know that you are on the TinySong API, your key, and the number of requests you think you need per hour."

jasonfrog 11-22-2013 06:29

Re: [ANY] Grooveshark 1.2.4
 
http://www.teamfortress.com/post.php?id=11931
Quote:

about:blank should now be a legal URL and won't get blocked for MOTD

DontWannaName 11-22-2013 22:05

Re: [ANY] Grooveshark 1.2.4
 
Thats good news.

I have updated the plugin with the FCVAR change.

doroemon 11-22-2013 23:52

Re: [ANY] Grooveshark 1.2.5
 
Hi there~!
Can you make it this plugin with Suopport for translations?
I want to change language to chinese...
Thanks a lot!

Spartan_C001 12-03-2013 20:03

Re: [ANY] Grooveshark 1.2.5
 
Okay so apparently they updated to allow about:blank, but i still get the error in the console saying that it is not valid. so !gsstop does not work.

Avaray 01-10-2014 15:27

Re: [ANY] Grooveshark 1.2.5
 
Good plugin!

Our server players are asking for possibility to hide chat messages (XXX is listening now XXX).
Maybe add command like !gshide or something like that

vodka00 01-10-2014 15:34

Re: [ANY] Grooveshark 1.2.5
 
Quote:

Originally Posted by Avaray (Post 2084069)
Good plugin!

Our server players are asking for possibility to hide chat messages (XXX is listening now XXX).
Maybe add command like !gshide or something like that

You could comment '//' out line #231 and then recompile. :fox:

Avaray 01-10-2014 22:11

Re: [ANY] Grooveshark 1.2.5
 
Yes. But some of people want to see that messages, some of them didnt.

vodka00 02-07-2014 01:19

Re: [ANY] Grooveshark 1.2.5
 
Can we have a !gsrandom command that would pick a random song and play for us? :-)

doze 03-09-2014 09:15

Re: [ANY] Grooveshark 1.2.5
 
Quote:

Originally Posted by vodka00 (Post 2096606)
Can we have a !gsrandom command that would pick a random song and play for us? :-)

+1 for this.

vodka00 04-20-2014 02:20

Re: [ANY] Grooveshark 1.2.5
 
is sm_gsstop not working for anyone else anymore since todays update(?)

danielmyst777 04-21-2014 01:15

Re: [ANY] Grooveshark 1.2.5
 
Cool plug-in. Thanks for fixing it. Working well here on L4D2!

It would be cool to add admin functions such as force play to all clients, eavesdrop on current listening, etc.

doze 04-21-2014 10:58

Re: [ANY] Grooveshark 1.2.5
 
Quote:

Originally Posted by vodka00 (Post 2127105)
is sm_gsstop not working for anyone else anymore since todays update(?)

Yes.

DontWannaName 04-28-2014 23:48

Re: [ANY] Grooveshark 1.2.5
 
I no longer support this plugin as I am working at Valve now. If anyone would like to take it over let me know. As far as I know, it is still in working order. The stop feature may not work, but that's an easy fix.

pubhero 05-03-2014 00:29

Re: [ANY] Grooveshark 1.2.5
 
Anyone can repair the gsstop problem? Thanks in advance.

vodka00 05-03-2014 01:20

Re: [ANY] Grooveshark 1.2.5
 
Quote:

Originally Posted by DontWannaName (Post 2131012)
I no longer support this plugin as I am working at Valve now. If anyone would like to take it over let me know. As far as I know, it is still in working order. The stop feature may not work, but that's an easy fix.

Well that's unfortunate, hopefully someone can pick this up. Also, good luck on the whole Steam thing.

I also got this recently,

Code:

L 05/03/2014 - 00:04:28: Info (map "bhop_ztkandblacky4life") (file "errors_20140503.log")
L 05/03/2014 - 00:04:28: [SM] Native "ReplaceString" reported: Cannot replace searches of empty strings
L 05/03/2014 - 00:04:28: [SM] Displaying call stack trace for plugin "custom\grooveshark.smx":
L 05/03/2014 - 00:04:28: [SM]  [0]  Line 213, C:\Users\roma\Desktop\sm\addons\sourcemod\scripting\grooveshark.sp::OnSocketReceive()


Tank Missile 05-03-2014 03:12

Re: [ANY] Grooveshark 1.2.5
 
Quote:

Originally Posted by pubhero (Post 2132783)
Anyone can repair the gsstop problem? Thanks in advance.

it's actually quite simple to fix... gsstop attempts to open the motd on about:blank, which is now a banned link since a recent update. This prevented songs from stopping. All you need to do is change the link to a different url, like http://www.blank.org. To give more specific directions....

1. Open grooveshark.sp with a file editor, such as notepad.

2. Click edit, and then find.

3. From there, type public Action:cmdGSStop in the find what bar.

4. Once you see public Action:cmdGSStop(client, args), go down 5 lines to KvSetString(setup, "msg", "about:blank");

5. Change the "about:blank" to any url you please. Make sure http:// is included, or the command won't work.

6. In your tf2 server folder, go to tf\addons\sourcemod\scripting, and drag your .sp to an application named compile. The .smx should end up in the compiled folder.

pubhero 05-03-2014 05:12

Re: [ANY] Grooveshark 1.2.5
 
Thanks Tank Missile.

vodka00. The plugin working with the sm 1.5.2 but not with the 1.5.3 . Don't ask me why. If you want to use this plugin, you must downgrade your sourcemod back. It works for me.

Weasel 05-05-2014 20:04

Re: [ANY] Grooveshark 1.2.5
 
I would really like a plug-in that would just be like "SM_Play", but "SM_PlayGrooveShark" with the URL or ID to a song on GS - and use client-preferences to allow client's to opt-out of music initiated by the server (!grooveoff and !grooveon - something like that).

vodka00 05-07-2014 03:42

Re: [ANY] Grooveshark 1.2.5
 
Quote:

Originally Posted by Tank Missile (Post 2132820)
it's actually quite simple to fix... gsstop attempts to open the motd on about:blank, which is now a banned link since a recent update. This prevented songs from stopping. All you need to do is change the link to a different url, like http://www.blank.org. To give more specific directions....

Thanks, that indeed was an easy fix :]

Tank Missile 05-09-2014 12:24

Re: [ANY] Grooveshark 1.2.5
 
Well, even though gsstop is easy to fix, the rest of the plugin seems broken... Whenever I try to play a song, it says "Tank Missile is now playing by ." I would attempt to fix this myself, but anything past simple edits of .sps is beyond me.

EDIT: Right, it only works on sourcemod 1.5.2.... I don't want to have to downgrade my sourcemod just for this plugin, so someone needs to fix it...

DrFallen 05-09-2014 15:30

Re: [ANY] Grooveshark 1.2.5
 
Erm works with SM 1.4. If you get a Now plays . its to do with the API Key

Tank Missile 05-10-2014 02:09

Re: [ANY] Grooveshark 1.2.5
 
Quote:

Originally Posted by DrFallen (Post 2135697)
Erm works with SM 1.4. If you get a Now plays . its to do with the API Key

Nope. Even though I tried several api keys, it still doesn't display the song or author in chat, and doesn't play the song. Maybe it only works in 1.4?

vodka00 05-10-2014 02:36

Re: [ANY] Grooveshark 1.2.5
 
Running it on 1.5.4 just fine.

DrFallen 05-10-2014 10:11

Re: [ANY] Grooveshark 1.2.5
 
Quote:

Originally Posted by Tank Missile (Post 2135806)
Nope, even though I tried several api keys, it still doesn't display the song or author in chat, and doesn't play the song. Maybe it only works in 1.4?

Whoops meant 1.5.4 :D


All times are GMT -4. The time now is 13:45.

Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.