Old 14th December 2004, 14:29   #1
shaneh
Major Dude
 
Join Date: Jan 2004
Location: Brisbane, Australia
Posts: 1,193
Play tracking replacement

A replacement for the current tracking done by the media library. It allows you to set the % of song to be played before being counted as a playcount and last played stat.

It is important that you disable the

Media Library Prefs->Media History->"Recently Played"


option, otherwise you will get double playcounts. You can leave the "Recent Items" option enabled if you want.

There are probably some issues with short songs and skipping quickly etc. Songs less than 5 or 6 seconds in length simply get counted regardless of how long they are played.

You may need to rename it to make sure it is loaded *after* the media library plugin. Try your luck with it.
Attached Files
File Type: zip playtrack.zip (3.5 KB, 1963 views)
shaneh is offline   Reply With Quote
Old 14th December 2004, 19:02   #2
d3x7r0
Senior Member
 
d3x7r0's Avatar
 
Join Date: Jun 2004
Location: Lisbon, Portugal
Posts: 380
Send a message via Skype™ to d3x7r0
looks nice

EDIT: Working nice two

btw couldnd't you sort the issue for most people by naming the file gen_mlpcfix.dll ???

I think it makes sense and sorts the problem

NOTE: I am Dextro!
d3x7r0 is offline   Reply With Quote
Old 15th December 2004, 00:08   #3
shaneh
Major Dude
 
Join Date: Jan 2004
Location: Brisbane, Australia
Posts: 1,193
Quote:
btw couldnd't you sort the issue for most people by naming the file gen_mlpcfix.dll ???
mlp.. comes after ml. in the same way pc comes after ml, so theres no difference. If you were to rename it back to gen_pcfix you will probably see that it still works.

I think renaming a file rewrites its index in the filetable or whatever. Or modifies its access date or something. Either way, winamp loads plugins alphabetically normally, but seems to do it a bit different if a plugin is just copied into the directory. *shrugs*.
shaneh is offline   Reply With Quote
Old 15th December 2004, 06:01   #4
Joonas
Forum King
 
Join Date: Mar 2004
Location: Sweden
Posts: 2,263
Quote:
Originally posted by shaneh
mlp.. comes after ml. in the same way pc comes after ml, so theres no difference. If you were to rename it back to gen_pcfix you will probably see that it still works.

I think renaming a file rewrites its index in the filetable or whatever. Or modifies its access date or something. Either way, winamp loads plugins alphabetically normally, but seems to do it a bit different if a plugin is just copied into the directory. *shrugs*.
Exactly, real strange. Also the Nullsoft guys should really do something about this (letting us decide the load order) when (if?) they ever get around doing any more coding

/Joonas
Joonas is offline   Reply With Quote
Old 15th December 2004, 06:21   #5
shaneh
Major Dude
 
Join Date: Jan 2004
Location: Brisbane, Australia
Posts: 1,193
Ideally plugins should be coded in such a way that it shouldnt matter. In this case the gen_ml plugin doesnt chain the IPC_PLAYING_FILE ipc which is used for play tracking, so this plugin must install its wndproc afterwards. If gen_ml did pass on the message, it wouldnt be a problem.

Id suspect winamp is just using FindNextFile type calls for loading the plugins. The order that is returned is based on the file tables etc, and is not necessarily alphabetical AFAIK.

You can always use custom IPCs to test for if the plugin is loaded or timers etc. The trouble is, that can cause deadlock conditions.

Being able to choose the order of plugins loaded would be good for things like requring gen_ff and gen_hotkeys be loaded first. You could write a plugin which loads the other plugins in whatever order you want I guess. It just needs to call init(), config() etc. There was a plugin that actually did that AFAIK. But you cant rely on it being installed, nor expect people to install it just to get your plugin to work, when all thats really required is a file rename.
shaneh is offline   Reply With Quote
Old 15th December 2004, 08:36   #6
electricmime
Major Dude
 
Join Date: Mar 2004
Posts: 991
can you also include the abilitie to define time.. so i can say make it '30 seconds' and then also add a check box saying 'if song is less than time, add when completed' or something..

edit: does this wait until it has played 20 percent.. or til it gets to 20 percent.. if i drag it, will it be playcounted.. perhaps that could also be an option.. and also maybe a key to hit while dragging to temporarily disable it if you just want to preview the song without adjusting its playcount

There is no reset button on life... but the graphics kick ass
electricmime is offline   Reply With Quote
Old 15th December 2004, 09:20   #7
shaneh
Major Dude
 
