Clearly we had a serious miscomunication. You wrote:
and I assumed that this was when viewed from within OSMC. So scratch everything I wrote about user ftp - it was a false lead. That said, you didn’t demonstrate that you can create a file on the NFS mount (/mnt/NAS). You created the file in /home/osmc.
The duplicates are undestandable. Are you saying that it successfully saved the subtitles to /mnt/NAS?
If looks like the NAS is creating files with anonuid / anongid, which is generlly fine but here the permission of the Season 02/03/04 directories is 775, meaning that only UID 98 and GID osmc can write to the directory. What happens if you try to create a file inside Season 02?
192.168.11.14:/DataVolume/public on /mnt/NAS_public type nfs (rw,relatime,vers=3,rsize=16384,wsize=16384,namlen=255,hard,proto=tcp,timeo=600,retrans=2,sec=sys,mountaddr=192.168.11.14,mountvers=3,mountport
Rights on this dir:
drwxrwxr-x 2 98 osmc 4096 Jun 27 07:13 subtitles
Writing the file:
root@osmc:/home/osmc# sudo -u osmc touch /mnt/NAS_public/subtitles/osmc-test.txt
root@osmc:/home/osmc# ls -l /mnt/NAS_public/subtitles/o*
-rw-r--r-- 1 nobody nogroup 0 Jun 27 07:13 /mnt/NAS_public/subtitles/osmc-test.txt
I did my tests using the official service.subtitles.opensubtitles addon. I also use service.subtitles.addic7ed sometimes (install from zip), which has the same problem btw.
I’m curious if you can reproduce it. Only thing I could think of is looking into the logs again when saving a subtitle to the mounted NAS (a Seagate BlackArmor NAS 110).
Speaking of which. In my posted logs I saw (when testing save location ‘Next to the video’):
So, trying to get the facts straight: is 2. expected behaviour (‘next to video’-setting always writes the subtitle-file to special://temp/), or do we expect to see an nfs:// path there as well?
My guess is that something has changed in v18 that caused these subtitle add-ons to change behavior.
Asking in the Kodi forum for the add-on is probably the best bet, since if anybody has the same issue and isn’t running OSMC, then it’s almost certainly a problem with the add-on.
Haven’t had a lot of time this evening but I just tried to save some subtitles to a locally-mounted pendrive. It works:
2019-06-28 22:36:33.821 T:3360445152 DEBUG: OnDownloadComplete - Saving subtitle special://temp/Planes Fire And Rescue.en.srt to /media/ADATA UFD/Kids/Planes Fire And Rescue.en.srt
Since /media/ADATA UFD could equally have been an NFS mount, I’ll try with an NFS mount next. In case it makes a difference, the file was accessed via Videos > Files, rather than Movies.
2019-06-30 16:33:03.933 T:3409986272 DEBUG: OnDownloadComplete - Saving subtitle special://temp/Planes Fire And Rescue.en.srt to /mnt/kids/Planes Fire And Rescue.en.srt
osmc@osmc-4k:~/.kodi/temp$ ls -l /mnt/kids
total 832508
-rw-r--r-- 1 osmc osmc 97501 Jun 30 16:33 Planes Fire And Rescue.en.srt
-rw-r--r-- 1 osmc osmc 852385098 Jun 30 16:24 Planes Fire And Rescue.m4v
I copied the file across to an NFS server, added thie source, /mnt/kids, via Videos > Files and allowed Kodi to scan it.
So far, I can’t reproduce the error. Any suggestions what to try next?
Update: Removed the kernel-based mount (/mnt/kids) from Kodi and added the Kodi-based NFS source. It still works:
osmc@osmc-4k:~/.kodi/temp$ grep -i ondownloadcomplete kodi.log
2019-06-30 18:01:42.922 T:3710976736 DEBUG: OnDownloadComplete - Saving subtitle special://temp/Planes Fire And Rescue.en.srt to nfs://192.168.8.3/mnt/usbdrive/Other/kids/Planes Fire And Rescue.en.srt
osmc@osmc-4k:~/.kodi/temp$ ls -l /mnt/kids
total 832508
-rw-r--r-- 1 osmc osmc 97501 Jun 30 18:01 Planes Fire And Rescue.en.srt
-rw-r--r-- 1 osmc osmc 852385098 Jun 30 16:24 Planes Fire And Rescue.m4v
Thanks for testing! Somehow writing to a NFS mount seems to work for me all of a sudden. I don’t know why it didn’t the previous time I checked.
One question about your configuration: do you have the problem with the ‘Save location’-setting as well? Or is your chosen setting actually stored and used? If it’s only the case for me, maybe something is corrupt and is reinstalling osmc worth trying.
For completeness, here the tests scenarios I performed (with log excerpts):
writing to a read-only HDD mount
Mount info:
/dev/sdb1 on /media/BUFFALO type hfsplus (ro,nosuid,nodev,relatime,umask=22,uid=0,gid=0,nls=utf8,uhelper=udisks)
Logs show that saving fails and fallback is used:
2019-06-30 12:59:34.098 T:1423950560 DEBUG: OnDownloadComplete - Saving subtitle special://temp/Planes 2 - Fire & Rescue (2014).nl.srt to /media/BUFFALO/kids/Planes 2 - Redden en Blussen [2014]/Planes 2 - Fire & Rescue (2014).nl.srt
2019-06-30 12:59:34.099 T:1423950560 WARNING: OnDownloadComplete - Saving of subtitle special://temp/Planes 2 - Fire & Rescue (2014).nl.srt to /media/BUFFALO/kids/Planes 2 - Redden en Blussen [2014]/Planes 2 - Fire & Rescue (2014).nl.srt failed. Falling back to special://temp
writing to a read-write HDD mount
Log show succesful save:
2019-06-30 13:04:36.801 T:1538245344 DEBUG: OnDownloadComplete - Saving subtitle special://temp/Planes 2 - Fire & Rescue (2014).nl.srt to /media/BUFFALO/kids/Planes 2 - Redden en Blussen [2014]/Planes 2 - Fire & Rescue (2014).nl.srt
writing to a read-write NAS mount
Mount info:
192.168.11.14:/DataVolume/Series on /mnt/NAS type nfs (rw,relatime,vers=3,rsize=16384,wsize=16384,namlen=255,hard,proto=tcp,timeo=600,retrans=2,sec=sys,mountaddr=192.168.11.14,mountvers=3,mountport=656,mo
The only problem I found is that I couldn’t remove the custom location via the GUI. It required an edit of guisettings.xml.
With a custom location set but the subtitle storage location set to “next to video”, I found that the subtitles were temporarily saved in the custom location (as opposed to in special://temp) but then correctly moved next to the video. All in all, it appears to work just fine for me.
What I noticed from your log snippets is that when it wasn’t working correctlly, we saw:
ie a temporary file name in a temporary add-on directory is copied to special://temp, but when it was working, it goes from special://temp to the correct location and with the correct file name:
2019-06-30 13:04:36.801 T:1538245344 DEBUG: OnDownloadComplete - Saving subtitle special://temp/Planes 2 - Fire & Rescue (2014).nl.srt to /media/BUFFALO/kids/Planes 2 - Redden en Blussen [2014]/Planes 2 - Fire & Rescue (2014).nl.srt
Notice how the first message says “Saved” and the second one says “Saving”.
I’ve not experienced any significant problems so either you’re doing something wrong or there’s something slightly misconfigured (or corrupted) on your system. At this point, I’d be inclined to reinstall.
I have no idea what the issue was but it was REALLY annoying me that it wasn’t working and I was REALLY bored so I just formatted my box and started over from scratch
I thought i had solved the issue by deleting guisettings.xml. It worked once, then after restarting Kodi it stopped saving them next to video. By the way, I’m running Kodi on PC now and have the same issue.
In guisettings.xml setting id=“subtitles.custompath” default=“true”>
/setting> is always empty. I tried changing interfaces, putting 0 and false in this field but it is always overwritten. What other file could be overwriting guisettings?
In order to edit that file you must stop Kodi first. When it loads the file on startup it will remove any path it doesn’t like. I had this issue with it not wanting to let me set an artist information folder. I went round and round till I found the way to set a custom media source and then I was able to get it to go. More specifically, I could get it to take if I included credentials, but I really didn’t want to do that. If you wanted to you would add the source as smb://username:password@ipaddress/yada/yada/. If you want it to do it a better way try what I outlined in this other thread and then just browse to it from the gui in the normal way.
Or you should be able to use system mounts to work around the issue as well.
I might have another angle of approach for analyzing/solving this issue.
Yesterday, I navigated to an episode of a television series. Since the episode wasn’t added to my Series library yet, I navigated via menu ‘Files > SMB-share > NAS > …’. I started the episode, downloaded subtitles and they were saved Next to the video (on my NAS)!
When I navigate to the episode via the ‘Series’ menu item, they still aren’t saved ‘Next to the video’.