Feature Request: Flatpak for Linux

All your suggestions, requests and ideas for future development
Razze
Posts: 12
Joined: 26 Aug 2015, 20:26

Re: Feature Request: Flatpak for Linux

Post 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?
User avatar
rednoah
The Source
Posts: 20924
Joined: 16 Nov 2011, 08:59

Re: Feature Request: Flatpak for Linux

Post 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.
:idea: Please read the FAQ and How to Request Help.
Razze
Posts: 12
Joined: 26 Aug 2015, 20:26

Re: Feature Request: Flatpak for Linux

Post by Razze »

I think that can be automated, but probably not worth it :)

Let's focus on testing the stable one.
snarf3l
Posts: 6
Joined: 29 Dec 2021, 20:27

Re: Feature Request: Flatpak for Linux

Post by snarf3l »

Looking forward to testing Razze's manifest on 4.9.5 stable when it comes out
Razze
Posts: 12
Joined: 26 Aug 2015, 20:26

Re: Feature Request: Flatpak for Linux

Post by Razze »

Updated to the latest version
tydog98
Posts: 12
Joined: 03 Nov 2021, 14:40

Re: Feature Request: Flatpak for Linux

Post by tydog98 »

Thoughts on putting it on Flathub?
tydog98
Posts: 12
Joined: 03 Nov 2021, 14:40

Re: Feature Request: Flatpak for Linux

Post by tydog98 »

Oh sweet, can't wait 8-)
User avatar
rednoah
The Source
Posts: 20924
Joined: 16 Nov 2011, 08:59

Re: Feature Request: Flatpak for Linux

Post 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.
:idea: Please read the FAQ and How to Request Help.
snarf3l
Posts: 6
Joined: 29 Dec 2021, 20:27

Re: Feature Request: Flatpak for Linux

Post 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.
User avatar
rednoah
The Source
Posts: 20924
Joined: 16 Nov 2011, 08:59

Re: Feature Request: Flatpak for Linux

Post 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"
:idea: Please read the FAQ and How to Request Help.
snarf3l
Posts: 6
Joined: 29 Dec 2021, 20:27

Re: Feature Request: Flatpak for Linux

Post 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
Razze
Posts: 12
Joined: 26 Aug 2015, 20:26

Re: Feature Request: Flatpak for Linux

Post 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.
User avatar
rednoah
The Source
Posts: 20924
Joined: 16 Nov 2011, 08:59

Re: Feature Request: Flatpak for Linux

Post 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 ...
:idea: Please read the FAQ and How to Request Help.
snarf3l
Posts: 6
Joined: 29 Dec 2021, 20:27

Re: Feature Request: Flatpak for Linux

Post 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/
Post Reply