Page 1 of 1

Recreate the new media search algorithm

PostPosted: Mon Jan 12, 2015 4:40 pm
by dbase25
Greetings @all,

i have the follow situation:
my search automation interval is 5minutes. When i upload a new video and the search is found the new video (incomplete upload) then i can watch only to the time where the video part is uploaded (meanwhile the upload is complete)
when the video is complete uploaded and the wrong video size indexed, i must rename it, wait 5min(or start search manually) and rename the file back to the org. filename and wait 5min again (or start search manually).

if it possible to check the filename and the filesize if they changed?
so i have always a actually database in 5min.

Thanks and regards
david

Re: Recreate the new media search algorithm

PostPosted: Tue Jan 13, 2015 1:22 am
by zip
there will be some changes in 1.5, but even then you should not share a directory with incomplete files - it will most likely result in a weird state. It's all due to (mostly Windows) not detecting changes to files as they are being written to.

Re: Recreate the new media search algorithm

PostPosted: Tue Jan 13, 2015 2:19 am
by DenyAll
If you are a windows user you can also use my Winhelper Tool - see viewtopic.php?f=17&t=12136. This tool will monitor shared folders and will automatically refresh the Serviio library after the file changes.

Compared to Serviio 1.5 it comes at a cost though - when a file is being downloaded the OS sends multiple events to the WinHelper Tool. Therefore on receiving a change event I have set WinHelper to wait for a minute to see if another change event occurs (representing a file that is progressively being written). So the upshot is the library refresh isn't [near] instantaneous (as it is in Serviio Version 1.5) as it waits until a minute of no further file updates before doing a Force Refresh of the library. It also uses Force Refresh which seems slower than the new delta scanner in version 1.5.

When Serviio 1.5 is released it will provide near instantaneous library refreshes for Win users, but it wont refresh for progressively downloaded files (eg. torrents). I have written a small program that can be run after your file is download that will perform a Force Refresh automatically - I have added this to my bit torrent client to run after download is complete, and that has fixed this issue. I'll make this torrent client add-on available when 1.5 is released.

...(incomplete upload) then i can watch only to the time where the video part is uploaded (meanwhile the upload is complete)
I have never tested this (you must have a slow download?), and agree with the above - could produce wierd outcomes. WinHelper should improve this as it will refresh periodically throughout a file download. The new version, even with my add-on won't (as there will only be an automatic refresh when the file is added/started, triggered by Serviio, and one by my add-on at the end of the download).

Re: Recreate the new media search algorithm

PostPosted: Tue Jan 13, 2015 8:06 am
by dbase25
Thanks for the fast answer. for explain my situation.

I upload a video file to my server (4GB for FHD own cam movies) or pics (raw 35MB) and if the library update starts (5min in my settings) then i have incomplete file in the database. its equal which upload speed i have (in the moment 1GB).

so i will be wait for v1.5 (check the file size for change against the database). a realtime check is for me a payable feature ;-)
and meanwhile i will give a try your plugin.

thanks for the program and great community.

david

Re: Recreate the new media search algorithm

PostPosted: Tue Jan 13, 2015 10:19 am
by zip
oh, copying over a file should work with the new 1.5 scanner I think. It's things like torrents that won't, as the file is created at the beginning with the full size and then it fills in the blanks as the download progresses - so Serviio can't really detect the change.