kieraneglin / pinchflat

Your next YouTube media manager
GNU Affero General Public License v3.0
1.28k stars 23 forks source link

[FR] Improve removing logic from "Pending media" #257

Closed Pinkbyte closed 5 months ago

Pinkbyte commented 5 months ago

Related to #111

It seems that currently it is possible to remove unwanted&stuck videos(mistakenly added into playlist to archive and not downloaded for some reason) from "Pending media" only by clicking on 'Delete and Ignore' on video item. But there are no place in web interface to list/clear ignored videos list - as far as i understand the only ways to clear ignored list is either to dive into database manually or remove/re-add source (which seems to trigger re-downloading of all videos).

kieraneglin commented 5 months ago

Ah, good call! You actually should be able to search for the media in the upper right if you know its name, but I'll see if I can add a better solution

kieraneglin commented 5 months ago

Ended up being easier than I thought! I've added a new tab to the source view that shows media that's not pending or downloaded (ie: media that's been ignored, either manually or because of your profile/source's settings)

that'll be out in the next release (either later this week or early next week)

Pinkbyte commented 5 months ago

I have installed v2024.05.24 release - tab "Other" appears, but it is not possible to manually delete video from database entirely, only to move it into pending state - but as this video is non-downloadable for some reason - it will stuck in pending state.

Can you please add possibility to manually remove stuck/ignored video from database? It will not be added again, if i remove it from my Youtube playlist first

kieraneglin commented 5 months ago

That's a bit trickier than it may initially seem. PF stores all of a source's media in its database for a few reasons, but the main one is that it need to be aware of which media has been ignored/deleted so it doesn't try to redownload them.

You're right in saying that this isn't applicable in the case of a playlist where the video itself has been removed, but I also think it'll result in other users getting confused when they delete a record and it just comes back on the next indexing pass.

I'll think about how I can implement this! If it's really bugging you in the meantime, you can open the console for the PF container and run this:

./bin/pinchflat rpc '123 |> Pinchflat.Media.get_media_item!() |> Pinchflat.Media.delete_media_item(delete_files: true)'

Subbing out the 123 near the beginning of that command for the numeric ID of that media item. You can find that ID here:

Screenshot 2024-05-30 at 10 58 33 AM