mirror of
https://github.com/stashapp/stash.git
synced 2026-06-11 18:35:26 -05:00
Compare commits
17 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
b23b0267ad | ||
|
|
772c69c359 | ||
|
|
e9f5e7d6b4 | ||
|
|
af11189718 | ||
|
|
5b62cc66d4 | ||
|
|
e92a0cb126 | ||
|
|
49ee2b1cf0 | ||
|
|
714afd98b4 | ||
|
|
ab77a9334c | ||
|
|
d7bc248cf4 | ||
|
|
22dc0bbf77 | ||
|
|
be8f57d6ca | ||
|
|
c3702c5bd2 | ||
|
|
38ade2b4b6 | ||
|
|
c7b53777dc | ||
|
|
8fe32fd778 | ||
|
|
1ced75a45e |
@@ -76,6 +76,10 @@ func main() {
|
||||
defer pprof.StopCPUProfile()
|
||||
}
|
||||
|
||||
// initialise desktop.IsDesktop here so that it doesn't get affected by
|
||||
// ffmpeg hardware checks later on
|
||||
desktop.InitIsDesktop()
|
||||
|
||||
mgr, err := manager.Initialize(cfg, l)
|
||||
if err != nil {
|
||||
exitError(fmt.Errorf("manager initialization error: %w", err))
|
||||
|
||||
@@ -49,6 +49,7 @@ func (r *mutationResolver) GalleryCreate(ctx context.Context, input GalleryCreat
|
||||
newGallery.Details = translator.string(input.Details)
|
||||
newGallery.Photographer = translator.string(input.Photographer)
|
||||
newGallery.Rating = input.Rating100
|
||||
newGallery.Organized = translator.bool(input.Organized)
|
||||
|
||||
var err error
|
||||
|
||||
|
||||
@@ -17,6 +17,16 @@ import (
|
||||
"golang.org/x/term"
|
||||
)
|
||||
|
||||
var isDesktop bool
|
||||
|
||||
// InitIsDesktop sets the value of isDesktop.
|
||||
// Changed IsDesktop to be evaluated once at startup because if it is
|
||||
// checked while there are open terminal sessions (such as the ffmpeg hardware
|
||||
// encoding checks), it may return false.
|
||||
func InitIsDesktop() {
|
||||
isDesktop = isDesktopCheck()
|
||||
}
|
||||
|
||||
type FaviconProvider interface {
|
||||
GetFavicon() []byte
|
||||
GetFaviconPng() []byte
|
||||
@@ -59,22 +69,33 @@ func SendNotification(title string, text string) {
|
||||
}
|
||||
|
||||
func IsDesktop() bool {
|
||||
return isDesktop
|
||||
}
|
||||
|
||||
// isDesktop tries to determine if the application is running in a desktop environment
|
||||
// where desktop features like system tray and notifications should be enabled.
|
||||
func isDesktopCheck() bool {
|
||||
if isDoubleClickLaunched() {
|
||||
logger.Debug("Detected double-click launch")
|
||||
return true
|
||||
}
|
||||
|
||||
// Check if running under root
|
||||
if os.Getuid() == 0 {
|
||||
logger.Debug("Running as root, disabling desktop features")
|
||||
return false
|
||||
}
|
||||
// Check if stdin is a terminal
|
||||
if term.IsTerminal(int(os.Stdin.Fd())) {
|
||||
logger.Debug("Running in terminal, disabling desktop features")
|
||||
return false
|
||||
}
|
||||
if isService() {
|
||||
logger.Debug("Running as a service, disabling desktop features")
|
||||
return false
|
||||
}
|
||||
if IsServerDockerized() {
|
||||
logger.Debug("Running in docker, disabling desktop features")
|
||||
return false
|
||||
}
|
||||
|
||||
|
||||
@@ -49,6 +49,9 @@
|
||||
* Custom field values are now displayed truncated to 5 lines. ([#6361](https://github.com/stashapp/stash/pull/6361))
|
||||
|
||||
### 🐛 Bug fixes
|
||||
* **[0.30.1]** fixed hardware encode tests preventing desktop features from working correctly. ([#6417](https://github.com/stashapp/stash/pull/6417))
|
||||
* **[0.30.1]** fixed Handy integration not functioning correctly. ([#6425](https://github.com/stashapp/stash/pull/6425))
|
||||
* **[0.30.1]** fixed gallery create graphql interface not setting organised flag. ([#6418](https://github.com/stashapp/stash/pull/6418))
|
||||
* stash-ids are now set when creating new objects from the scrape dialog. ([#6269](https://github.com/stashapp/stash/pull/6269))
|
||||
* partial dates are now correctly handled when scraping scenes. ([#6305](https://github.com/stashapp/stash/pull/6305))
|
||||
* Fixed zoom keyboard shortcuts not working. ([#6317](https://github.com/stashapp/stash/pull/6317))
|
||||
|
||||
@@ -178,6 +178,10 @@ export class Interactive {
|
||||
this._connected = await this._handy
|
||||
.setHsspSetup(funscriptUrl)
|
||||
.then((result) => result === HsspSetupResult.downloaded);
|
||||
|
||||
// for some reason we need to call getStatus after setup to ensure proper state
|
||||
// see https://github.com/defucilis/thehandy/issues/3
|
||||
await this._handy.getStatus();
|
||||
}
|
||||
|
||||
async sync() {
|
||||
|
||||
Reference in New Issue
Block a user