URL upload to onedrive & use it as source for stream

Yes... I have disable then re-enabled too. Do I have to remove service..? Then copy again to work..

for what it is worth, use a simple .sh batch file for rclone mount
once the command is fully debugged and tested, then use systemd.

otherwise the internet is full of systemd guides

I am not much in knowledge where to use below thing.


rc vfs/refresh recursive=true

  • if you add/change/delete files to onedrive not using the rclone mount, for example,
    --- using rclone copy/copurl
    --- using onedrive website.
    then rclone will not notice it for 1000 hours, as per
    --dir-cache-time=1000h

to force rclone mount to see the changes in onedrive, need to run
rc vfs/refresh recursive=true

this can be tested easily

  1. not using the rclone mount, copy a new file to the onedrive.
  2. try to find that new file at /mnt/cloud, you will not find it
  3. run rc vfs/refresh recursive=true
  4. try to find that new file at /mnt/cloud and now you should find it.

You are absolutely correct. Have tried for below :-

this can be tested easily

1. not using the rclone mount, copy a new file to the onedrive.
2. try to find that new file at /mnt/cloud, you will not find it

3. run rc vfs/refresh recursive=true (But for this step I am having doubt, do I have to run it inside odrive.service or on terminal.

4. try to find that new file at /mnt/cloud and now you should find it.

Can't we reduce the time to 1second.

--dir-cache-time=1000h

Tried on terminal. Got this :-




ubuntu@ubuntu:/mnt/cloud$ rc vfs/refresh recursive=true

Command 'rc' not found, but can be installed with:

sudo apt install rc

ubuntu@ubuntu:/mnt/cloud$

you can reduce the --dir-cache-time to 1s but every second, rclone will have to use lots of api calls over and over again. knowing the way onedrive throttles rclone, not a good idea.

almost all rcloners, including myself, set a long duration for --dir-cache-time.
after adding media to onedrive, do the rclone rc vfs/refresh and a manual can from your media server.

the command is
rclone rc vfs/refresh recursive=true

Okay. Have kept --dir-cache-time=1000h as it is. But when trying to run below on directory /mnt/cloud

Got this.

ubuntu@ubuntu:/mnt/cloud$ rclone rc vfs/refresh recursive=true
2022/01/02 17:08:23 Failed to rc: connection failed: Post "http://localhost:5572/vfs/refresh": dial tcp 127.0.0.1:5572: connect: connection refused
ubuntu@ubuntu:/mnt/cloud$


I have fixed above error by adding below

--rc \
--rc-no-auth \


post your rclone mount command

Now my rclone mount command looks like this


[Unit]
Description= RClone Mount Service
After=network-online.target

[Service]
Type=notify
ExecStart=/usr/bin/rclone mount \
--config=/home/ubuntu/.config/rclone/rclone.conf \
--user-agent=rajeshsahoo \
--allow-other \
--timeout=1h \
--dir-cache-time=1000h \
--cache-dir=/mnt/rclone/cache/omedia \
--vfs-cache-mode=full \
--vfs-cache-max-size=20G \
--vfs-cache-max-age=12h \
--rc \
--rc-no-auth \
onedrive: /mnt/cloud
ExecStop=/bin/fusermount -uz /mnt/cloud
Restart=on-abort
RestartSec=5
StartLimitInterval=60s
StartLimitBurst=3

[Install]
WantedBy=multi-user.target


rclone rc vfs/refresh recursive=true

This command do I need to run always inside directory /mnt/cloud

Or I can do it inside /home/ubuntu..?

does not matter what the current working dir is. just run the command

Now on jellyfin server my media is not showing...:- :sob: :sob:

Rclone mount service is running well on ubuntu instance, Manual refresh is too ran once.

need to follow all of the steps that i shared above
https://forum.rclone.org/t/url-upload-to-onedrive-use-it-as-source-for-stream/28176/74

I have followed all steps mentioned as in below.

1. a debug log would show One drive : poll-interval is not supported by this remote.
so remove --poll-interval=15s

2. to enable rclone to notice changes in onedrive
a. add --rc --rc-no-auth to your rclone mount command
b. restart the rclone mount

3. run /usr/bin/rclone rc vfs/refresh recursive=true


force jellyfin to scan the library.


each time you make changes to onedrive and want jellyfin to reflect that, repeat step 3+4

What I have done to rclone mount service :-


Removed = --poll-interval=15s \

Added = --rc \
        --rc-no-auth \

Saved changes to rclone mount service by doing CTRL+X then pressed Y then pressed enter key.

Copied new rclone mount service : sudo cp odrive.service /etc/systemd/system

Enabling service : sudo systemctl enable odrive.service

Restart service : sudo systemctl restart odrive.service

Checked status : sudo systemctl status odrive.service


Finally ran :

/usr/bin/rclone rc vfs/refresh recursive=true

post the output of /usr/bin/rclone rc vfs/refresh recursive=true -vv

Here it is :-


ubuntu@ubuntu:~$ pwd
/home/ubuntu
ubuntu@ubuntu:~$ /usr/bin/rclone rc vfs/refresh recursive=true -vv
2022/01/02 18:17:54 DEBUG : rclone: Version "v1.57.0" starting with parameters ["/usr/bin/rclone" "rc" "vfs/refresh" "recursive=true" "-vv"]
{
        "result": {
                "": "OK"
        }
}
2022/01/02 18:17:55 DEBUG : 4 go routines active

no need to run the command twice.

check the rclone mount folder, make sure you can see the files.

Here it is. I have checked inside /mnt/cloud folder.


ubuntu@ubuntu:/mnt/cloud$ rclone ls onedrive:
1388909500 83 (2021).mkv
5300125620 Bad.Boys.1995.2160p.UHD.BluRay.10bit.HDR.x265-HazMatt.mkv
4964988456 Matrix (2021).mkv
1929407457 Murder at Teesri Manzil 302 (2021).mkv
3354217040 Vanam (2021).mkv
2205311885 Vicky.Donor.2012.Hindi.1080p.BluRay.x264-FOXM.mp4
367941629 The Wheel Of Time (2021)/www.Tamilblasters.party - The Wheel of Time [720p HDRip] S01 E01.mkv
370224892 The Wheel Of Time (2021)/www.Tamilblasters.party - The Wheel of Time [720p HDRip] S01 E02.mkv
370216057 The Wheel Of Time (2021)/www.Tamilblasters.party - The Wheel of Time [720p HDRip] S01 E03.mkv
376494828 The Wheel Of Time (2021)/www.Tamilblasters.party - The Wheel of Time [720p HDRip] S01 E04.mkv
385905345 The Wheel Of Time (2021)/www.Tamilblasters.party - The Wheel of Time [720p HDRip] S01 E05.mkv
378518828 The Wheel Of Time (2021)/www.Tamilblasters.party - The Wheel of Time [720p HDRip] S01 E06.mkv
374372948 The Wheel Of Time (2021)/www.Tamilblasters.party - The Wheel of Time [720p HDRip] S01 E07.mkv
370177480 The Wheel Of Time (2021)/www.Tamilblasters.party - The Wheel of Time [720p HDRip] S01 E08.mkv


ubuntu@ubuntu:/mnt/cloud$ ls -a
 .                Bad.Boys.1995.2160p.UHD.BluRay.10bit.HDR.x265-HazMatt.mkv  'The Wheel Of Time (2021)'
 ..              'Matrix (2021).mkv'                                         'Vanam (2021).mkv'
'83 (2021).mkv'  'Murder at Teesri Manzil 302 (2021).mkv'                     Vicky.Donor.2012.Hindi.1080p.BluRay.x264-FOXM.mp4