Join Date: Jan 2004
Location: Brisbane, Australia
Posts: 1,193
The way it works is basically:

When a file starts to play, calculate x% of the length of the song and set a timer for that time.

When the time is up, check if the same song is still playing, and if winamp is in the playing state. If so, record the playcount etc.

Obviously if you start playing another song during that time it cancels the timers and sets a new one. If a song starts to play that is less than 6 seconds, it records the playcount regardless.


This means, if you pause the song, or skip parts etc its irrelevant, as long as the same song is playing when that time is up. This is a robust and simple way to do it. I dont code hacks involving checking every split second that the song is still playing etc, or looking for "next song", "previous song" button presses, unreliable at best.

Given that the worst that can happen is the song is given a playcount when it shouldnt, I figured the most elegant solution is best.

I will add back in the ability to set a time as well as a %. And it will use the either the time or %, whichever is least per song.

Determining when a song is "completed" is kinda difficult given winamp's API. Thus the max being 90%. If it was 100%, there would be a race condition between firing the timer and checking the same song is playing etc.
shaneh is offline   Reply With Quote
Old 12th February 2005, 12:42   #8
Lysias
Junior Member
 
Join Date: Aug 2004
Posts: 5
Possible bug

Apparently the plugin doesn't increase playcounts or update the "Played last" fields of those files that haven't been played before. Other than that, the plugin has worked well

- Using Winamp 5.08d with quite many plugins on Win 98SE
- The option "Enable 'Recently Played' view..." is disabled
Lysias is offline   Reply With Quote
Old 12th February 2005, 12:50   #9
shaneh
Major Dude
 
Join Date: Jan 2004
Location: Brisbane, Australia
Posts: 1,193
Hmm, yeah I think I encountered that too. Theres quite a few little bugs I need to fix in this plugin. Its next on my todo list once I finish the next beta for Toaster.

Winamp also reports the incorrect length for some files. I have files that start off at 22:00, then by about half-way through the song, the remaining time is down to 3:00 or so. It basically counts down/up at an accelerated speed to eventullay catch up to the real time/length.

Working around this will be very difficult, as winamp isnt able to report the actual length until the song is basically over. The only way around this is to just rack up a count after a fixed time, say 1 minute.

This would cause a problem for files that report a length of more than 1 minute, but then actually finish before that 1 minute is up. The song would not be accounted for.

This is a known problem with winamp, and something Id like to work out a fix for.
shaneh is offline   Reply With Quote
Old 24th May 2005, 08:23   #10
Lysias
Junior Member
 
Join Date: Aug 2004
Posts: 5
New version?

Sorry to dig up this old thread, but have you, shaneh, had the time to work on the new version?
Lysias is offline   Reply With Quote
Old 24th May 2005, 09:19   #11
shaneh
Major Dude
 
Join Date: Jan 2004
Location: Brisbane, Australia
Posts: 1,193
sorry, its been put on the queue. Id like to do some work on it, as its currently quite broken and basically unsuable, and I would like to use it myself.

Possibly this weekend sometime.. but who knows...

Due to the problems outlined above, theres no 100% working solution so theres always going to be bugs.
shaneh is offline   Reply With Quote
Old 24th May 2005, 11:02   #12
Lysias
Junior Member
 
Join Date: Aug 2004
Posts: 5
Ok, good to hear you haven't forgotten this plugin. Looking forward to the new version.
Lysias is offline   Reply With Quote
Old 5th July 2005, 12:41   #13
shaneh
Major Dude
 
Join Date: Jan 2004
Location: Brisbane, Australia
Posts: 1,193
Fixed a few bugs and added an option to increase the playcount after a set number of seconds. (will use whatever comes first).

http://www.myplugins.info/misc_plugins.php
shaneh is offline   Reply With Quote
Old 5th July 2005, 17:00   #14
Lion12
Senior Member
 
Lion12's Avatar
 
Join Date: Nov 2004
Location: Germany Markings: The Cheshire Cat
Posts: 168
Thank you, shaneh!

Messed around with the new version and it seems like the bugs mentioned above seem to be gone.

The second or percent is very favorable in use. But maybe there should be a hint in preferences dialog to clarify that this is an OR option. If I missed your post I likely wondered about choosing one of this options.

A checkbox to disable your plugin without deleating or renaming the file would be very nice too.

About the double counting when media library option is enabled:
Is there any chance to remind me in some way to disable this. When Im re-enabling plugin for example... or automatically anywise...
A hint in the configuration dialog is necessary in any case.

Otherwise <3

