Server : File with list of tracks

Post your questions here
Post Reply
MxWayGamer
Crushed Dissenter
Posts: 326
Joined: Mon Oct 13, 2014 3:46 pm
Team: MTFactory

Server : File with list of tracks

Post by MxWayGamer »

Hi !

All is in the title, how i can know what track is on my server with external script ?
Image
Wahlamt
Posts: 7934
Joined: Mon Sep 13, 2010 3:15 pm
Team: MLG Compton
Location: Sweden
Contact:

Re: Server : File with list of tracks

Post by Wahlamt »

There's not a file or command that can really do this for you. A shot in the dark would be: Have an array of the tracks on your server, then have a database column with "last track" which you get from the result file, compare those to and assume the next one in the order of the array is the one that's currently playing.
MxWayGamer
Crushed Dissenter
Posts: 326
Joined: Mon Oct 13, 2014 3:46 pm
Team: MTFactory

Re: Server : File with list of tracks

Post by MxWayGamer »

That's what I though but it's not very practical if I would like to add track or remove... JLV can you add - - track-file? :)
Image
jlv
Site Admin
Posts: 14928
Joined: Fri Nov 02, 2007 5:39 am
Team: No Frills Racing
Contact:

Re: Server : File with list of tracks

Post by jlv »

I could, but I don't see how it's any better than tracking it in your script. Just do something like this:

echo -n "x/xyzzy/addtrack 0 5 60 mytrack.trackinfo" >/dev/udp/127.0.0.1/19800
echo >>tracklist mytrack.trackinfo
Josh Vanderhoof
Sole Proprietor
jlv@mxsimulator.com
If you email, put "MX Simulator" in the subject to make sure it gets through my spam filter.
MxWayGamer
Crushed Dissenter
Posts: 326
Joined: Mon Oct 13, 2014 3:46 pm
Team: MTFactory

Re: Server : File with list of tracks

Post by MxWayGamer »

If I add track with script i'm totaly agree with you but if other administrators add track with command "server,addtrack" on the server. This track will not in my file. It's the same with remove command.
Image
jlv
Site Admin
Posts: 14928
Joined: Fri Nov 02, 2007 5:39 am
Team: No Frills Racing
Contact:

Re: Server : File with list of tracks

Post by jlv »

You could use --extension to make alternative commands to add and remove tracks. Admins could still muck up the track list if they wanted though.
Josh Vanderhoof
Sole Proprietor
jlv@mxsimulator.com
If you email, put "MX Simulator" in the subject to make sure it gets through my spam filter.
Post Reply