Skip to main content

Notice

Please note that most of the software linked on this forum is likely to be safe to use. If you are unsure, feel free to ask in the relevant topics, or send a private message to an administrator or moderator. To help curb the problems of false positives, or in the event that you do find actual malware, you can contribute through the article linked here.
Topic: Playback Statistics component (Read 204092 times) previous topic - next topic
0 Members and 1 Guest are viewing this topic.

Playback Statistics component

Reply #275
hmm, searched A LOT, but couldn´t find the correct syntax of command line for Playback Statistics rating (it works up to level 'Playback Statistics/Reset Statistics', but not after rating). I even tried hidden space-symbols. Can anybody help?

And, yes I searched the wiki Commandline Guide and all related stuff like the "Commandline Problems" link there, but no help, maybe I oversaw something...

Playback Statistics component

Reply #276
I can't make it either, but can be done with run_cmd:

foobar2000.exe /runcmd-playlist="Playback Statistics/Rating/1"

Playback Statistics component

Reply #277
I can't make it either, but can be done with run_cmd:

foobar2000.exe /runcmd-playlist="Playback Statistics/Rating/1"


Thanks a lot, works!

Strange, the wiki is totally misleading at this point. I think it should be deleted, cause it causes more sorrow than help here. Or at least to add some note, where it doesn´t work as described.

Playback Statistics component

Reply #278
Is there anyway to automatically add %play_count% to files that hasn't played yet?
I forgot to backup my playback statistics and now I can't use %play_count% MISSING cos my whole library isn't played yet. Any workarounds on this?

Playback Statistics component

Reply #279
For what purpose, to see new songs you haven't played yet? Maybe add something like "[font= "Courier New"]... AND %added% DURING LAST WEEK[/font]" to the query, so that only recently added items will be shown.
Full-quoting makes you scroll past the same junk over and over.

Playback Statistics component

Reply #280
Would it be too much to ask to extend this plugin to custom database tags?
As a stable replacement for foo_customdb.
Sort of a comeback of foo_custominfo.

Playback Statistics component

Reply #281
My impression is that further development of this component, if any, will be rather towards using some metadata-based association scheme instead of simple file path, which would solve several current problems (lost play counts on file moves, separate counts for same song on different albums, or in PC/portable library, etc.), but which wouldn't be as ideal for general use, per-file tags.
Full-quoting makes you scroll past the same junk over and over.

Playback Statistics component

Reply #282
I tried this query pattern
Code: [Select]
%playcount% MISSING AND %added% DURING LAST WEEK

but it doesn't work. It shows all files on the library. I am using portable foobar2000 by the way

Playback Statistics component

Reply #283
it's "%play_count%", not %playcount%

Playback Statistics component

Reply #284
Oh, that's why. Thanks!
One last thing, is this query correct?
Code: [Select]
%added% DURING LAST 1 DAY SORT DESCENDING BY %added%

Playback Statistics component

Reply #285
My impression is that further development of this component, if any, will be rather towards using some metadata-based association scheme instead of simple file path, which would solve several current problems (lost play counts on file moves, separate counts for same song on different albums, or in PC/portable library, etc.), but which wouldn't be as ideal for general use, per-file tags.


That would be pretty amazing. Hex editing the dat file to increase the playcount every time you move a file outside of foobar2000 can be a bit tedious. 


Playback Statistics component

Reply #287
My impression is that further development of this component, if any, will be rather towards using some metadata-based association scheme instead of simple file path, which would solve several current problems ...


But wouldn't also on the other side new problems be created? What if you are changing your metadata (let's say title because of wrong spelling and so on)?

Playback Statistics component

Reply #288
Hi, I just re-ripped a CD because it wasn't quite gapless (I ripped it ages ago with itunes), and it lost the play counts, even though the files have the exact same filenames, and playback stats were kept in the db not file tags. I don't mind too much as last.fm is where my more accurate playback stats are kept, but I thought it would be good if it kept them in cases like that. Is there any way to get them back? I know there's a wsh script somewhere, I might try that.

Playback Statistics component

Reply #289
This component seems to run into difficulties with Foobar 1.0's new feature for relative library paths.

Playback Statistics component

Reply #290
This component seems to run into difficulties with Foobar 1.0's new feature for relative library paths.

What is that feature for relative path? i dont see it in the changelog