No, I'm not Lion King - neither related by marriage!
bookmarks: Joonas | DrO | shane.h
discussion bookmarks: DL | AL | JTFE | TRAP | Toaster | AWA | SUI | MlTree
Lion12 is offline   Reply With Quote
Old 10th July 2005, 06:02   #15
shaneh
Major Dude
 
Join Date: Jan 2004
Location: Brisbane, Australia
Posts: 1,193
double post
shaneh is offline   Reply With Quote
Old 10th July 2005, 06:03   #16
shaneh
Major Dude
 
Join Date: Jan 2004
Location: Brisbane, Australia
Posts: 1,193
Updated to v0.4 with some minor fixes. Also has the option to show the notifier when the playcount inc kicks in. Which is useful to see that the playcount is actually working properly :P
shaneh is offline   Reply With Quote
Old 24th December 2006, 14:53   #17
hesave
Junior Member
 
Join Date: Dec 2006
Posts: 1
Hi. Your plugin is great and thanks for writing it. I got very used to it but then since around winamp 5.22, it crashes winamp when trying to update some songs. I'm not sure what it is about those songs that causes the problem, but it happens everytime.

I was wondering whether this is a known issue, or something I should look into on my computer.

Thanks
hesave is offline   Reply With Quote
Old 29th December 2006, 20:50   #18
Dangrolgod
Junior Member
 
Join Date: Dec 2006
Posts: 1
Hi! Experiencing the same problem with hesave: I 've isolated some files which are correctly changed when using either the manual playcount adjust plug-in or the delayed playcount increase plug-in, and some other titles which crash Winamp when I try to modify them with any of the two. I can't find a pattern in either set and I don't know where I should look. Any ideas?

Thanks in advance!
Dangrolgod is offline   Reply With Quote
Old 31st December 2006, 03:43   #19
zer089
Junior Member
 
Join Date: Dec 2006
Location: Victoria, BC, Canada
Posts: 2
Send a message via ICQ to zer089
crash issue

I'm running winamp 5.32, and attemping to run the latest Playcount tracking replacement (v0.4) from www.myplugins.info, with no luck so far. I used to use the plugin in older versions of winamp, and it worked fine.

What seems to be happening is, winamp crashes at the moment where I would expect the playcount to increase. I try playing with the variables to activate it sooner in the song, but I haven't had any luck. This plugin is very useful to me, so it is very frustrating. I was wondering if anyone has any pointers for me to stop winamp from crashing?
I have already tried renaming the plugin to several different names as it says in the forum here, with still no luck. Hopefully I can fix this or someone can point me to a plugin that can do the same job for me. Thanks a lot
zer089 is offline   Reply With Quote
Old 1st January 2007, 06:22   #20
shaneh
Major Dude
 
Join Date: Jan 2004
Location: Brisbane, Australia
Posts: 1,193
I've updated it to v0.5 with a minor fix, it seems to work ok for me, although I didnt test v0.4. Be sure to disable the

'Enable Recently-Played View in Media Library'

from the 'Local Media' options in the Media Library options.

I suspect the bug is due to a problem with the way I was updating meta data. It probably works for some and not others depending on the meta data/order of data/size of meta data etc.
shaneh is offline   Reply With Quote
Old 1st January 2007, 10:19   #21
shaneh
Major Dude
 
Join Date: Jan 2004
Location: Brisbane, Australia
Posts: 1,193
Update: Ive just noticed the crash now, which still exists in the updated version. I will fix the problem when I can.


EDIT: Ive fixed the problem now in v0.6. I'll probably have to update a few plugins as a result. Ive been doing the ML updates a bit wrong.

Last edited by shaneh; 1st January 2007 at 10:57.
shaneh is offline   Reply With Quote
Old 2nd January 2007, 07:07   #22
zer089
Junior Member
 
Join Date: Dec 2006
Location: Victoria, BC, Canada
Posts: 2
Send a message via ICQ to zer089
thank you VERY much. I was actually not expecting someone to help me. thanks a lot it works great now
zer089 is offline   Reply With Quote
Old 27th February 2007, 11:20   #23
eturfboer
Junior Member
 
Join Date: May 2004
Posts: 21
Re: Play tracking replacement

Quote:
Originally posted by shaneh
It is important that you disable the

Media Library Prefs->Media History->"Recently Played"


option, otherwise you will get double playcounts. You can leave the "Recent Items" option enabled if you want.
When I disable the history item, winamp 5.32 is still counting the play counts. Am I doing something wrong or is it just me who is confused?

Many thanks.
eturfboer is offline   Reply With Quote
Old 27th February 2007, 21:50   #24
shaneh
Major Dude
 
