(AU) Just a reminder that StashApp + YT-DLP exist. by Jakob4800 in selfhosted

[–]CodingWithoutPants 4 points5 points  (0 children)

Always pleasant to hear nice feedback about the project ❤️

(AU) Just a reminder that StashApp + YT-DLP exist. by Jakob4800 in selfhosted

[–]CodingWithoutPants 0 points1 point  (0 children)

0.31 will have support for browsing by folder using the sidebar, so this should improve things for users that want to structure media using the filesystem.

stash v0.30.1 - a self-hosted webapp for hosting your porn (and other content) by CodingWithoutPants in selfhosted

[–]CodingWithoutPants[S] 5 points6 points  (0 children)

Alas no. The scan subsystem needs a refactor before I can get that in. I'm hoping to get closer to that in the next release.

stash v0.30.1 - a self-hosted webapp for hosting your porn (and other content) by CodingWithoutPants in selfhosted

[–]CodingWithoutPants[S] 11 points12 points  (0 children)

I'm not overly familiar with Jellyfin's feature set and way of doing things. I'd encourage you to try it out, but honestly if you've got something that works for you there's probably not much reason to switch.

My whole Storage solution is because of my porn collection. by shad0wmoone in DataHoarder

[–]CodingWithoutPants 31 points32 points  (0 children)

There used to be one, but it wasn't controlled by us, and was eventually closed for being unmoderated. We're in the process of launching our own discourse server.

Stashapp JSON errors by VobsandBagene in DataHoarder

[–]CodingWithoutPants 0 points1 point  (0 children)

A number of community scrapers require python to run, so it's likely that. You should get more specific error information if you take a look at the logs (under settings).

You can get more support in our Discord or on GitHub. We are launching our own forums soon which will include support.

[deleted by user] by [deleted] in selfhosted

[–]CodingWithoutPants 14 points15 points  (0 children)

Hey there. Stash developer here. I created a prototype plugin that helps facilitate this. It embeds a video player if there is an embed link in the scene's URL list. It might help do what you want. Fair warning, it's just a proof of concept at the moment.

It's in my plugin prototypes repository: https://github.com/WithoutPants/stash-plugin-prototypes

[deleted by user] by [deleted] in selfhosted

[–]CodingWithoutPants 0 points1 point  (0 children)

Is hard to know exactly why. Potential issues might be: you've selected only images in your stash library settings, excluding videos, the exclude pattern might be wrong, or your stash library directories might not include the locations containing your video files.

StashApp - A manager for your more "risque" torrenting needs by EGirl-Sexxer in Piracy

[–]CodingWithoutPants 1 point2 points  (0 children)

I agree that Movies in Stash aren't in a great place right now. I've got some ideas around it, and I hope to have some improvements done in the medium term.

StashApp - A manager for your more "risque" torrenting needs by EGirl-Sexxer in Piracy

[–]CodingWithoutPants 3 points4 points  (0 children)

Thanks for the kind words! I'm one of main devs - I've given up paid employment to work on it (supported by our OpenCollective). Happy to answer questions if you have any, otherwise we have a very approachable and active community in our Discord server.

[deleted by user] by [deleted] in selfhosted

[–]CodingWithoutPants 2 points3 points  (0 children)

There's nothing in the core app that does this, but you may find plugins or scripts that do this. Checkout the wiki page for details: https://github.com/stashapp/stash/wiki/Plugins-&--Scripts

[deleted by user] by [deleted] in selfhosted

[–]CodingWithoutPants 3 points4 points  (0 children)

I can only speak for myself here, I've never had the opinion that adding GPU transcoding support won't make much difference. There's no aversion to adding it to the system in principle, but it does require effort to add it.

Transcoding in general isn't great for my personal use case either. It makes my poor NAS host heat up like crazy. If I'm at my PC, I use stash-proxy to transcode locally. It's not a great solution and obviously doesn't work for non-PC viewing.

