Official BS.Player forums

Official BS.Player forums (
-   Feature Requests, Feedback And Suggestions (
-   -   song variables for irc script (

~viper~ 5th January 2007 08:51 PM

song variables for irc script
I've used BSPlayer for a while on windows because it is a pretty good player, and faster/less buggy than VLC, for example. Recently on linux I've been playing with BMP (Beep Media Player), a media player based on XMMS--hopefully you guys have heard of it.
BMP has a plugin that allows the user to run a shell command when a song is changed, using the different song variables; for example %n would be the song name, and %l would be the song length in milliseconds. My shell command would put 3 variables into a file, and then I could write a python script extracting the variables and turning it into a "now playing" IRC script.
I could post a pic of the effect and how the BMP plugin looks if you want.

Basically, could you make such a plugin for BSPlayer? Preferably w/ the ability to extract minutes and seconds rather than just milliseconds?

~viper~ 6th January 2007 06:02 AM

i guess all i need is for someone to make a plugin that would write three lines to a file of user's choice, overwriting that file each time a song is changed:

<milliseconds> (or seconds, whichever is easier)

[edit] this will be most useful for songs, but could be used no matter what the file type, for videos also have names and time lengths [/edit]

~viper~ 7th January 2007 06:54 AM


Raz 7th January 2007 09:22 AM

Hi ~viper~
give me some time and I will build you the plugin :wink:

Tizio 8th January 2007 11:44 AM


Originally Posted by Raz
Hi ~viper~
give me some time and I will build you the plugin :wink:

Wow, a RafkeP substitute :D

We hope you'll be active as a plugin maker :wink:

Raz 8th January 2007 09:42 PM


Originally Posted by Tizio
Wow, a RafkeP substitute :D

We hope you'll be active as a plugin maker :wink:

I'm not sure if I have the time to substitute someone else but i will try to help where/when i can :roll: so drop me a pm when I'm not around the forums and some one needs a BS plug-in :wink:

Here is your plugin
Just copy the dll in your BSplayer plugins folder, start BS, go to preferences ->Plugins and Select BStoTxt from the plugins list to set the output file name.
The Output file will be saved in this format:


Runing Scared 2oo6 --> Line1: movie/file source folder name
Running Scared      --> Line2: file name (without extension)
0                            --> Line3: days (why not  :lol:)
01                          --> Line4: hours
56                          --> Line5: minutes
36                          --> Line6: seconds

Have fun! and let me know if you need any more changes :)

~viper~ 9th January 2007 12:01 AM

hey raz,
thanks for working on it! The link brings me to the raz-soft homepage, where the latest thing is LPS - BSplayer Plug-in (v0.12) submitted january 4th, so I can't seem to find your BStoText plugin.

[edit] looking at the link again, it has the correct name, but seems to (automatically!?) link to the raz-soft homepage, so doing a save-as will create a corrupt .rar archive, because i think it attempts to save that webpage as a .rar archive [/edit]

[edit2] ok, got it just by going to and dling it from there. Found a slight problem -- the previous and next buttons don't seem to work with the plugin, otherwise pretty good =) [/edit2]

RafkeP 9th January 2007 07:23 AM

It's good to see a new plugin maker.
Now I can officially retire :D

Good luck Raz and thanks for all the future plugins :D
Rafke P.

Raz 9th January 2007 09:14 AM

@~viper~: try now, is the same link (sorry I'm running low on bandwidth so i had to enable the HotLink Protection for my home page)
[edit]what do you mean by previous and next buttons not working?

@RafkeP: thank you! but please don't retire yet, don't leave me here all alone :D

~viper~ 9th January 2007 10:19 AM


@~viper~: what do you mean by previous and next buttons not working?
oh... weird...working now.:? Before I had reboot, pressing the 'previous' and 'next' gui buttons would do nothing if the plugin was present in bsplayer's plugin directory. Maybe I had done something and needed to reboot anyway?
I guess plugin works, and I can start writing my script ;) thx

Raz 9th January 2007 10:32 AM

weird, no reboot is needed ... it should always change/overwrite the output file when new file is loaded in BS. Opening the same file will not overwrite the output, maybe that was what happened... anyway, good luck with your script and let us know when is done ;)

~viper~ 9th January 2007 12:22 PM

yea, finished the basic script, since not much needed changing from my linux script. It's specifically for xchat, however, so not sure how many people will find it useful.

Sometimes hitting 'previous' and 'next buttons' produces an application error popup:
"Exception EFCreateError in module BStoTxt.dll at 0000B58A"

[edit] i didnt do anything particularly exciting, but it stopped working and gives that popup on first song startup and every song change, not modifying my file anymore [/edit]

[edit2] saving to a file, then choosing to save to the file again will prompt for overwriting; confirming this will then cause the 'previous' and 'next' gui button bugs, and failure to update the chosen file on song change [/edit2]

Raz 9th January 2007 01:16 PM

lack of access rights? lack of disk space? :roll: try saving the output in another folder... I've tested the plugin with BS v1.4.1.832 and v2.1.2.941 and I didn't find any problems .. maybe this happens if you cycle thro next and previous to fast? i will remove the overwrite message from the save dialog box if that helps...
How do you check for file changes from your script? How do you open it? you should open the file with Read Only access so when the plugin makes any changes he can have full access rights to the output file ...

~viper~ 10th January 2007 08:41 AM

I don't understand it sometimes... atm working fine, i guess if I don't play w/ it too much it will not bug out.. bsplayer 2.10 btw. Script works fine

*viper listens to 01. Magik 5 - Heaven Beyond - [alibi - Eternity] 5min 08sec «~viper~ nowplaying - 0.1»

is the approximate effect+color as seen on IRC. I'll need to rename my song titles so that they appear better, and implement a bunch of phrases to differ from the boring "listens to", and have the script choose one at random.

Raz 10th January 2007 09:00 AM

It looks good :wink:
I will add some error checking in the plugin to bypass issues regarding the file access errors, so the plugin will not crash BS anymore...

adicoto 10th January 2007 10:25 AM


Welcome among BSPlayer's fans.
Bun venit printre fanii BSPlayer.

Tizio 10th January 2007 11:07 AM

Oh, I missed that, another romanian programmer :o

Raz 10th January 2007 01:36 PM

Multumesc adicoto pentru primire, se pare ca esti de ceva vreme prin zona BS, cred ca te cunosc (oarecum) :D

@Tizio: yes, I'm a proud Romanian c0der :D

Raz 11th January 2007 08:26 PM

Here is the updated version, it should not crash anymore, even if the plugin doesn't have full write access to the output file...
Added another line to the output file (last line): milliseconds 8)
Let me know if this one works better with your script...

adicoto 11th January 2007 09:59 PM

E posibil sa ne cunoastem (oarecum) probabil umblam prin multe locuri amandoi iar eu cel putin am acelasi nick peste tot.

It's possible that we know eachother, probably we browse many common places.

All times are GMT +1. The time now is 11:22 AM.

Powered by vBulletin® Version 3.8.9
Copyright ©2000 - 2022, vBulletin Solutions, Inc.
Search Engine Optimization by vBSEO 3.6.0 PL2
Ad Management plugin by RedTyger

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20