samurro,
@samurro@fosstodon.org avatar

Any powerusers here? I am looking for a solution how to sync only specific party of my local library to my mobile device without creating a parallel file structure, aka having all those files two times on my local disk. Any suggestions?

benjaminhollon,
@benjaminhollon@fosstodon.org avatar

@samurro

I wonder, it might be possible to use ignore patterns (Device => Edit => Ignore Patterns on the web interface—no idea on mobile) on the phone's side to avoid syncing certain folders. Of course, if you're not planning to sync to anywhere other than your phone with different folders, you could also do it on both ends, which I know works.

Worth a shot.

proactiveservices, (edited )
@proactiveservices@fosstodon.org avatar

@samurro
Edit: to fix glaring errors
Take a backup of your music library, then...
Add the target music folder on the mobile's syncthing as "Receive Only" type and set the Ignore Patterns to:

!Artist 1
!Artist 2/Album 3
!Artist 3
*

These ignore patterns say "don't ignore these folders", then "ignore everything else". To change the contents later, add/edit the ignore patterns.

samurro,
@samurro@fosstodon.org avatar

@proactiveservices Actually not a bad idea, it would require updating the ignore file everytime I add something. But I would "solve" my issue like this. Thanks! I will check that out

samurro,
@samurro@fosstodon.org avatar

@proactiveservices Hey I still didn't made the change, but now checked again your suggestion and just understood, that basically I control what is written on mobile device only through the ignore patterns.
But how do I edit those ignore patterns for device, seems pretty tedious esp. with requiring some kind of for that...?

proactiveservices,
@proactiveservices@fosstodon.org avatar

@samurro You can edit them using an include file for your ignores, which is then synced to other devices.

Create a file named .stignore-global
Add the ignore patterns into this just as you would a .stignore file.
Ensure it's synced to the mobile.

Change the mobile's syncthing .stignore to this one line:
.stignore-global

proactiveservices,
@proactiveservices@fosstodon.org avatar

@samurro
You can then edit the .stignore-global file on any connected device. Once it syncs to the mobile, changes in the ignore file will be processed.

(it can be any file name, but I use this to keep syncthing's naming scheme and it's descriptive).

samurro,
@samurro@fosstodon.org avatar

@proactiveservices Okay this is next level, I will try it out on the weekend. Thank you very much! mcgyver :D

samurro,
@samurro@fosstodon.org avatar

@proactiveservices I am struggling with this one. How do I make sure the .stignore-global gets synced? If I set my "music share" with ignore pattern
*
!.stignore-global
It still seems to scan the whole library before syncing the file? What am I doing wrong?

samurro,
@samurro@fosstodon.org avatar

@proactiveservices Or maybe I found my mistake? The .stignore-global files doesn't have to be in the to be synced folder? Does it just have to be anywhere on the target device and be synced through syncthing?

proactiveservices,
@proactiveservices@fosstodon.org avatar

@samurro When using a file, it is just a "normal file" for all purposes. So you're right that it has to be included back in via !.stignore-global, apologies for forgetting that.

There's some more info in the docs, search the https://docs.syncthing.net/users/ignoring.html page for "".

It doesn't have to be synced by syncthing. I am not sure if the file must be in the synced folder, you could set up a new folder share just to test this out.

proactiveservices,
@proactiveservices@fosstodon.org avatar

@samurro Also a reminder to take a backup of all your synced data in case a mistake is made. As you can tell I forgot an important point so it shows how easy it is :-)

samurro,
@samurro@fosstodon.org avatar

@proactiveservices I was mostly unsure about: does the .stingore-global file have to be in the same directory I am trying to sync?

proactiveservices,
@proactiveservices@fosstodon.org avatar

@samurro syncthing will tell you if it cannot read the file - it will "Stop" the share. I do not know if it has to be in the same directory - it will be easy to test this by setting up a test share.

samurro,
@samurro@fosstodon.org avatar

@proactiveservices Thank you for all the effort and help, maybe I will get it work next weekend.

samurro,
@samurro@fosstodon.org avatar

@proactiveservices I think I found the issue, can't wait to get home to test it. "The first pattern that matches will decide the fate of a given file." So the * needs to be at the bottom and the included artists/albums need to be above... :blobcatfacepalm:

proactiveservices,
@proactiveservices@fosstodon.org avatar

@samurro Oh no. Did I give you upside-down advice? -_- sorry.
I could have sworn that I look at one of my .stignores before I originally replied...

proactiveservices,
@proactiveservices@fosstodon.org avatar

@samurro I've edited the original post in case other people find it.

samurro,
@samurro@fosstodon.org avatar

@proactiveservices no worries man, I should've actually read the ignore page instead of skimming over it myself :P

samurro,
@samurro@fosstodon.org avatar

@proactiveservices Hey dude, just wanted to thank you again for the solution with . I am using it now for some months successfully. I am just curious how do you handle removing files from your mobile (2nd device). Do you just delete them on the device? Wouldn't that delete them on the main (first device) once they are deleted, depending on the syncthing setting (Send & Receive, which is necessary for .stignore-global)? Or how do I make sure albums are removed from my mobile device?

proactiveservices,
@proactiveservices@fosstodon.org avatar

@samurro Hey, you're welcome! Just to clarify my specific use case: I want to sync a number of music folders to my phone. When I decide to put an album on the phone, I adjust the ignore settings as we discussed. TBH Syncthing isn't really an ideal solution, but I'm lazy ;-)

For this share on the phone I have the type set to "Receive Only". This way I can delete music from the phone, knowing it doesn't affect the computer.

As always, keep backups, especially when testing!

samurro,
@samurro@fosstodon.org avatar

@proactiveservices So you basically edit the ignore file on the source devices (computer) and delete the albums from your mobile device.
But that means you are not able to edit the .stignore-global file on your mobile device, correct? (receive only)

  • All
  • Subscribed
  • Moderated
  • Favorites
  • music
  • InstantRegret
  • ngwrru68w68
  • everett
  • mdbf
  • modclub
  • rosin
  • osvaldo12
  • DreamBathrooms
  • thenastyranch
  • magazineikmin
  • Youngstown
  • GTA5RPClips
  • slotface
  • kavyap
  • JUstTest
  • ethstaker
  • tacticalgear
  • tester
  • cubers
  • Durango
  • normalnudes
  • khanakhh
  • Leos
  • anitta
  • cisconetworking
  • provamag3
  • megavids
  • lostlight
  • All magazines