ribbons / RadioDownloader

An easy to use application for managing podcast subscriptions and downloads.
https://nerdoftheherd.com/tools/radiodld/
GNU General Public License v3.0
15 stars 11 forks source link

Stopped duplicate entries appearing in downloads list when manually downloading after searching. #155

Closed ribbons closed 11 years ago

ribbons commented 11 years ago

Original report from Matt Robinson at 14:48:37 on 2011-09-25

This may well be a race condition, but the steps to reproduce on this machine are as follows:

The selected episode then appears twice in the downloads list.

I believe that this is because all entries in the downloads list are fetched when the search is dismissed by downloading the episode (which includes the new episode), as well as an event being raised to add the new download to the downloads list.


Imported from Bug 548 in the NerdoftheHerd.com Bugzilla.

ribbons commented 11 years ago

Original comment from Matt Robinson at 08:34:49 on 2011-10-29

Resolved in 7b3e673 by processing queued invokes just before clearing the downloads list in InitDownloadList. Otherwise the AddDownload invoke gets processed after the list has been cleared, and the item appears twice (once from the invoke and once from the FetchVisible call).

ribbons commented 11 years ago

Original comment from del at 22:09:34 on 2012-08-02

It looks like I have found a similar problem but in different circumstances (duplicate download entries) After starting RD I went to my subscriptions list, and looked at BBC proms. I selected the last few days worth and clicked download. When I went to the downloads list, RD was already adding items to the queue automatically, and I noticed double entries for all the proms items not already in the queue, with the exception of the Delius item which was already downloading. The net effect is that 4 of 5 items from proms 23 to prom 25 are duplicated, so I'm waiting to see what RD makes of it when it tries to download one of the duplicates .... Looks to me as if RD allows manual downloads when its automatic process is already working out what to download, and there can be a conflict if both processes are working on the same subscription list simultaneously.

This could be resolved (by me) by deleting duplicates, obviously. It could be resolved by RD if it applied a lock to the subscription currently being processed and releasing it afterwards, and whichever process got there second would either wait or generate a warning. If it waited, it would then see the new entries in the downloads list and would ignore them, just like it does if I select older items from a subscription. There are other methods such as scanning the list for duplicates, obviously. Not a big deal but it is a possible conflict. And these are true duplicates not the two halfs of concerts. Identical metadata. Entered under this number because it looks similar but different.

ribbons commented 11 years ago

Original comment from del at 22:12:07 on 2012-08-02

RD duplicateds screendump

RD has already downloaded Delius and is waiting to double-download 4 other proms items

ribbons commented 11 years ago

Original comment from Matt Robinson at 16:51:03 on 2012-08-05

Del: The problem you are describing is different to the one covered by this bug, which was resolved in version 0.20.2. What you have described should be resolved by the enhancement made in issue #114 if I understand it correctly, so please raise a new bug about this issue if you experience it again with version 0.26 or above.

ribbons commented 11 years ago

Original comment from del at 01:23:36 on 2012-08-03

I mentioned the Delius item appeared once. I watched RD downloading it - I could see the progress bar ticking. I looked in the output folder: no file.
BBC Proms 2012 Season Prom 23 Delius, Walton I removed it from the downloads list, re-enabled auto in the subscription list. It worked. The duplicate ones were saved twice. Both were valid m4a; I deleted the duplicate files. I deleted the first named in each case from the download list. One only was marked (-) unset; I reckon there was a 50% chance of picking the right one and I got 3/4. I re-enabled it and it downloaded (again) just fine. None of this represents an insurmountable problem, but it would be good if the problem were impossible :-) This is of course on version 0.24.2.0