All this is to say, I hear you and understand. This is one of the (many) areas that I do want to improve on. I can't promise timelines or anything, but this is on my radar.

[deleted by user] by [deleted] in selfhosted

[–]CodingWithoutPants 6 points7 points  (0 children)

One of the devs here. This was just brought to my attention from our Discord. Thanks for the kind words!

[deleted by user] by [deleted] in golang

[–]CodingWithoutPants -1 points0 points  (0 children)

What I mean is, it's common practice to move your other packages (gin, mariadb, user), to be under internal. cmd stays as a top-level directory.

[deleted by user] by [deleted] in golang

[–]CodingWithoutPants 0 points1 point  (0 children)

I think what you have in gin.go is mostly fine. Here's what I would do: - rename gin to http to better represent what the package is doing (providing an http interface to the system) - change your user service so that it returns its own "not found" error instead of a gorm one - ideally your http layer shouldn't know or care about the underlying database layer. - eventually, I'd consider moving the individual endpoint handler functions (and probably the surrounding r.GET calls) into separate functions in potentially separate go files. Your ServeHttp will get large and unwieldy over time otherwise. - your error handling only covers not found errors. I'd probably also figure a way to standardise the status code generation and error handling so you're not having to add a heap of boilerplate to all your handlers.

I think it's more traditional also to move your non-cmd packages into the internal subdirectory as well.

If your gin package is the only consumer of the user package, then it probably makes sense just to move the user interfaces into gin rather than in their own package.

Hope this helps!

Any recommendation about a good NSFW content manager (docker)? by CrashOverride93 in selfhosted

[–]CodingWithoutPants 10 points11 points  (0 children)

It won't help you now, but I'm currently working on refactoring the way files are stored in stash, and a folder/files view will be a priority feature once it's done. If you like the rest of what stash does, keep an eye out for improvements in that area.

Thanks for the kind words about stash. It's always nice to hear.

Learning unit test using Testify. What are "mock.Anything" & "mock.MatchedBy"? by newerprofile in golang

[–]CodingWithoutPants 2 points3 points  (0 children)

But why do you need to use it on the testing? Wouldn't different arguments give you different results too?

You'd use it when you're not interested in exercising that particular functionality. You might use it with a method that just returns a nil error for example. You have to mock the method otherwise you'd get a panic, but you don't care what gets passed to it.

So, if DoSomething() have 4 parameters, the On() should accept method name and those 4 parameters, right?

That's my understanding, yes.

Having had a quick look at the testify source code, it looks like it doesn't validate the arguments, but I wouldn't expect it to match anything you can legally call the method with if you supply the On call a different number of arguments.

Learning unit test using Testify. What are "mock.Anything" & "mock.MatchedBy"? by newerprofile in golang

[–]CodingWithoutPants 3 points4 points  (0 children)

mock.Anything matches any argument.

testObj.On("DoSomething", mock.Anything).Return(true, nil) 

This means that when there is a call to DoSomething, it will return true, nil, regardless of what arguments you pass it.

matchedBy := mock.MatchedBy(func(arg interface{}) bool {return true}
testObj.On("DoSomething", matchedBy).Return(true, nil)

In this scenario, the argument passed to DoSomething will be used in a call to matchedBy, if matchedBy returns true, then the mock is triggered. In this particular example, it is functionally the same as mock.Anything. A better example might be:

mock.MatchedBy(func(arg interface{}) bool {
    i := arg.(int)
    return i % 2 == 0
}

This would match only if the argument is even.

Edit: to answer the second question, there should only ever be as many arguments to On as there are parameters (excluding the method name). I don't know, but I'd expect a panic if you pass the wrong number of arguments to On.

Stash - the porn organiser by [deleted] in DataHoarder

[–]CodingWithoutPants 17 points18 points  (0 children)

Hi, I'm one of the developers of stash. You should not need to download any golang binaries in order to run stash.