Join Date: Jan 2004
Location: Brisbane, Australia
Posts: 1,193
So are you getting double playcounts then? Are they still counted with this plugin removed?

Obviously the idea of this plugin is to actually 'count the playcounts', so you will still get counts, but only after a specified lapse in time.
shaneh is offline   Reply With Quote
Old 28th February 2007, 07:36   #25
eturfboer
Junior Member
 
Join Date: May 2004
Posts: 21
Well, let me then explain the situation. I loaded the plugin, nothing seemed to happen (playcounts were still at the beginning counted for). The I removed the plugin and disabled the history (so there should be no playcount at all; no plugin; no winamp count). But the playcount was still increased.
eturfboer is offline   Reply With Quote
Old 28th February 2007, 10:21   #26
shaneh
Major Dude
 
Join Date: Jan 2004
Location: Brisbane, Australia
Posts: 1,193
Hmm... actually that documentation seems to be wrong or out of date. You should untick:

Media Library -> Local Media -> Recently Played -> Enable 'Recently Played' view in Media Library.

I think the preferences may have been changed around a bit. But on www.myplugins.info I have:

Note: You must disable the "Enable 'Recently Played' view in Media Library" option in the ML preferences to avoid getting double counts for your songs.

You can leave the 'Histoy' items enabled. Its just been changed around since older versions.
shaneh is offline   Reply With Quote
Old 3rd March 2007, 09:20   #27
Hayden_54
Member
 
Join Date: Jan 2004
Location: Wellington, NZ
Posts: 65
I'm not sure if this is the right place to post this, but what has happened to the Play count set plugin (part of that sexy plugins pack)?
I've found it really useful in the past, but have found that recently it keeps crashing or has no effect on the playcount. Is there any updated version, or has it been shelved? It would be great if there was a working version of it.
Hayden_54 is offline   Reply With Quote
Old 3rd March 2007, 11:05   #28
shaneh
Major Dude
 
Join Date: Jan 2004
Location: Brisbane, Australia
Posts: 1,193
I haven't bothered to update it as I wrote a more generic meta data and Winamp manipulator in the form of ActiveWinamp. This too will require an update however, to support the new features in Winamp 5.33.
shaneh is offline   Reply With Quote
Old 3rd March 2007, 20:37   #29
Hayden_54
Member
 
Join Date: Jan 2004
Location: Wellington, NZ
Posts: 65
Fair enough. Is there a script that will let you edit the playcount (rather than just decrease by 1)? I find it pretty useful when renaming files and adding them again to the libary with their original playcount/rating.
I would try to make it myself, but the best I can do is making slight variations on ready-made scripts
Hayden_54 is offline   Reply With Quote
Old 3rd March 2007, 21:45   #30
shaneh
Major Dude
 
Join Date: Jan 2004
Location: Brisbane, Australia
Posts: 1,193
Something along these lines would do it:

x = GetSendToItems

If ubound(x) > 0 Then
newcount = InputBox('New playcount val:')

For Each track In x
track.playcount = newcount
Next

End If

quit
shaneh is offline   Reply With Quote
Old 29th September 2007, 22:13   #31
tacashur
Junior Member
 
Join Date: Jun 2004
Posts: 5
with and without this plugin, I have the following problem:

the play counter works, but whenever winamp doesn't shut down properly, the changes to the playcounts are not being saved.

is there a way to make winamp save the playcount, e.g. after every song?
tacashur is offline   Reply With Quote
Old 18th November 2008, 15:30   #32
arkiforce
Junior Member
 
Join Date: Oct 2008
Posts: 4
Is this plugin still supposed to work with version 5.54? coz I can't get it to work somehow.
arkiforce is offline   Reply With Quote
Old 18th November 2008, 18:57   #33
DrO
 
Join Date: Sep 2003
Posts: 27,880
there seems to be mixed comments from people as to it working or not working. then again it looks like we might be seeing it natively implemented in winamp going on this

-daz
DrO is offline   Reply With Quote
Old 6th January 2009, 08:36   #34
arkiforce
Junior Member
 
Join Date: Oct 2008
Posts: 4
It seems great but when will it be added?
arkiforce is offline   Reply With Quote
Old 29th January 2009, 23:23   #35
DrO
 
Join Date: Sep 2003
Posts: 27,880
it will be in 5.55 (has not been currently available in 5.55 Beta1 or Beta2)

-daz
DrO is offline   Reply With Quote
Reply
Go Back   Winamp & SHOUTcast Forums > Developer Center > Winamp Development

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump