Author Topic: Sync Links  (Read 20246 times)

boroda

  • Sr. Member
  • ****
  • Posts: 4595
Is a well known issue that you can't get file access to unrooted Android devices via WiFi and hence can't sync MusicBee with Android devices via WiFi. One possible solution is to setup a local PC folder as virtual device in MusicBee, sync MusicBee with that 'device', then you can use 3d party apps (e.g. 'Resilio Sync' (recommended) or 'Cheetah Sync') to sync PC folder with Android folder via WiFi. But this has one disadvantage: all synced files will be duplicated on PC. This plugin may help in this situation. It will create own virtual device 'Sync Links' in MusicBee and will create hard links or symbolic links to original library media files in some folder on syncing. Hard links/symbolic links occupy very little space on HDD (though Windows Explorer will show the sizes of original files, not the actual sizes of links).

SOME NOTES:
  • Hard links can be created only on the same volume as original files, only on NTFS volume.
  • Hard links are definitely supported by any soft used for syncing files with Android.
  • Symbolic links can be created only on NTFS volume, but may point to original files on another volume (with any file system).
  • Symbolic links may or may not be supported by syncing software.

Download

Provide feedback on this topic.
Last Edit: August 15, 2022, 04:19:42 PM by boroda

/lasse

  • Newbie
  • *
  • Posts: 4
I will try it. Had just set up the virtual device stuff and installed Cheetah Sync.
I was forced to use wifi when the USB port on my LG G2 got faulty and only charged.
Cheetah Sync (made by those who make iSyncr) seems to work well, and no need to root.

psychoadept

  • Global Moderator
  • Sr. Member
  • *****
  • Posts: 10691
I personally recommend BitTorrent sync over cheetah sync.  You just have to pay attention and make sure you're setting it to sync over LAN only.  But it's much faster and seems to run better on both systems.
MusicBee Wiki
Use & improve MusicBee's documentation!

Latest beta patch (3.5)
(Unzip and overwrite existing program files)

/lasse

  • Newbie
  • *
  • Posts: 4
Well I have to try the BitTorrent sync to.
Does it sync one-way, two-way and delete and so on?

Didn’t manage to make the mb_SyncLinks work, did install but  when try to sync an “aborted” window came up. And then couldn’t change mb_SyncLinks settings, kind of links to create.
MusicBee 3.0.5995

Is it supposed to make conversions (flac to mp3) on the fly? Or is the only alternative to save converted files?

boroda

  • Sr. Member
  • ****
  • Posts: 4595
Didn’t manage to make the mb_SyncLinks work, did install but  when try to sync an “aborted” window came up. And then couldn’t change mb_SyncLinks settings, kind of links to create.
MusicBee 3.0.5995

3.0.5995 is not supported. try *latest* mb patch.

Is it supposed to make conversions (flac to mp3) on the fly? Or is the only alternative to save converted files?
yes.

musicbee2016

  • Newbie
  • *
  • Posts: 2
Hello,

Thanks for this plugin, it is exactly what I was hoping would exist, unfortunately I'm having issues similar to the user above.

I am able to select "Create hard links" and "Create symbolic links" but neither setting will save. Only "Create links to original files..." or "Copy temp..." will save.

I've tried everything I could think of including directly editing with settings .xml file, but when send a file to the Sync Links device in MusicBee, it will copy the file to the destination, not create a link. The copy is on the same NTFS volume as the source file.
 
I've also tried running MusicBee as admin. I'd love to use this plugin, any help appreciated.

I'm running:

Windows 10 x64
MusicBee 3.0.6132 (also tried 6032)
SyncLink 4.1.6025


musicbee2016

  • Newbie
  • *
  • Posts: 2
You're a champion. Thanks!

New version verified working, I did need to run MusicBee with admin in order for the plugin to be able to create links.

Windows 10 x64
MusicBee 3.0.6132


boroda

  • Sr. Member
  • ****
  • Posts: 4595
I did need to run MusicBee with admin in order for the plugin to be able to create links.
yes, i haven't thought about it.

gaberad

  • Newbie
  • *
  • Posts: 8
I was trying this out and ran into an error (unless there's some setting or something I've missed):

When you sync 'all playlists' or 'selected playlists only' the .mpb playlist file is included in the list of files to be synced, but the part in the code where it tries to set the syncedTrackFilename is trying to use a value that is null, causing it to throw an 'object not set to an instance of an object' exception.






What I did was just filtered out any item that had a null Value[2] (had to add "using System.Linq;").





For the admin/symbolic link issue, you can try to add your user account permission to create symbolic links:
http://superuser.com/questions/124679/how-do-i-create-a-link-in-windows-7-home-premium-as-a-regular-user

