![]() |
song variables for irc script hi, 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? thx, ~viper~ |
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: <song> <milliseconds> (or seconds, whichever is easier) <minutes> [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] |
please? |
Hi ~viper~ give me some time and I will build you the plugin :wink: |
Quote:
We hope you'll be active as a plugin maker :wink: |
Quote:
@~viper~ 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: Code: Runing Scared 2oo6 --> Line1: movie/file source folder name |
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 http://www.raz-soft.com/files/ 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] |
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. |
@~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 |
Quote:
I guess plugin works, and I can start writing my script ;) thx |
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 ;) |
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] |
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... [edit] 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 ... |
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. |
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... |
@Raz Welcome among BSPlayer's fans. Bun venit printre fanii BSPlayer. |
Oh, I missed that, another romanian programmer :o |
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 |
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... |
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. |
nice, no problems so far , though I haven't fully messed with it just yet ;) I was recently thinking that it might be neater if i wrote it a different way... could you make the first line return the full path to the file rather than the relative path to the folder? (it returns something like ".." which I could play with, I guess, but then script would be specific to my computer) There's a nice module in python that allows the reading of mp3 id3 tags, so if you provide the full path it would be easier to extract album/artist/etc from the mp3 =). It would also be less messy-looking and I would not have to change hundreds of song names just to make it look nice ;) thx again, and nice work! :thumbsup: |
Quote:
|
Here is the updated version (v0.0.13.183), first line will be the full path of the opened file... Have Fun! |
Awesome!! hopefully I won't bug you anymore =) if playlist is still in same directory tree as song, sometimes the beginning of the full path could be replaced by something like "..", which i guess is easily correctable by changing the directory of the playlist or with one line of code. [edit] was pretty easy fix, so cheers! [/edit] thx, nice plugin, very useful! 5/5 |
Hi, Sorry for kicking this really old topic. I am trying to use this plugin but it only seems to work for 50%. The plugin does write the data to a text file when opening a video directly from explorer, but when skipping between video's in a playlist it will not update the text file. Does anyone know where the problem lies? I am using the newest BSPlayer version 2.4.3 Thanks in advance! |
OK, the script seems to work fine with older versions. I've got a 2.28 running here now and that works fine with the script. |
All times are GMT +1. The time now is 05:49 PM. |
Powered by vBulletin® Version 3.8.9
Copyright ©2000 - 2025, vBulletin Solutions, Inc.
Search Engine Optimization by vBSEO 3.6.0 PL2
Ad Management plugin by RedTyger