Page 1 of 1

Win App: Force Library Refreshes (Torrents)

PostPosted: Wed Jan 14, 2015 12:40 pm
by DenyAll
***With the release of Serviio Version 1.5.2 the following information is no longer valid. The attached app should no longer be required to refresh the library after a torrent (or similar) download. Serviio 1.5.2 and later will monitor the file as it is being progressively downloaded, and add it to the library as soon as it determines that the file is a valid media file.

Release 1.5 of Serviio includes a new Library Scanning Scheme - see http://wiki.serviio.org/doku.php?id=lib ... _mechanism. When a media file is added to, deleted from, or renamed within your shared folders, Serviio will now detect the change and update the Serviio library automatically. No more waiting for a timer - add a media file to a shared folder and it appears in your library near instantly.

There is one case where this does not occur. If you are a Windows user (cannot vouch for other OS's) and you download torrents directly to your shared folder, Serviio will not add the downloaded file to your library automatically. The reason for this is:

  • When a torrent download commences, Windows adds the file to your shared folder, allocating the full size of the file (although initially empty);
  • Serviio detects that the file has been added to your shared folder and attempts to add it to its library. At this stage however, not enough of the file has been downloaded for Serviio to read it effectively, so it will classify the file as a being non-media and will not add it to the library;
  • With torrent downloads, the full size of the file being downloaded is allocate at the beginning of the download and the file is subsequently "filled in" as more parts are downloaded. As such, the file size does not change and there are no subsequent triggers to tell Serviio to update its library.
The result is the file is never added to the library - until you do a Forced Refresh (or restart Serviio).

There are two ways to overcome this issue:

  • If your bit torrent client has this feature: Have your downloads go to a temporary folder (that is not part of your shared folders path) and then set your client to move it to the destination folder after the download is complete; or
  • If your bit torrent client has this feature: Run a program (attached) to perform a Forced Refresh of the Serviio Library after the download completes.
I have written a small console app (attached - ForceServiioRefresh.exe) that I have added to my uTorrent client to Forced Refresh the Serviio Library after my torrent download completes.

To use (uTorrent example):
  • Download the program, unzip and store it on your drive;
  • In uTorrent, select Options, Preferences, Advanced, Run Program and add the program to the :"Run this program when a torrent finishes" box. Press Save:
uTorrent.jpg
uTorrent.jpg (109.28 KiB) Viewed 12828 times

Hope this helps anyone that needs it. Please post instructions for other torrent clients if you find this useful.

Re: Win App: Force Library Refreshes (Torrents)

PostPosted: Wed Feb 04, 2015 4:33 pm
by philphil61
Thanks for this
Just what the doctor ordered
:)

Re: Win App: Force Library Refreshes (Torrents)

PostPosted: Wed Feb 18, 2015 10:09 pm
by Myst
Hi Deny, just registered to tell you that I really appreciate your winhelper and winapp programs :mrgreen: ! Just configured win app, I'll report back if there are any issues.

Re: Win App: Force Library Refreshes (Torrentst

PostPosted: Sun Apr 05, 2015 2:26 am
by DenyAll
Thanks Myst Appreciate the feedback.

Re: Win App: Force Library Refreshes (Torrents)

PostPosted: Tue Apr 07, 2015 8:02 pm
by Wizzkidy
Hi,

I'm getting this problem but I I'm using sabnzbd which extracts the contents into my TV folder that is used for Serviio, I currently also have to do a forced refresh so I wonder if this applies the same here, sabnzbd extracts the contents to the folder directly

Re: Win App: Force Library Refreshes (Torrents)

PostPosted: Wed Apr 08, 2015 7:58 am
by DenyAll
I suspect it applies to sabnzbd and any other program that progressively downloads or otherwise creates the media file.
This should all be resolved with the next release of Serviio, removing the need for this app/approach.

Re: Win App: Force Library Refreshes (Torrents)

PostPosted: Sun Apr 12, 2015 4:41 am
by DenyAll
With the release of Serviio Version 1.5.2 this app should no longer be required to refresh the library after a torrent (or similar) download. Serviio 1.5.2 will monitor the file as it is being progressively downloaded, and add it to the library as soon as it determines that the file is a valid media file.