It doesn't work for me though, because it looks like if your account is part of the administratos group (which mine is) then it won't work:
http://stackoverflow.com/questions/29063916/win32api-symlink-creation-issue-with-uac-enabled
http://superuser.com/questions/104845/permission-to-make-symbolic-links-in-windows-7

"Note that this setting has no effect on user accounts that belong to the Administrators group. Those users will always have to run mklink in an elevated environment (as Administrator)."


So I did some testing and made it so the plugin creates are list of mklink commands, then runs the list in an elevated command process (which will invoke a UAC prompt). It works for me. I supposed you could also write out the commands to a batch file and run the batch file too.
http://stackoverflow.com/questions/13807429/running-cmd-commands-with-administrator-rights








boroda

  • Sr. Member
  • ****
  • Posts: 4595
@gaberad

WOW! Thanks a LOT. Will modify plugin according to your advices.

boroda

  • Sr. Member
  • ****
  • Posts: 4595

Space Octopus

  • Jr. Member
  • **
  • Posts: 30
  • Teach a Man To Reason, He'll Think For a Lifetime
Doesn't seem to be working for me, even run as admin & with the most current versions of both Musicbee & the plugin.
For some reason it did let me copy over 2 files, then failed with "object reference not set to an instance of an object". That was drag and drop.
When trying to sync through sync settings, it just aborts the sync no matter what I do.
I tried every different selection in the settings. Same result.

Just got this error, too:
Code
MusicBee v3.1.6345.38589 (Win6.1), 5 Jun 2017 12:49:

System.NullReferenceException: Object reference not set to an instance of an object.
   at MusicBee.Media.Storage.#=q5fs6fKGbCbPVIcXzmBHgcdgPORYbSRW1P5FVGK10fTqJrJVT6gGmqX4Yd9SszOyJ(#=qYCOlrFQ5d9XNKhepbbIIpaFQxY6tOq2L0agf_Gr_zHs= #=qP9diMp46GkwqbjFCG7EpJw==, #=qsucckV1WERnrrP$BQTZe88kc5fzVTl8B5jdbSCs5M6M= #=q9TXDktxtLVKZZW2gg5WgpQ==, String #=qR4nBg5zgTXveOdFyV8JZ6w==, Int32 #=qSXL5U2D5_DOSUbIOOJ1f1A==)
   at MusicBee.Media.Storage.#=qO8LTIvn8sxiIlyYrKiaWEw==(#=qYCOlrFQ5d9XNKhepbbIIpaFQxY6tOq2L0agf_Gr_zHs= #=qfrqndb4sEqfIeaidxU7SUw==, Int32 #=qGxBlZfThFJ_NoJjAeXT86qVyBz8lvX2pgrYyuaSmG5Q=)
   at #=q156AcxeJqRZfdwEcnxPXDQAK9CVra7xeAaqUivLVtcg=.#=q1JfSI6qYjrVpl$ZE7ZWIvw==(Boolean #=qM1QHccsiqtA6Rm4dkWXObg==, Boolean #=qHC2PizOYeDTcKwSgmWsi6Q==, Dictionary`2 #=qfJ2uQqRN6O$zm0pKO$RTgwLLAvjpF25hEmrvuuvpAAM=, List`1 #=qy6uRFFEyhg1fIR2NKNl8_wpReHjP2MmKHo1ZF1mACz0=, Object #=q8w97IrUTuAD4v$$bBwrbWR3Yc8F1h1chOQQy6Kv_Vnw=)
   at #=q156AcxeJqRZfdwEcnxPXDQAK9CVra7xeAaqUivLVtcg=.#=qshik6hyIhLlqES_jHcqbrA==(IList`1 #=qBW4QfImybZ8ZLWl04doc3Q==, Object #=qVwYL$lrjc_TMrZs6Fqk5aQdRKJb7EitiYdwOC1bAcrI=)
   at #=q_DkWgVwMw6cfu8QKnVn5vAnW2tlzd$qGQzinCN9X5gY=.#=qI$XEEiFG7AlkAbXI8opAw1iSBYRnIZgnL$MKmm9WsXk=(Object #=qJiJ79fhkxZpJR2p4eeTxyg==)
Last Edit: June 05, 2017, 08:50:39 PM by Space Octopus
Make it so, number one.

Space Octopus

  • Jr. Member
  • **
  • Posts: 30
  • Teach a Man To Reason, He'll Think For a Lifetime
I also sometimes get an aborted window, at the bottom it says "an entry with the same key already exists"
Make it so, number one.

Steven

  • Administrator
  • Sr. Member
  • *****
  • Posts: 34312
try with the latest patch version:
http://musicbee.niblseed.com/V3_1/MusicBee31_Patched.zip
unzip and replace the existing files where MB is installed