Playback Statistics component

Reply #293
Hi

I am on foobar only since a few weeks and discovered this plugin lately.

Would it be possible to send these ratings to musicbrainz?

To simplify things only track ratings and sending and getting ratings for only one track would be enough for a start, would make me, maybe others? very happy.

I tried an ugly workaround already myself by writing a small console app, which should be run by foo_run, submits the ratings and sets the rating in foobar back via foo_runcommand.
But since $if(%musicbrainz_trackid%,true,false) always returns false here even if this tag is within the file my approach won't work, even if it was already a very ugly and hacky one.
I thought whether I should post my request here, since it is THE rating plugin for foobar or in one of the two last.fm plugins, because these are already dealing with accounts and/or webservices so it wouldn't be a big deal for them to implement it, because the webservices seems to be working very similar.

Nevertheless I came to the conclusion that it would fit perfectly into this plugin, since all rating tasks are already properly implemented here which would be redundant if this feature should be a standalone plugin.

I also tried myself to dig into plugin writing but gave up, since it would require too much time for me to dig into c++ and foobar sdk.
I am only able to write very basic code in csharp, so I provide you the code here, which is working like a charme in my console application:
If you are interested in, here are more infos about the webservice options regarding ratings: http://musicbrainz.org/doc/XML_Web_Service#ratings_resources
Like said above, to make it simple, submitting ratings  when setting them to 1 track would be OK for me, and maybe receiving ratings during playback, if no local one is set (or _optional_ always overwrite the local one)

thx so far for this great music player
regards
hanshans
Code: [Select]
    NetworkCredential _networkCredential;
    public MusicBrainzService(string username, string password)
    {
      _networkCredential = new NetworkCredential(username, password);
    }
    public void Post(string entity, string id, string rating)
    {
      Uri address = new Uri("http://musicbrainz.org/ws/1/rating/");

      // Create the web request
      HttpWebRequest request = WebRequest.Create(address) as HttpWebRequest;

      // Add authentication to request
      request.Credentials = _networkCredential;

      // Set type to POST
      request.Method = "POST";
      request.ContentType = "application/x-www-form-urlencoded";

      StringBuilder data = new StringBuilder();
      data.Append("entity=");
      data.Append(entity);
      data.Append("&id=");
      data.Append(id);
      data.Append("&rating=");
      data.Append(rating);

      // Create a byte array of the data we want to send 
      byte[] byteData = UTF8Encoding.UTF8.GetBytes(data.ToString());

      // Set the content length in the request headers 
      request.ContentLength = byteData.Length;

      // Write data 
      using (Stream postStream = request.GetRequestStream())
      {
        postStream.Write(byteData, 0, byteData.Length);
      }

      // Get response 
      using (HttpWebResponse response = request.GetResponse() as HttpWebResponse)
      {
        // Get the response stream 
        StreamReader reader = new StreamReader(response.GetResponseStream());

        // Console application output 
        Console.WriteLine(reader.ReadToEnd());
      }
    }



Playback Statistics component

Reply #296
I don't know if this is the best place to put this question, but I've got a problem using %play_count% in an auto-playlist.

I created my playlist as "%play_count% IS 0 AND %added% DURING LAST 4 WEEKS" which works great. However, when I start playing a song in the auto-playlist, once one minute has elapsed, play_count gets incremented, and the song disappears from the playlist with interesting side effects. Sometimes it seems to play the next song just fine, sometimes it plays the previous song although it seems like it might just start from the actively selected song, because it seemed to skip one in my playlist.

Is there anyway to setup the auto-playlist so that it doesn't remove the currently playing song, or change a setting so that play_count isn't increased until the song is done playing? I don't mind it disappearing from the playlist once the song is over, but the current behavior is crappy.

Playback Statistics component

Reply #297
something like...

%play_count% MISSING OR (%play_count% IS 1 AND %last_played% DURING LAST 10 MINUTES)

??

Playback Statistics component

Reply #298
something like...

%play_count% MISSING OR (%play_count% IS 1 AND %last_played% DURING LAST 10 MINUTES)

??

That seems perfect, but now I'm wondering if "%play_count% MISSING OR (%play_count% IS 1 AND %isplaying%)" is a much simpler and more accurate solution.

Playback Statistics component

Reply #299
i don't think you can use %isplaying% in that context? i might be wrong though...