brandan
Mar 18 2005, 20:22
hey, i sort of use the audioscrobbler plugin, but audioscrobbler sucks, and is slow. is there any sort of play logging plugin available? i could easily write a php script to parse the files generated by the plugin (if they're not too convoluted). thanks in advance.
Smitty Jones
Mar 18 2005, 21:38
foo_history? not sure if it does what you want or no...
brandan
Mar 18 2005, 21:56
i'll check it out, thanks.
well, it would be perfect if it weren't for the fact that it doesn't use flat files to store information. :< i know nothing about developing plugins, either.
oh, and it uses filenames as opposed to metadata, or whatever. i listen to cds most of the time. i'll keep looking.
foosion
Mar 19 2005, 05:01
I'd suggest foo_text. It writes to a simple text file and has a configurable output format.
Mr_Rabid_Teddybear
Mar 19 2005, 08:25
A little formattingstring for a logfile for use with
foo_text to be found
here, if that can be used for something....
brandan
Mar 19 2005, 09:20
this is exactly what i needed, thanks a ton.
here's the formatting string i'm using. it's pretty simple and clean to allow easier parsing (notice the 5 dashes between entries):
[%_system_time%]-----[%_system_date%]-----[%artist%]-----$if(%album%,%album%-----)[%title%]-----[%_length%]
here's a better formating string that should work directly with php's parse_str function:
time=[%_system_time%]&date=[%_system_date%]&artist=[%artist%]$if(%album%,&album=%album%)&title=[%title%]&length=[%_length%]
as soon as i install php and write up a script to scan this file i will post the results.
brandan
Mar 24 2005, 04:09
alrighty, here's the first solid incarnation of the system:
http://70.178.69.2:666/as of right now i'm not really sure where to go with this. if anybody has any suggestions or questions, please let me know. i'm sort of at a creative standstill.
setSuna
Mar 26 2005, 14:48
Care to send you're strings (and other stuff) for that? Looks like it would be cool to have (wouldn't have to wait a month for Audioscrobbler to update my stuff..)
brandan
Mar 26 2005, 15:56
this will only work if you're running a webserver with php5 and sqlite support. i'm not really done with everything (i'm going to be working on a search type function sometime this week), this was really just an example of what i'm working on.
setSuna
Mar 26 2005, 16:37
ALright, sounds fun, I am almost possitive my server supports both, but good luck with that project, looks to have some potential.
brandan
Mar 26 2005, 17:58
thanks. once i get everything sorted out i'll probably make it publicly available. the only problem is that i'm so horrible with php and sql that i will be laughed off the internet.
oh, and here's a current issue that i have. maybe you all can give me opinions about how to solve this. there is a script that reads the logged plays file, parses it, then places information in the database. the issue with this is that it's really slow, so having it update every time the page is loaded is out of the question. parsing the file and using those reults for the page, rather than storing information in the database, would not only require more work, but would also be tons slower.
my solution is scheduled updates using chron or task scheduler, or whatever, but this isn't actually necessary, it would just keep you from having to visit the update page (and would also prevent the playlog file from getting too long).
i also thought about putting the log file on a ramdisk to see how much quicker it would be, but that's just a personal thing.
setSuna
Apr 6 2005, 15:05
How goes the recent played project?
brandan
Apr 11 2005, 11:50
it's alright. i've pretty much hit a standstill so far as development is concerned until i can get some feedback on the project. another member of the forums showed me an example of what he's been working on and it pretty much killed any inspiration i had.
there's also the problem of ease of use. i think the best way to go about this would be custom plugins for the project, but i know nothing of audio plugins are how to begin developing them.
Slaanesh
Apr 11 2005, 12:35
MySQL has a very useful API for communicating with C++. Since fb2k is written in C++, you could just take song information from foobar2000 via a plugin and update it to the MySQL server using the API.
As you might already know, PHP can grab info from a MySQL server fairly easily, so you wouldn't have too much trouble parsing the information.
brandan
Apr 11 2005, 15:40
i'm not quite sure what that reply means.
oh, and
http://www.sourceforge.net/projects/ear
simmosn
Apr 11 2005, 16:25
From a post I made on another forum:
I got tired of Audioscrobbler only updating my '50 top artists' and '50 top tracks' lists every week, so I decided to write a simple PHP script to parse the output files from the foo_text component. The result is
this which is generated from
this file.Step 1:
Download
foo_textStep 2:
Configure it so it looks like this:


Step 3:
Upload
this to your web host along with your text file generated by foo_text.
>> View example output <<If there's any interest I'll develop this a bit further and add some of the other featues AudioScrobbler has (weekly charts, pretty text bars etc)
CODE
@echo off
setlocal
rem You can change these:
set FTPUSER=username
set FTPPASSWORD=password
set FTPHOST=website.com
rem Set this to something if you need to change remote directory before uploading
set FTPDIR=/public_html/uploads
rem Don't change anything after this point.
echo open %FTPHOST% > %TEMP%\ftpcommands.txt
echo user %FTPUSER% %FTPPASSWORD% >> %TEMP%\ftpcommands.txt
echo binary >> %TEMP%\ftpcommands.txt
if not "%FTPDIR%" == "" echo cd %FTPDIR% >> %TEMP%\ftpcommands.txt
echo put "c:\program files\play_log.txt" >> %TEMP%\ftpcommands.txt
echo quit >> %TEMP%\ftpcommands.txt
ftp -n -s:%TEMP%\ftpcommands.txt
rem For the security conscious:
del %TEMP%\ftpcommands.txt
Add this to a batch file to upload the text file to your webspace
setSuna
May 12 2005, 21:10
Looks interesting, I am going to try this out.
If you did continue to work on it I would definaly use it.
Also: I could get niether thing to work.
This is a "lo-fi" version of our main content. To view the full version with more information, formatting and images, please
click here.