[Plugin] Autoshutdown - Shutdown PC once torrents complete

Suggest, post, or discuss plugins for Deluge
cool_boy_mew
New User
New User
Posts: 1
Joined: Sun Aug 26, 2018 8:51 pm

Re: [Plugin] Autoshutdown - Shutdown PC once torrents complete

Post by cool_boy_mew »

Good day,

Can I ask for a simple feature request?

Basically:
Have an option you can check to change the completion behavior to "Do nothing" for next time after Autoshutdown does it's thing sucessfully ... Or well "Only this time" option

I love torrenting while going to bed and letting the computer shut down when it's done

But I also torrent one off things here and there and it's been like the 5th time in the past week that I keep forgetting that the plugin is currently set to "Shut Down" and that the PC shut down while I'm using it...

Thanks!
Cas
Top Bloke
Top Bloke
Posts: 3679
Joined: Mon Dec 07, 2009 6:04 am
Location: Scotland

Re: [Plugin] Autoshutdown - Shutdown PC once torrents complete

Post by Cas »

Ah that feature had been added but forgot to make a release, done: https://github.com/cas--/autoshutdown/releases
sum1
New User
New User
Posts: 2
Joined: Sat Nov 11, 2023 4:10 am

Re: [Plugin] Autoshutdown - Shutdown PC once torrents complete

Post by sum1 »

Can we please have an updated Autoshutdown plugin for Deluge 2.x?
I'm still using Deluge 1.x because of it.
mhertz
Moderator
Moderator
Posts: 2195
Joined: Wed Jan 22, 2014 5:05 am
Location: Denmark

Re: [Plugin] Autoshutdown - Shutdown PC once torrents complete

Post by mhertz »

As requested, and as feel makes sense in general, I ported this plugin to deluge2. Was lazy and only tested it on my main system and no VMs, yet atleast, and here also had to change the dbus call from shutdown to poweroff, as no shutdown dbus function here(polkit/systemd-logind).

AutoShutdown-1.5.0.egg
mhertz
Moderator
Moderator
Posts: 2195
Joined: Wed Jan 22, 2014 5:05 am
Location: Denmark

Re: [Plugin] Autoshutdown - Shutdown PC once torrents complete

Post by mhertz »

Slight update to former, where on linux I made it stop deluge/daemon gracefully before doing it's shutdown action, so torrent not show paused upon next startup, but seeding as should. Also I changed on linux the shutdown action to run the dbus shutdown call if my change to dbus poweroff call didn't work, as found shutdown is the old call from consolekit's dbus implementation, and so to support old distro's, and non-systemd distro's(systemd-logind) neither using elogind(systemd-logind compatible regarding shutdown) but consolekit rather, just to be on safe side.

Link in former post refreshed.

Edit: I tried test in my win10 VM and there's an issue, sorry, will look into it later...

Edit2: Fixed, just a module changed name in python3 on windows side. I saw same issue with ungraceful shutdown here, so apllied that fix to windows side too. Link refreshed again.
sum1
New User
New User
Posts: 2
Joined: Sat Nov 11, 2023 4:10 am

Re: [Plugin] Autoshutdown - Shutdown PC once torrents complete

Post by sum1 »

Thanks for the plugin update, much appreciated.
mhertz
Moderator
Moderator
Posts: 2195
Joined: Wed Jan 22, 2014 5:05 am
Location: Denmark

Re: [Plugin] Autoshutdown - Shutdown PC once torrents complete

Post by mhertz »

Thanks for posting, welcome buddy! :)
mhertz
Moderator
Moderator
Posts: 2195
Joined: Wed Jan 22, 2014 5:05 am
Location: Denmark

Re: [Plugin] Autoshutdown - Shutdown PC once torrents complete

Post by mhertz »

Sorry, just really quick wanted say that I felt bad at stating previously that "I felt it maked sense" , lol pretentious much, it's freakin' Cas's plugin afterall, how much more seal of approval can you get than that. It just been naggin' me little that I formulated my wording so badly, and to late edit I felt, and just ment that it's functionality wasent already in deluge2 in an other plugin(where I e.g have said no before), and so made sense spending time porting it, and not just for one person etc. Plugin itself is top notch, goes without saying...

Anyway, just wanted to clarify that, and sorry for off-topic, and just for my own piece of mind :) Carry on, back to regular programming...
Post Reply