Conversation

i wish i could sync my mpv watch-later times between my laptop and my pc while accounting for file path differences (e.g. on my pc i store videos in /home/[user]/Downloads but on my laptop i store them in /media/[user]/videos), it would make watching/listening to longer videos/podcasts way easier when hopping between them

sadly mpv stores watch-later data as hashes of the absolute filename/url including the path it is stored in, so simply rsyncing ~/.local/state/mpv/watch_later/* like ive been doing isnt enough unless both files are in the exact same path on both machines

maybe someone could write a plugin for this?

2
0
0

@kemona_halftau I would suggest trying to use a symlink so they both match

1
0
0

@hexaheximal symlinks get resolved when opening files :(

2
0
0
@kemona_halftau you can make it store full paths alongside hashes (write-filename-in-watch-later-config) or just use filenames and ignore paths (ignore-path-in-watch-later-config)
0
0
1

@kemona_halftau @hexaheximal Then mount --bind. (You can have an entry in fstab, possibly with user,noauto. That’s what I do for NFS.)

1
0
0

@diffie @kemona_halftau that's precisely what I said too

bind mounts are great :)

1
0
0

@hexaheximal @kemona_halftau Sry, your post didn’t appear to me.

Btw, bind mounts are great, but they become minor PITA when the fstab starts filling with them, sometimes with user option or having not always accessible location as its source. For example, bind mount of some NFS location somewhere else may be kinda confusing when the NFS server isn’t available at the time of boot.

2
0
0

@diffie @kemona_halftau yeah, I didn't really think of bind mounting in fstab but I can't imagine that being a good thing - if done at startup, I think that is a better job for init services.

also bind mounts are indeed amazing. especially in embedded linux, which is what I typically deal with nowadays :)

1
0
0

@hexaheximal @kemona_halftau I also somewhat dislike the centralised nature of configuring them in fstab. It’s great for system-management stuff but it somewhat sucks when done just for the user or desktop stuff.

0
0
0
@hexaheximal @diffie @kemona_halftau why not fstab? isn't mounting filesystems exactly what it's for?

bind mounts are indeed nice in embedded linux environments that you don't fully control. my server's BMC is running a proprietary GPL violation of a distro with a read-only cramfs rootfs and a read/write /nv partition and the way I got a shell on it without modifying the read-only rootfs was by dumping the firmware, booting it in QEMU, bind-mounting /bin/sh over /SMASH/msh from a script/config file in the /nv partition that got sourced as root on startup (it had an ancient version of dropbear that was hardcoded to execute /SMASH/msh (which was a really weird shell that appeared to have no useful functionality whatsoever)), and flashing the modified firmware. later I used more bind-mounts to replace other stuff in the read-only rootfs with my own stuff (like replacing the ancient busybox binary with a newer one)
0
0
1