INTERACT FORUM

Please login or register.

Login with username, password and session length
Advanced search  
Pages: [1]   Go Down

Author Topic: Design: Download Library from Server  (Read 3548 times)

JimH

  • Administrator
  • Citizen of the Universe
  • *****
  • Posts: 72443
  • Where did I put my teeth?
Design: Download Library from Server
« on: November 27, 2023, 03:52:54 pm »

I'd like your help in thinking through how we build a new capability, one that can move a library to a new machine, including files, database and settings.

In the Tools Menu, when you connect to a remote Library Server, there is a "Download from Server" feature.  We may just need to add a "Download Library from Server".

It would move all selected files (or all files) to the connected client.  It would ask whether to include playlists, settings, etc.  These could probably be moved as a backup file.

MC would make an assumption about the default locations, but allow you to change them.
Logged

JimH

  • Administrator
  • Citizen of the Universe
  • *****
  • Posts: 72443
  • Where did I put my teeth?
Re: Design: Library Download
« Reply #1 on: November 27, 2023, 06:02:44 pm »

On the client side, MC would need to unpack the backup file from the server, then compare the backup's locations to the desired locations.  It might be enough to just move the root locations and leave the rest as is.

It needs to check for available disk space and report that to the user.
Logged

JimH

  • Administrator
  • Citizen of the Universe
  • *****
  • Posts: 72443
  • Where did I put my teeth?
Re: Design: Library Download
« Reply #2 on: November 27, 2023, 06:28:28 pm »

If we do this well, it may also serve as a backup mechanism.
Logged

This2ShallPass

  • World Citizen
  • ***
  • Posts: 239
  • "I picked a helluva day to install MC!"
Re: Design: Library Download
« Reply #3 on: November 28, 2023, 02:47:15 pm »

I can see that this would be incredibly powerful. I also think that consideration should be made to include ways to migrate whole libraries to/from JRiver Id devices.
Logged

zybex

  • MC Beta Team
  • Citizen of the Universe
  • *****
  • Posts: 2619
Re: Design: Library Download
« Reply #4 on: November 28, 2023, 03:00:15 pm »

This requires consideration and conversion of fwd/back slashes between different OS, and also perhaps composed/decomposed UTF character encodings when copying to/from MacOS.

One useful derived feature is a simple "offline DB" checkbox, where the local cached DB can work independently from the server for a while (with a big red label saying "OFFLINE MODE" somewhere). The issue here is how to synchronize DB changes when the client comes back online and reconnects to the server - one way is to just make it read-only and drop any changes that were made on the client, perhaps with a warning. Or, attempt to sync and detect conflicts.
Logged

JimH

  • Administrator
  • Citizen of the Universe
  • *****
  • Posts: 72443
  • Where did I put my teeth?
Re: Design: Library Download
« Reply #5 on: November 28, 2023, 03:04:00 pm »

I can see that this would be incredibly powerful. I also think that consideration should be made to include ways to migrate whole libraries to/from JRiver Id devices.
The method I'm thinking about would work on anything that could run MC.  That includes the Id.
Logged

Matt

  • Administrator
  • Citizen of the Universe
  • *****
  • Posts: 42376
  • Shoes gone again!
Re: Design: Library Download
« Reply #6 on: November 30, 2023, 09:42:40 am »

We're starting to frame something up.

We added a new menu command "Download Library From Library Server".

When you run it, it asks where to put the new library and whether you want all files or only music files.

Then it starts a download of all the files and eventually everything will be moved copied.

It uses the paths you set in Options for where to put the downloads (just like the existing download feature).
Logged
Matt Ashland, JRiver Media Center

MGD_King

  • Regular Member
  • Citizen of the Universe
  • *****
  • Posts: 548
  • It's not easy being me, but it sure is fun!
Re: Design: Library Download
« Reply #7 on: November 30, 2023, 12:25:29 pm »

Can I play Devil's Advocate for a minute? Let's say I have all of my files on a drive on the Library Server, and those files total 5TB. If I fire up MC on a different machine that has a smaller drive (laptop, for example), I won't be able to copy the files down to the local machine. How will this feature handle that? Will it fill the drive up till it errors or check drive for space first?
Logged

zybex

  • MC Beta Team
  • Citizen of the Universe
  • *****
  • Posts: 2619
Re: Design: Library Download
« Reply #8 on: November 30, 2023, 12:46:55 pm »

It would work best to add an option to download just a playlist.

Or better, to cache a playlist locally on a client machine so that MC can play it without any contact with the server/NAS - this would require the "offline mode" I mentioned above. Right-click on the playlist, select "add to local cache", then take the laptop anywhere and play it. A view could be added to display/manage all cached files.
Logged

Matt

  • Administrator
  • Citizen of the Universe
  • *****
  • Posts: 42376
  • Shoes gone again!
Re: Design: Library Download
« Reply #9 on: November 30, 2023, 12:59:35 pm »

Can I play Devil's Advocate for a minute? Let's say I have all of my files on a drive on the Library Server, and those files total 5TB. If I fire up MC on a different machine that has a smaller drive (laptop, for example), I won't be able to copy the files down to the local machine. How will this feature handle that? Will it fill the drive up till it errors or check drive for space first?

We're adding disk space checking.  It won't continue if there's not enough space.
Logged
Matt Ashland, JRiver Media Center

Awesome Donkey

  • Administrator
  • Citizen of the Universe
  • *****
  • Posts: 7810
  • Autumn shade...
Re: Design: Library Download
« Reply #10 on: November 30, 2023, 01:06:50 pm »

Seems to me that kind of thing could also be plugged into the Rename, Move & Copy Files tool too which could be useful when migrating from one computer to a new one (and you're not using an external drive or anything like that).
Logged
I don't work for JRiver... I help keep the forums safe from "male enhancements" and other sources of sketchy pharmaceuticals.

Windows 11 24H2 Update 64-bit + Ubuntu 24.10 Oracular Oriole 64-bit | Windows 11 24H2 Update 64-bit (Intel N305 Fanless NUC 16GB RAM/500GB M.2 NVMe SSD)
JRiver Media Center 33 (Windows + Linux) | iFi ZEN DAC 3 | JBL 306P MkII Studio Monitors | Audio-Technica ATH-M50x Headphones

JimH

  • Administrator
  • Citizen of the Universe
  • *****
  • Posts: 72443
  • Where did I put my teeth?
Re: Design: Library Download
« Reply #11 on: November 30, 2023, 01:16:03 pm »

We're adding disk space checking.  It won't continue if there's not enough space.
We could also let a user uncheck a media type, so that they could do only music or music and images.
Logged

mattkhan

  • MC Beta Team
  • Citizen of the Universe
  • *****
  • Posts: 4231
Re: Design: Library Download
« Reply #12 on: November 30, 2023, 02:20:05 pm »

I don't really get the point of this feature, who is it for?
Logged

JimH

  • Administrator
  • Citizen of the Universe
  • *****
  • Posts: 72443
  • Where did I put my teeth?
Re: Design: Library Download
« Reply #13 on: November 30, 2023, 04:23:15 pm »

I don't really get the point of this feature, who is it for?
Me for one.  I have a notebook I travel with.  I'd like to have a duplicate of my library.  It would also provide a good backup.

The other use case is a user who has everything on one computer and buys a new one.  "How do I move my files?"  The current answer is complex and users often get it wrong.

Say I buy a new notebook.  I can easily clone my library.

Yes, there are other ways.
Logged

mattkhan

  • MC Beta Team
  • Citizen of the Universe
  • *****
  • Posts: 4231
Re: Design: Library Download
« Reply #14 on: December 01, 2023, 02:36:23 am »

So it's an extension of handheld sync then? I recall the UI around that has problems as well as bugs involving paths and file names so seems like you could kill 2 birds with 1 stone if you combine them into 1 feature with different options as to what gets synced and how
Logged

Dawgincontrol

  • MC Beta Team
  • Citizen of the Universe
  • *****
  • Posts: 679
  • We have met the enemy and he is us.
Re: Design: Library Download
« Reply #15 on: December 01, 2023, 08:50:37 am »

Think mattkahn is on the right path.
Logged

JimH

  • Administrator
  • Citizen of the Universe
  • *****
  • Posts: 72443
  • Where did I put my teeth?
Re: Design: Library Download
« Reply #16 on: December 01, 2023, 08:57:30 am »

I've used handheld sync without problems.  Please start a thread.

The features are different and would be confusing to combine, in my opinion.   Handheld sync is well defined and documented.  It loads a connected device by playlist.  Download from Server acquires the entire library from the server, and includes settings.

Yes, you could probably combine them, but no, it's not a good idea.  You would have too many cases to handle and explain.
Logged

zybex

  • MC Beta Team
  • Citizen of the Universe
  • *****
  • Posts: 2619
Re: Design: Library Download
« Reply #17 on: December 01, 2023, 09:07:51 am »

Not much different from restoring a backup, but also copying the actual media files?
Logged

JimH

  • Administrator
  • Citizen of the Universe
  • *****
  • Posts: 72443
  • Where did I put my teeth?
Re: Design: Library Download
« Reply #18 on: December 01, 2023, 09:14:26 am »

Restoring a backup, converting it for the OS, allowing location changes, and selection of media.

And the media files.

Connect to Library Server on the old machine, run the transfer to the new machine.
Logged

mattkhan

  • MC Beta Team
  • Citizen of the Universe
  • *****
  • Posts: 4231
Re: Design: Library Download
« Reply #19 on: December 01, 2023, 09:39:09 am »

I created a thread on handheld sync years ago whenever I tried to use it, I don't remember details but not going to raise another one now (because I don't use it)

I hope that dealing with path conversion means we might finally get cross platform libraries available to all, been asked for so many times now :)
Logged

dtc

  • MC Beta Team
  • Citizen of the Universe
  • *****
  • Posts: 3119
Re: Design: Library Download
« Reply #20 on: December 01, 2023, 12:18:26 pm »

Does this simply create a new library or does it also move the associated media files? Maybe both options should be available.  It the media files are on a NAS then the media files may not need to be moved, but if those files are on attached storage then there should be an option to move the media files also.
Logged

marko

  • MC Beta Team
  • Citizen of the Universe
  • *****
  • Posts: 9140
Re: Design: Library Download
« Reply #21 on: December 01, 2023, 01:11:05 pm »

We're starting to frame something up.
<snip>
Then it starts a download of all the files and eventually everything will be moved.
<snip>
Moved, or copied?

JimH

  • Administrator
  • Citizen of the Universe
  • *****
  • Posts: 72443
  • Where did I put my teeth?
Re: Design: Library Download
« Reply #22 on: December 01, 2023, 01:22:59 pm »

Copied.
Logged

JimH

  • Administrator
  • Citizen of the Universe
  • *****
  • Posts: 72443
  • Where did I put my teeth?
Re: Design: Library Download
« Reply #23 on: December 01, 2023, 01:26:02 pm »

Does this simply create a new library or does it also move the associated media files?
In this edition, it will create a new library and copy the media files.
Logged

whoareyou

  • Galactic Citizen
  • ****
  • Posts: 438
Re: Design: Download Library from Server
« Reply #24 on: December 01, 2023, 09:18:57 pm »

Will it work with sidecar files?
Logged

JimH

  • Administrator
  • Citizen of the Universe
  • *****
  • Posts: 72443
  • Where did I put my teeth?
Re: Design: Download Library from Server
« Reply #25 on: December 01, 2023, 10:21:03 pm »

Yes
Logged

marko

  • MC Beta Team
  • Citizen of the Universe
  • *****
  • Posts: 9140
Re: Design: Download Library from Server
« Reply #26 on: December 01, 2023, 11:46:48 pm »

We're adding disk space checking.  It won't continue if there's not enough space.
If you know that space is limited, and know which subset of files you want to copy, the ability to "Set rules for file copy" could be seriously useful, if not essential?

High-End

  • World Citizen
  • ***
  • Posts: 143
Re: Design: Library Download
« Reply #27 on: December 02, 2023, 12:09:47 am »

...
One useful derived feature is a simple "offline DB" checkbox, where the local cached DB can work independently from the server for a while (with a big red label saying "OFFLINE MODE" somewhere). ...
Should it really be that an obvious and long-held wish could be fulfilled in this way: Offline DB for the remote
sometimes I am surfing the net and some possible new music came across.
because my music server was not up and running ( or not available, offline, what ever) to check if I did not already have the CD I had to let pass the opportunity ( had to park the cd's in the shopping cart, what ever).
That is the reason why I am asking to implement the possibilities for a offline DB on the remote.

That would be a nice twist...
Logged

JimH

  • Administrator
  • Citizen of the Universe
  • *****
  • Posts: 72443
  • Where did I put my teeth?
Re: Design: Download Library from Server
« Reply #28 on: December 02, 2023, 07:15:54 am »

If you know that space is limited, and know which subset of files you want to copy, the ability to "Set rules for file copy" could be seriously useful, if not essential?
Yes, we will do that.  It may not be fine-grained in the beginning.  Audio only, for example, or all images.
Logged
Pages: [1]   Go Up