Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[FR] Ability to Cancel/Remove ongoing or scheduled tasks #307

Closed
rafaelvieiras opened this issue Jul 12, 2024 · 4 comments
Closed

[FR] Ability to Cancel/Remove ongoing or scheduled tasks #307

rafaelvieiras opened this issue Jul 12, 2024 · 4 comments
Assignees

Comments

@rafaelvieiras
Copy link

rafaelvieiras commented Jul 12, 2024

Is your feature request related to a problem? Please describe.
I recently made a change to a Source that had a task in progress (Pinchflat.SlowIndexing.MediaCollectionIndexingWorker), and it is a task that was taking a lot of time, as I was not using the API and the channel was very large. I changed from normal indexing to fast indexing (via API). After this change, the task never finished again.

Now I have two tasks scheduled and listed in the source:
image

Describe the solution you'd like
One solution I imagine is being able to cancel, remove or restart these tasks.
But I don't know if it's the best solution. However, even if not, it would be good to give the user this ability to control the tasks.

@kieraneglin
Copy link
Owner

kieraneglin commented Jul 16, 2024

Hey there - thanks for the report (:

I'll definitely look into that indexing thing since it sounds like there may be a bug there, but based on what I'm seeing in the screenshot it looks like things may be working as expected. Fast indexing still runs a "slow" index periodically to make sure the app is kept up-to-date with any changes that fast indexing can't see (for instance, changing an old video from private to public).

Both jobs in that screenshot are scheduled to be run in the future which is expected, but one thing that could help me confirm is going to that source > clicking "Actions" > "Copy JSON" > and pasting it here.


In terms of giving the user control over the jobs, I'll consider it but I don't think that'll be feasible. The jobs often finish by calling other jobs and giving the user control without knowing that could leave downloads in a half-complete state, among many other issues.

@rafaelvieiras
Copy link
Author

@kieraneglin thanks for your attention with a FR and my bug (which maybe isn't a bug haha). And thank you for the project, I came as a refugee from the tubearchivist, as I consider him a cannon for a fly (ES, Redis,... why? haha).

I will send you the JSON of this source where I made the change between fast and slow.
But anyway, I'll give you another context: I'm about to wipe all the data and try to run everything from scratch to see if I have any success, because now I'm having a problem similar to this:

I also use Unraid.

The JSON of Source:

{
  "id": 1,
  "description": "O Canal MaxMRM GAMEPLAY é um canal dedicado ao mundo dos GAMES e feito para os gamers! 

Com postagens frequentes contendo dicas, gameplays, reviews, tutoriais, easter eggs e muito mais.

O canal está em constante evolução trazendo cada vez mais conteúdo e buscando sempre o melhor resultado audiovisual. Sejam todos muito bem vindos e espero que gostem.

Me encontrem também nas redes sociais (abaixo):
",
  "uuid": "9f50bbc5-0662-440b-98da-17afca2cd494",
  "inserted_at": "2024-07-01T16:02:25Z",
  "updated_at": "2024-07-13T00:11:25Z",
  "media_profile": {
    "id": 1,
    "name": "TV Shows",
    "inserted_at": "2024-07-01T15:55:36Z",
    "updated_at": "2024-07-13T00:29:23Z",
    "output_path_template": "/shows/{{ source_custom_name }}/Season {{ season_from_date }}/{{ season_episode_index_from_date }} - {{ title }} - [{{ id }}].{{ ext }}",
    "preferred_resolution": "1080p",
    "sponsorblock_categories": [
      "sponsor",
      "intro",
      "selfpromo"
    ],
    "sponsorblock_behaviour": "remove",
    "download_thumbnail": true,
    "embed_thumbnail": true,
    "download_auto_subs": false,
    "download_subs": true,
    "embed_subs": true,
    "sub_langs": "pt",
    "download_metadata": false,
    "embed_metadata": true,
    "download_nfo": true,
    "download_source_images": true,
    "livestream_behaviour": "exclude",
    "redownload_delay_days": 0,
    "shorts_behaviour": "exclude"
  },
  "nfo_filepath": "/downloads/shows/MaxMRM GAMEPLAY/tvshow.nfo",
  "original_url": "https://www.youtube.com/@MaxMRM",
  "media_profile_id": 1,
  "custom_name": "MaxMRM GAMEPLAY",
  "collection_id": "UCJ8GQ_SNb-33m_BluT4TTlw",
  "collection_name": "MaxMRM GAMEPLAY",
  "collection_type": "channel",
  "download_media": true,
  "fast_index": true,
  "banner_filepath": null,
  "fanart_filepath": null,
  "poster_filepath": "/downloads/shows/MaxMRM GAMEPLAY/poster.jpg",
  "series_directory": "/downloads/shows/MaxMRM GAMEPLAY",
  "download_cutoff_date": "2024-06-22",
  "title_filter_regex": null,
  "index_frequency_minutes": 43200,
  "last_indexed_at": "2024-07-05T21:15:13Z",
  "output_path_template_override": null,
  "retention_period_days": null
}

@kieraneglin
Copy link
Owner

Thanks for that JSON! Based on that and your screenshots, it seems to me like the indexing behaviour is working as expected. Since both tasks in the screenshot are "Scheduled", that's a sign of when they will run, not that they are running.

For the permissions issue, it'd definitely be worth uninstalling + reinstalling! I haven't heard of many issues with Unraid, especially since I made some of the changes in #106 but you may as well try. Just note that to properly uninstall you should be deleting the pinchflat folder in your Unraid appdata which will delete the database of the app as well

Anyway, let me know if that works out!

@kieraneglin
Copy link
Owner

Closing for now. Please re-open if there's anything related to the original issue that comes up!

@kieraneglin kieraneglin closed this as not planned Won't fix, can't repro, duplicate, stale Jul 22, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants