Custom command for external player in FreeTube

Is there a way to use my custom command for external player in freetube like

prime-run mpv --save-position-on-quit

Instead of just using mpv which is default in Freetube

Go to Settings > External Player Settings and select mpv. In Custom External Player Executable and add /usr/bin/prime-run /usr/bin/mpv --save-position-on-quit as the command.

Getting this error

Oh sorry there is a unnecessary space in the command posted before. Try now.

still getting the same error

You cant give space between two commands in Custom External Player Executable else it’ll give error

Without knowing anything about FreeTube - try encapsulating the entire command with quotes.

Or create an alias for it …

quotes thing doesnt work
and im already having alias but it is also not working :confused:

Perhaps a short shell script in your path? I think that is all I can think of :slight_smile:

Remember the arguments …

prime-run mpv "$@" --save-position-on-quit 

/usr/bin/prime-mpv is the script ive created containing prime-run mpv and then added –save-position-on-quit arguments
But this combo also didnt worked

I researched a little and the approach you are using is wrong. See mpv - ArchWiki on how to achieve hardware acceleration in mpv. Set “Custom External Player Executable” to blank and “Custom External Player Arguments” to --hwdec=auto --save-position-on-quit.

so will this execute the external player as prime-run mpv with –save-position-on-quite argument?

This executed the external player as

mpv --hwdec=auto --save-position-on-quit <link>

but i want prime-run mpv not mpv

Maybe try like this:

/usr/bin/sh -c "prime-run mpv --save-position-on-quit"

any script is not working cause the script processing in js
so ig ive to do some changes the file which is executing all these commnands
after some research i got the file in ~/.cache/yay/freetube/src/FreeTube-0.16.0-beta/src/renderer/components/ft-list-video/ft-list-video.js which is executing all the script → js file

That is from the cache/building/install of the program … in yays cache/build folder … that is not the file being executed.

ohh I got one github issue link where someone edited that ft-list-video.js file
i searched for this file using find and got it in that folder only

Well … you could theoretically edit that file during/before install.

But … maybe you are after (and I still dont know if this is the right direction…but owell…)

pacman -Ql freetube

Which should show you all the system files installed by the package.

Didnt get any interesting result from pacman -Ql freetube command :confused:

Once again I will mention I do not necessarily recognize this as the best approach, but … if you want to edit that file for your installation, then navigate there, make the edit, and rebuild it … example:

cd ~/.cache/yay/freetube/
## edit files using micro or nano or anything you choose
makepkg -sric

ohh after editing the file ive to execute makepkg -sric command
ill try this one but after taking backup of the original file

@arch It should work this way: