• thegr8goldfish@startrek.website
    link
    fedilink
    English
    arrow-up
    1
    ·
    7 months ago

    I’m doing something similar with KODI and. NAS currently. I’m curious to know if you set up a MySQL database to sync your watch history across devices? I have been reading up on it but since my NAS is just a portable USB HDD plugged into my router, I don’t think I can include this option.

    • utopiah@lemmy.world
      link
      fedilink
      English
      arrow-up
      2
      ·
      edit-2
      7 months ago

      I used KODI for a while but switched to “just” minidlna/ReadyMedia for a lighter setup. I know that VLC can resume videos even over DLNA so I’m wondering if it can abstracted away, e.g having a VLC script that checked, maybe based on filename, if the opening file has already been played from another location and if so, resume from there.

      I see that in ~/.config/vlc/vlc-qt-interface.conf there is a [RecentsMRL] section with list (unfortunately local only I believe) and times (in seconds I imagine). One could imagine to scp that file to the NAS using e.g inotify (after writes) then merge it (not replace) on that section only, then a shortcut that before starting VLC get the merged file and does the same. That should allow for resuming across devices.

    • Aceticon@lemmy.world
      link
      fedilink
      English
      arrow-up
      2
      ·
      edit-2
      7 months ago

      Well, my NAS before was in the same style as yours and I moved it to that Linux Mini-PC (that by then had already replaced both TV boxes) because it has much better performance as a NAS (my router could only share using SMBv1 which has less than half the speed of SMBv2 and above, and there are even benefits for Kodi that is in that same machine to access the media directly via the filesystem rather than mounted shared, both because it’s much faster doing full scans and because it will actually do proper incremental scans - i.e. only and quickly check files with creation dates newer than last scan data - when scanning my NAS for new media files.

      As for shared MySQL synch, if I remember it correctly from when I read about it on the Kodi website, that’s just having that MySQL set up as a standalone database server in a place accessible by all potential Kodi client instances and then configure your Kodi clients to use that standalone database instead of the internal database of each Kodi client.

      This is just a traditional client-server structure were the “server” is the standalone MySQL database and the clients are the Kodi instances: pretty run of the mill way to have a server doing something for multiple client applications if they’re all on the same network so lots of corporate software works like that.

      The most obvious way of doing this is having that MySQL database on the Linux Mini-PC (even in professional settings, putting your database on a Linux machine is almost always the best choice) by installing it as a package (for example, with apt-get) and then you do have to initialize it and load it with data from an existing Kodi instance (again, if I remember it correctly, you export the data from the internal database of your Kodi instance and import it into that standalone database) and then point the Kodi instance (and any other present or future Kodi instances you want to use that shared watch history) to that standalone database. From looking at it (and given my experience with making server side software), I believe the instructions on the Kodi website for this are correct and complete even if they seem a little daunting at first.

      Personally I didn’t do it because I have no need for it and hence couldn’t be arsed.