IPB

Welcome Guest ( Log In | Register )

> foobar2000 General Forum Rules

This is NOT a tech support forum.
Tech support questions go to foobar2000 Tech Support forum instead.

See also: Hydrogenaudio Terms of Service.

 
Reply to this topicStart new topic
How to share playback statistics/ratings across multiple foobars/compu
MordredKLB
post Aug 16 2012, 02:17
Post #1





Group: Members
Posts: 198
Joined: 1-May 09
From: Austin, TX
Member No.: 69413



Unlike all the other posts, and threads on this topic, I think I've actually solved the problem. I welcome additional testers and feedback though. Also, before you try this, install foo_jesus and make sure it's backing up index-data just so you've got a failsafe incase you do something incredibly bad (like accidentally deleting your playback statistics).

Note: These instructions are for Windows machines. If you have foobar running in an emulator on a Mac, you'll have to figure out how to do this on your own.

You're going to need install and setup a few things on each of the computers that you want to have access to your shared playback statistics on:
1) Dropbox
2) Link Shell Extension - Once this installs make sure you hit OK to restart explorer.exe.
3) You need to be using at least foo_playcount 3 which almost everyone is nowadays, otherwise network shares might not work (since it was tied to file location).

The process:
1) Close foobar. This will save your playback statistics and is very necessary so that you don't lose data.
2) Browse to your dropbox folder and create a folder inside it called foobar2000.
3) Now go to your foobar configuration folder (hold down Shift when you click on the file menu and then select the "Browse Configuration Folder"). Select index-data, and paste a copy in the same directory so that you have a backup. This is for your own safety. Now select the index-data folder again, and cut it.
4) Go back to your dropbox folder and paste the index-data folder inside the foobar2000 folder.
5) Wait for index-data to finish uploading to dropbox and you get the Green checkmark on it.
6) Select the index-data folder and right click. Select the "Pick Link Source" item in the context menu (Link Shell Extension adds this).
7) Go back to your configuration folder and right click in some white space (i.e. not on a filename). You should see the following menu:

Select "Junction" and you should see a new index-data folder which initially has a shortcut icon. Windows won't actually remember to mark the folder as a shortcut in the future, but you can tell by going to the folder's properties where you'll see a new Link Properties tab that shows where the folder is actually located.

At this point if you use foobar it will be writing to the index-data link which is actually stored on dropbox, and can therefore be shared easily.
Now, go to every computer/user account that you want to share playback statistics with, install dropbox and LSE on them and rename the original index-data folder in your configuration and then repeat steps 6 and 7.

Voila, shared playback statistics. Everything appears to be working great here although I've only been playing with it for about the last hour so if there are any issues I might not have encountered them yet.
Go to the top of the page
+Quote Post
MordredKLB
post Aug 16 2012, 02:32
Post #2





Group: Members
Posts: 198
Joined: 1-May 09
From: Austin, TX
Member No.: 69413



That didn't take long, just ran into a serious problem that maybe someone can help me work around:

Data Collision. I don't know exactly how foobar works, but I'm assuming it loads C653739F-14B3-4EF2-819B-A3E2883230AE into memory and then writes it whenever it autosaves (foo_jesus) or you exit foobar. If that is the case then if you have two foobars open at the same time, and play a bunch of files in each, the last foobar to save will be the only one who's changes are reflected. A little testing bears this out and bring up something I didn't realize earlier, since foobar never reloads the data, even if they both autosave after each song played, the playback statistics are never reflected until you restart foobar... so having two foobars open at the same time means that only the playcounts from the last closed one will be reflected.

Anybody have any ideas on how to get around this? Having to always close foobar before starting a new instance on another machine is kind of a heavy burden.
Go to the top of the page
+Quote Post
MordredKLB
post Aug 21 2012, 18:23
Post #3





Group: Members
Posts: 198
Joined: 1-May 09
From: Austin, TX
Member No.: 69413



Just realized that the link I have in the first post for Link Shell Extension is bad (and I can't edit it anymore).

Here's the correct link: Link Shell Extension
Go to the top of the page
+Quote Post
John Doe
post Oct 16 2012, 13:44
Post #4





Group: Members
Posts: 240
Joined: 6-January 04
Member No.: 11006



Hey, I just realised that Hardlinks might be the solution and VOILA someone out there already talks about it.
So your last findings mean, you can only leave one FB open at a time. right? what a pity.

JD
Go to the top of the page
+Quote Post
MordredKLB
post Oct 16 2012, 19:21
Post #5





Group: Members
Posts: 198
Joined: 1-May 09
From: Austin, TX
Member No.: 69413



QUOTE (John Doe @ Oct 16 2012, 07:44) *
Hey, I just realised that Hardlinks might be the solution and VOILA someone out there already talks about it.
So your last findings mean, you can only leave one FB open at a time. right? what a pity.

JD
Yup, that's the only drawback I've found to it, but it is pretty significant. My use case was that I wanted to listen off the same library/playcount from work and home so I wrote some Autoit scripts which close foobar after 30 minutes of inactivity on the work computer (because that's how long it takes me to drive home) or at 7AM at home (which is before I leave for work). With that I don't even have to remember to close foobar.

I'm also able to use port redirecting through Putty to securely connect to my samba shares from a remote location, so I essentially just have one music library now. It's not perfect, but I'd classify it as minimally invasive.
Go to the top of the page
+Quote Post
sonci
post Dec 13 2012, 23:35
Post #6





Group: Members
Posts: 12
Joined: 5-March 09
Member No.: 67641



Hi
Is there any update on this?
I have my Music Library on a NAS, and I`m really hoping for this to work, I tried your way, but I didn`t use Dropbox, just placed index data in a Nas folder,
but every time I start Foobar, it crashes, never use two instances of foobar simultaneously
I think Link Shell extensions may have problems with shared drives,
Go to the top of the page
+Quote Post
MordredKLB
post Dec 14 2012, 01:02
Post #7





Group: Members
Posts: 198
Joined: 1-May 09
From: Austin, TX
Member No.: 69413



QUOTE (sonci @ Dec 13 2012, 17:35) *
Hi
Is there any update on this?
I have my Music Library on a NAS, and I`m really hoping for this to work, I tried your way, but I didn`t use Dropbox, just placed index data in a Nas folder,
but every time I start Foobar, it crashes, never use two instances of foobar simultaneously
I think Link Shell extensions may have problems with shared drives,

Never tried it using a NAS but it works fine with regular shared drives (Samba). Check that the junction folder you dropped in the foobar config folder is writeable from that location... if it isn't then something isn't setup right. If that's the problem it might explain the crashes. I'd double check permissions on your NAS if that's the case.
Go to the top of the page
+Quote Post
sonci
post Dec 14 2012, 22:49
Post #8





Group: Members
Posts: 12
Joined: 5-March 09
Member No.: 67641



anyway I tried Dropbox, it works great,

THANKS
Go to the top of the page
+Quote Post
LifeWOutMilk
post Dec 14 2012, 23:40
Post #9





Group: Members
Posts: 55
Joined: 13-October 12
Member No.: 103827



QUOTE (MordredKLB @ Oct 16 2012, 11:21) *
Yup, that's the only drawback I've found to it, but it is pretty significant. My use case was that I wanted to listen off the same library/playcount from work and home so I wrote some Autoit scripts which close foobar after 30 minutes of inactivity on the work computer (because that's how long it takes me to drive home) or at 7AM at home (which is before I leave for work). With that I don't even have to remember to close foobar.


Would you mind sharing your Autoit scripts? Sounds like a great idea.
Go to the top of the page
+Quote Post
MordredKLB
post Dec 15 2012, 00:16
Post #10





Group: Members
Posts: 198
Joined: 1-May 09
From: Austin, TX
Member No.: 69413



QUOTE (LifeWOutMilk @ Dec 14 2012, 17:40) *
Would you mind sharing your Autoit scripts? Sounds like a great idea.

Of course!

I have two scripts: Close Foobar After Time and Close Foobar Now.

The Close Foobar After Time script works on a sliding time scale because I often have meetings/lunch during the day and I don't want foobar to shutdown then. So before 2PM, my timeout is 100 minutes, before 4PM it's 60 minutes, before 4:30 it's 35 minutes, and after that time it's 25 minutes. You can easily rip that out and make it always shut down after 25 minutes though. The code is REALLY straight forward. I created a Task Scheduler task which runs the script when I log on. The script never stops running (or shouldn't!) so you'll have to make sure and uncheck the "Stop the task if it runs longer than 3 days" option.

The Close Foobar Now script finds foobar under the logged on user (and only that user!) and terminates it instantly. I set this script up in Task Scheduler to run every morning at 7AM. No other special options.
Go to the top of the page
+Quote Post
LifeWOutMilk
post Dec 15 2012, 03:52
Post #11





Group: Members
Posts: 55
Joined: 13-October 12
Member No.: 103827



Thanks.
Go to the top of the page
+Quote Post

Reply to this topicStart new topic
1 User(s) are reading this topic (1 Guests and 0 Anonymous Users)
0 Members:

 



RSS Lo-Fi Version Time is now: 28th November 2014 - 13:45