PDA

View Full Version : Can I setup slimserver to log all files served?



tomsi42
2005-11-25, 13:55
Hi,

I have had a SB2 for a few weeks now and are really enjoying it. A question from a friend popped up today.

Is it possible to see which songs that have been played on my SB2 during a given period?

"Why?" may you ask. What do I listen most ? I let my friends loose on my music collections. What did they choose?

Tom

stinkingpig
2005-11-25, 14:07
>
> Hi,
>
> I have had a SB2 for a few weeks now and are really enjoying it. A
> question from a friend popped up today.
>
> Is it possible to see which songs that have been played on my SB2
> during a given period?
>
> "Why?" may you ask. What do I listen most ? I let my friends loose on
> my music collections. What did they choose?
>
> Tom

http://last.fm -- has a slimserver plugin.
--
Jack At Monkeynoodle.Org: It's A Scientific Venture...
"Believe what you're told; there'd be chaos if everyone thought for
themselves." -- Top Dog hotdog stand, Berkeley, CA

NÚstor
2005-11-25, 14:11
Hi,

I have had a SB2 for a few weeks now and are really enjoying it. A question from a friend popped up today.

Is it possible to see which songs that have been played on my SB2 during a given period?

"Why?" may you ask. What do I listen most ? I let my friends loose on my music collections. What did they choose?

Tom

Hi,

check www.lastfm.com , and then check the Slimscrobbler plugin. It may be all you need (altough not as detailed as you may want)

tomsi42
2005-11-25, 14:39
Thank's for the link to lastfm. From what I see from their website, I don't think it is what I am looking for.

1. The data I want to collect is for personal use.
2. I am not interested in what lastfm is offerning.
3. I am also suspicious of website who want to collect data for me. Do they have other motives ?

Tom

ceejay
2005-11-25, 15:42
Well, lastFM would probably quite like to sell you some music, but you don't have to buy it! I use it (via James' excellent plugin) a lot, they do a good job of serving up music I (usually) want to listen to.

However, back to the question... I would guess that the audioscrobbler plugin, which captures the data to send off to lastFM, wouldn't take very much hacking to send the data to some local file instead... in fact I think its already set up to cache data in a log file when the link to lastFM is down, so it might be really easy.

Ceejay

stinkingpig
2005-11-25, 15:45
>
> Thank's for the link to lastfm. From what I see from their website, I
> don't think it is what I am looking for.
>
> 1. The data I want to collect is for personal use.
> 2. I am not interested in what lastfm is offerning.
> 3. I am also suspicious of website who want to collect data for me. Do
> they have other motives ?
>
> Tom
>

No, of course not. They also give out free ponies every weekend.

--
Jack At Monkeynoodle.Org: It's A Scientific Venture...
"Believe what you're told; there'd be chaos if everyone thought for
themselves." -- Top Dog hotdog stand, Berkeley, CA

tomsi42
2005-11-25, 16:01
>
> Thank's for the link to lastfm. From what I see from their website, I
> don't think it is what I am looking for.
>
> 1. The data I want to collect is for personal use.
> 2. I am not interested in what lastfm is offerning.
> 3. I am also suspicious of website who want to collect data for me. Do
> they have other motives ?
>
> Tom
>

No, of course not. They also give out free ponies every weekend.

--
Jack At Monkeynoodle.Org: It's A Scientific Venture...
"Believe what you're told; there'd be chaos if everyone thought for
themselves." -- Top Dog hotdog stand, Berkeley, CA

Too bad. I'm so heavy, I'd kill the pony...

tomsi42
2005-11-25, 16:02
Well, lastFM would probably quite like to sell you some music, but you don't have to buy it! I use it (via James' excellent plugin) a lot, they do a good job of serving up music I (usually) want to listen to.

However, back to the question... I would guess that the audioscrobbler plugin, which captures the data to send off to lastFM, wouldn't take very much hacking to send the data to some local file instead... in fact I think its already set up to cache data in a log file when the link to lastFM is down, so it might be really easy.

Ceejay

That is of course an idea. I will have to think about that over the weekend.

pfarrell
2005-11-25, 16:09
On Fri, 2005-11-25 at 12:55 -0800, tomsi42 wrote:
> Is it possible to see which songs that have been played on my SB2
> during a given period?

I may be imagining it, but I am sure that on the old
server (circa 5.4) that there was a report on
popularity of songs. Easily accessible from the
main server page. I can't find it on the page
with my 6.2.1 server.

If the data is available in the slimserver's database, it
should be trivial to use perl to crank out a simple report.
I haven't checked the schema to see if the data is there.
If it isn't, sounds like a good and easy enhancement to
the database.

--
Pat
http://www.pfarrell.com/music/slimserver/slimsoftware.html

tomsi42
2005-11-25, 16:17
On Fri, 2005-11-25 at 12:55 -0800, tomsi42 wrote:
> Is it possible to see which songs that have been played on my SB2
> during a given period?

I may be imagining it, but I am sure that on the old
server (circa 5.4) that there was a report on
popularity of songs. Easily accessible from the
main server page. I can't find it on the page
with my 6.2.1 server.

If the data is available in the slimserver's database, it
should be trivial to use perl to crank out a simple report.
I haven't checked the schema to see if the data is there.
If it isn't, sounds like a good and easy enhancement to
the database.

--
Pat
http://www.pfarrell.com/music/slimserver/slimsoftware.html

Now, that was my thought as well. But I couldn't find any information in the docs or faq's. It shouldn't be difficult to put something together, though...

sbjaerum
2005-11-25, 16:17
On Fri, 2005-11-25 at 12:55 -0800, tomsi42 wrote:
> Is it possible to see which songs that have been played on my SB2
> during a given period?

