Raised This Month: $51 Target: $400
 12% 

[TF2] Spotify:Source


Post New Thread Reply   
 
Thread Tools Display Modes
Author
Spartan_C001
Senior Member
Join Date: Jul 2013
Plugin ID:
4633
Plugin Version:
1.0.2
Plugin Category:
Fun Stuff
Plugin Game:
Any
Plugin Dependencies:
    Servers with this Plugin:
     
    Plugin Description:
    Spotify music player.
    Old 05-15-2015 , 18:40   [TF2] Spotify:Source
    Reply With Quote #1

    Spotify:Source
    1.0.2
    What is Spotify:Source?
    • Music player plugin
    • Similar to "Grooveshark"
    • For Spotify!
    Requirements
    ConVars
    • sm_sp_version - It is what it says, the version of the plugin.
    Commands
    • sm_sp <song name> - Play a song, the first time this command is run it opens the motd to allow the user to log in.
    • sm_spstop - Stop any music that is playing (this is useful as Spotify assumes you want to listen to the rest of the album).
    • sm_sp_reset - Resets the first time check, this is so you can re-attempt a login if you closed it by accident.
    ToDo
    • Improve error messages
    • Support for other games
    Demonstration
    • YouTube Demo (here)
    Attached Files
    File Type: smx Spotify.smx (9.6 KB, 459 views)
    File Type: sp Get Plugin or Get Source (Spotify.sp - 286 views - 5.6 KB)

    Last edited by Spartan_C001; 05-16-2015 at 02:37.
    Spartan_C001 is offline
    proffs
    Senior Member
    Join Date: Jul 2013
    Old 05-15-2015 , 19:25   Re: [ANY] Spotify:Source
    Reply With Quote #2

    Nice idea! Provide some screen shots please so we can see how it looks like!

    Good Luck btw!
    proffs is offline
    Lannister
    Veteran Member
    Join Date: Apr 2015
    Old 05-15-2015 , 19:41   Re: [ANY] Spotify:Source
    Reply With Quote #3

    Any way to use grooveshark.io as website?
    Lannister is offline
    Spartan_C001
    Senior Member
    Join Date: Jul 2013
    Old 05-15-2015 , 23:26   Re: [TF2] Spotify:Source
    Reply With Quote #4

    Managed to get it working now, there are flaws as expected with late night coding, i will do my best to iron out those flaws and improve it as best i can.

    The main problem i encountered is arrays, if anyone knows how to pull stuff deep from arrays (i know the items im trying to read) id be able to use it direct from the Spotify api but im having to relay the query through a php script to make it readable for the plugin (poor thing).

    edit: i also had to fix something like 30+ errors in the json.inc file (mainly due to certain things being depreciated and causing issues with sm compiler), so ill be working on both optimising the plugin and the include file.

    edit2: you can test it on my sniper server @ 108.61.165.59:27015 and heres a demo video http://youtu.be/M47eXzIg7XQ

    Last edited by Spartan_C001; 05-15-2015 at 23:50.
    Spartan_C001 is offline
    Spartan_C001
    Senior Member
    Join Date: Jul 2013
    Old 05-16-2015 , 01:34   Re: [TF2] Spotify:Source
    Reply With Quote #5

    Ok guys, i re-wrote it to be dependant on the SMJansson extension rather than the sm json include, the smjansson is faster, works better, and i am able to use it to read the response from Spotify's api directly. This removes the need for me to host a relay script, it also reduced the size of the compiled plugin somehow despite there being more code lol.

    You can test it out @ 108.61.165.59:27015 and here's a video of it http://youtu.be/M47eXzIg7XQ
    Spartan_C001 is offline
    Chdata
    Veteran Member
    Join Date: Aug 2012
    Location: Computer Chair, Illinois
    Old 05-16-2015 , 01:40   Re: [TF2] Spotify:Source
    Reply With Quote #6

    first sm_sm now sm_sp
    __________________
    Chdata is offline
    Spartan_C001
    Senior Member
    Join Date: Jul 2013
    Old 05-16-2015 , 01:45   Re: [TF2] Spotify:Source
    Reply With Quote #7

    Quote:
    Originally Posted by Chdata View Post
    first sm_sm now sm_sp
    well, its better than sm_spotify_please_play_me_a_song / sm_spotify_please_stop_playing_music

    edit: if anyone knows how to check clients web browser cookies, id like to make it so if the user is already logged in it wont show motd, and always show motd if not logged in

    Last edited by Spartan_C001; 05-16-2015 at 02:28.
    Spartan_C001 is offline
    RedSword
    SourceMod Plugin Approver
    Join Date: Mar 2006
    Location: Quebec, Canada
    Old 05-16-2015 , 02:27   Re: [TF2] Spotify:Source
    Reply With Quote #8

    For a future approval you could put a version convar with a more descriptive name. "sm_sp_version" doesn't tell much. You also don't need to prefix your convar with "sm_". It is however a good thing that you do it with commands.

    Red
    __________________
    My plugins :
    Red Maze
    Afk Bomb
    RAWR (per player/rounds Awp Restrict.)
    Kill Assist
    Be Medic

    You can also Donate if you appreciate my work
    RedSword is offline
    Spartan_C001
    Senior Member
    Join Date: Jul 2013
    Old 05-16-2015 , 02:40   Re: [TF2] Spotify:Source
    Reply With Quote #9

    Quote:
    Originally Posted by RedSword View Post
    For a future approval you could put a version convar with a more descriptive name. "sm_sp_version" doesn't tell much. You also don't need to prefix your convar with "sm_". It is however a good thing that you do it with commands.

    Red
    Updated - v1.0.2

    - Changed version cvar to "spotify_source_version"
    - Fixed some error messages only showing in client console
    - Fixed server console being able to play music and cause errors
    Spartan_C001 is offline
    proffs
    Senior Member
    Join Date: Jul 2013
    Old 05-16-2015 , 11:31   Re: [TF2] Spotify:Source
    Reply With Quote #10

    Good work man! I really love the idea and plugin once again
    Watched the video, seems awesome! Good work and keep it up ^^

    btw if you need testers for specefic things/plugins PM me I would help you!
    proffs is offline
    Reply



    Posting Rules
    You may not post new threads
    You may not post replies
    You may not post attachments
    You may not edit your posts

    BB code is On
    Smilies are On
    [IMG] code is On
    HTML code is Off

    Forum Jump


    All times are GMT -4. The time now is 21:10.


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