Page 2 of 2

Re: Feature Request: Flatpak for Linux

Posted: 03 Feb 2022, 18:22
by Razze
Yeah, as long as we don't want to do beta builds on flathub, that's fine, otherwise it might be wiser to use the portable version?

Re: Feature Request: Flatpak for Linux

Posted: 04 Feb 2022, 01:59
by rednoah
I'd stick to the stable release. I wouldn't bother with building a new flatpak for the latest beta every other day.

Re: Feature Request: Flatpak for Linux

Posted: 04 Feb 2022, 11:25
by Razze
I think that can be automated, but probably not worth it :)

Let's focus on testing the stable one.

Re: Feature Request: Flatpak for Linux

Posted: 13 Feb 2022, 23:53
by snarf3l
Looking forward to testing Razze's manifest on 4.9.5 stable when it comes out

Re: Feature Request: Flatpak for Linux

Posted: 22 Feb 2022, 17:32
by Razze
Updated to the latest version

Re: Feature Request: Flatpak for Linux

Posted: 11 Mar 2022, 03:34
by tydog98
Thoughts on putting it on Flathub?

Re: Feature Request: Flatpak for Linux

Posted: 13 Mar 2022, 03:44
by Razze

Re: Feature Request: Flatpak for Linux

Posted: 13 Mar 2022, 04:36
by tydog98
Oh sweet, can't wait 8-)

Re: Feature Request: Flatpak for Linux

Posted: 13 Mar 2022, 08:16
by rednoah
Razze wrote: 13 Mar 2022, 03:44 In progress https://github.com/flathub/flathub/pull/2899
Standard case would be appreciated, i.e. net.filebot.FileBot and not net.filebot.Filebot.

Re: Feature Request: Flatpak for Linux

Posted: 16 Mar 2022, 18:12
by snarf3l
Razze wrote: 13 Mar 2022, 03:44 In progress https://github.com/flathub/flathub/pull/2899
Thanks for your work! I downloaded and tried some tests, but am seeing some weirdness. When renaming my movie rip with a name like "Better Off Dead 1080.mp4" it is able to find the IMDB entry via TheMovieDB and says it'll rename it to "Better Off Dead... (1985)", but it gets renamed to ".xdp-Better Off Dead... (1985).mp4-(random 6 alphanumeric hash)"

For TV lookups it looks like the first three directories heavily influence name suggestions, even though none of the suggestions are correct. If I click skip it finds the correct names. For reference the file path is Home > Rips > (TV Show name ) > (episodes.avi) not /1000/doc/(hash)/(TV show)/(episodes.avi), so I'm not sure how it's getting that filepath

Image

OS is Fedora 35.

Re: Feature Request: Flatpak for Linux

Posted: 17 Mar 2022, 04:49
by rednoah
You'll want to enable full file system access. If you access files via the sandbox file access portal then the sandboxed FileBot process will only see some virtual file system entry, i.e. strange folders and strange file names, only good for reading a file, but useless for renaming or organizing files into a new folder structure. (i.e. what you see is how sandboxed application are supposed to work; and it works great for conceptually simple applications that just load or save individual files; but naturally ill-suited for FileBot)



:idea: In the SNAP package, we make things work normally by disabling GTK_USE_PORTAL and by installing with snap --devmode to enable full file system access:

Code: Select all

# disable file chooser sandboxing
export GTK_USE_PORTAL="0"

Re: Feature Request: Flatpak for Linux

Posted: 17 Mar 2022, 07:39
by snarf3l
rednoah wrote: 17 Mar 2022, 04:49 You'll want to enable full file system access.
Thanks, can confirm that did the trick. Ran

Code: Select all

sudo flatpak override net.filebot.FileBot  --filesystem=host 
which fixed the weird renaming issue for the movies I was doing by individual file selection. I never got .xdp names for TV shows by folder, so not sure why the .xdp-ing was limited, but it works now as intended so I'm happy to have this software working on Fedora and updates integrated through Flathub. :D

Edit: override also fixed the always first recommending 'Doc' based TV shows issue as well

Re: Feature Request: Flatpak for Linux

Posted: 17 Mar 2022, 08:52
by Razze
In general, I've exposed the download, videos and music folders by default for the flathub package.

You can easily add additional paths with a tool like FlatSeal https://flathub.org/apps/details/com.gi ... 4.Flatseal

Usually, if you can get around host or home permissions, you should.

Re: Feature Request: Flatpak for Linux

Posted: 17 Mar 2022, 12:58
by rednoah
If you're maintaining a custom filebot.sh file then you can probably simplify things:
* remove sanity checks (flatpak probably takes care of these things)
* remove JavaFX module path (not shipped in the flatpak anyway)
* FileBot 4.9.5 and higher accept -Dapplication.deployment=flatpak as deployment option, which if set, would allow FileBot to know it's running in a flatpak context, and print more appropriate error messages or user guidance. (e.g. tell users that FileBot is running in a confined sandbox if there are permissions issues)

Code: Select all

#!/bin/sh
FILEBOT_HOME="/app"

# select application data folder
APP_DATA="$XDG_CONFIG_HOME/filebot"
LIBRARY_PATH="$FILEBOT_HOME/lib/$(uname -m):/lib64"

java -Dapplication.deployment=flatpak -Dapplication.update=skip ...

Re: Feature Request: Flatpak for Linux

Posted: 18 Mar 2022, 17:59
by snarf3l
Razze wrote: 17 Mar 2022, 08:52 In general, I've exposed the download, videos and music folders by default for the flathub package.

You can easily add additional paths with a tool like FlatSeal https://flathub.org/apps/details/com.gi ... 4.Flatseal

Usually, if you can get around host or home permissions, you should.
Confirmed this was root cause by reset override:

Code: Select all

flatpak override --reset net.filebot.FileBot 
then moved my Rips directory directly off of Home to have Videos/Rips/.

Using the same steps to select by individual files I did last time I didn't get the .xdp renames this time around for movies nor the doc suggestion for TV when by folder.

I agree here that the error is on my part; the sandbox security should be the way you've set it rather than set to the entire host which is what would be 'needed' had I continued the malpractice of using Home/

Re: Feature Request: Flatpak for Linux

Posted: 30 Aug 2022, 17:29
by Razze
rednoah wrote: 17 Mar 2022, 12:58 If you're maintaining a custom filebot.sh file then you can probably simplify things:
* remove sanity checks (flatpak probably takes care of these things)
* remove JavaFX module path (not shipped in the flatpak anyway)
* FileBot 4.9.5 and higher accept -Dapplication.deployment=flatpak as deployment option, which if set, would allow FileBot to know it's running in a flatpak context, and print more appropriate error messages or user guidance. (e.g. tell users that FileBot is running in a confined sandbox if there are permissions issues)

Code: Select all

#!/bin/sh
FILEBOT_HOME="/app"

# select application data folder
APP_DATA="$XDG_CONFIG_HOME/filebot"
LIBRARY_PATH="$FILEBOT_HOME/lib/$(uname -m):/lib64"

java -Dapplication.deployment=flatpak -Dapplication.update=skip ...
Thanks, will be used after testing and merging https://github.com/flathub/net.filebot.FileBot/pull/1

I've also prepared this, which should create a new MR, when new updates show up https://github.com/flathub/net.filebot.FileBot/pull/2