I may be imagining it, but I am sure that on the old
server (circa 5.4) that there was a report on
popularity of songs. Easily accessible from the
main server page. I can't find it on the page
with my 6.2.1 server.

If the data is available in the slimserver's database, it
should be trivial to use perl to crank out a simple report.
I haven't checked the schema to see if the data is there.
If it isn't, sounds like a good and easy enhancement to
the database.

--
Pat
http://www.pfarrell.com/music/slimserver/slimsoftware.html

http://localhost:9000/hitlist.html
Don't know why it's not linked.

Steinar

ceejay
2005-11-25, 16:30
One reason for hitlist not being linked may be that the data appears to be nonsense.

Played info certainly could find a place in the database, but there are two limitations I can see:

(1) the current database just allows for a track played count, it has nowhere to record when the track was played, nor (which I think would be handy) which player it was played on

(2) there are still far too many reasons to be wiping the cache... the database isn't a safe place to keep data that isn't easily recreatable (eg from tags).

On the other hand, amending the scrobbler plugin (which has lots of lovely intelligence to handle pause and stop and minimum play time) to dump a full "played" record in a log file could be the basis of some neat offline analysis.

Ceejay

tomsi42
2005-11-25, 16:48
Thanks for the feedback.

If I can clear the hitlist, I can at least find out what my friends plays at the party tomorrow. That will solve the problem that started the discussion.

In a few weeks time I hope that I will have time look at the lastfm plugin and modify it to me needs (If I am allowed to do that...)

tomsi42
2005-11-25, 16:58
Thanks for the feedback.

If I can clear the hitlist, I can at least find out what my friends plays at the party tomorrow. That will solve the problem that started the discussion.

In a few weeks time I hope that I will have time look at the lastfm plugin and modify it to me needs (If I am allowed to do that...)

I found out how to clear the hitlist. Go to server -> Rescan library and select "Clear library and rescan everything".

This will solve this weekend's challenge, but I doub't it is useful for anyone else ;)

ceejay
2005-11-26, 01:08
In a few weeks time I hope that I will have time look at the lastfm plugin and modify it to me needs (If I am allowed to do that...)

There are two different plugins relating to lastFM. The "lastFM" plugin is for the playing of lastFM personalised streams through the Squeezebox - although I think this is great, this is not the one you are looking for.

The other one is the slimscrobbler plugin, which submits your track played info to lastFM. This is the one you would want to change - although be warned, its a bit of a monster (meaning big, not bad!).

Allowed to? Of course you are, this is the land of open source! Just find the .pm file in the server/plugins directory, get out your Perl book and off you go! If you come up with something, just be sure to let everyeon know!

Good luck

Ceejay

Jim
2005-11-26, 05:35
SELECT LEFT(title, 255),
playcount,
FROM_UNIXTIME(lastplayed)
FROM tracks WHERE FROM_UNIXTIME(lastplayed) > '2005-11-01';


Of course, would be better to join to artists too but I'm lazy today. And the > '2005-11-01' doesn't have to be a date, can be an exact time:

WHERE FROM_UNIXTIME(lastplayed) > '2005-11-26-09:05:33';

tomsi42
2005-11-27, 08:36
SELECT LEFT(title, 255),
playcount,
FROM_UNIXTIME(lastplayed)
FROM tracks WHERE FROM_UNIXTIME(lastplayed) > '2005-11-01';


Of course, would be better to join to artists too but I'm lazy today. And the > '2005-11-01' doesn't have to be a date, can be an exact time:

WHERE FROM_UNIXTIME(lastplayed) > '2005-11-26-09:05:33';

Thanks for the tips. I will try this first as it is what I'm after. But I will problable also look at the SlimScrobber plugin to see if a can make a small logger plugin.

Tom

ceejay
2005-11-28, 16:49
Thanks for the tips. I will try this first as it is what I'm after. But I will problable also look at the SlimScrobber plugin to see if a can make a small logger plugin.

Tom

You might also want to have a look at this:

http://forums.slimdevices.com/showthread.php?t=18597 which might be an easier starting point. You could even ask Max if he'd add the option to log to a file instead of an FTP site!

Ceejay

tomsi42
2005-11-29, 10:06
You might also want to have a look at this:

http://forums.slimdevices.com/showthread.php?t=18597 which might be an easier starting point. You could even ask Max if he'd add the option to log to a file instead of an FTP site!

Ceejay

Thanks for the tip! I will look into this. I guess it would be quite easy to modify this plugin. If I can't sort it out, I'll ask Max.

Tom

max.spicer
2005-11-29, 12:14
Hold your horses on that one - I'm planning to add this as a feature in the next couple of days.

Max


Thanks for the tip! I will look into this. I guess it would be quite easy to modify this plugin. If I can't sort it out, I'll ask Max.

Tom

tomsi42
2005-11-29, 12:44
Hold your horses on that one - I'm planning to add this as a feature in the next couple of days.

Max

Good, I will keep my fingers away then ;)

Tom

max.spicer
2005-11-29, 12:55
Done, the new version lets you specify a log file and also disable the ftp part of the plugin. Get it from my website and please let me know how you get on. Could we move the discussion to the topic in the plugins forum though - having two threads confuses me! ;-)

Max


Good, I will keep my fingers away then ;)

Tom

tomsi42
2005-11-29, 13:59
Done, the new version lets you specify a log file and also disable the ftp part of the plugin. Get it from my website and please let me know how you get on. Could we move the discussion to the topic in the plugins forum though - having two threads confuses me! ;-)

Max

Will do. As your plugin does what I wanted, let's wrap up this thread. Will post my results on the plugin thread.

Tom