flowtsohg / youtube-song-names-for-obs

Display currently playing YouTube videos on OBS.
MIT License
3 stars 2 forks source link

Download prompt on Linux #4

Open Eviber opened 3 years ago

Eviber commented 3 years ago

Hi,

There seems to be an issue on Linux where I get a download prompt when currentsong.txt is updated. I'm using Firefox 94.0, please tell if there's any more info you need.

Thanks! :sparkles:

flowtsohg commented 2 years ago

I find it odd someone is using this 4 years later, and that it still even functions :P

I suppose that the saveAs option when downloading is required to explicitly be false rather than omitting it as I do, or otherwise the browser listens to your general settings.

To quote from MDN: If this option is omitted, the browser will show the file chooser or not based on the general user preference for this behavior (in Firefox this preference is labeled "Always ask you where to save files" in about:preferences, or browser.download.useDownloadDir in about:config).

Would you be interested in trying to run the addon directly in debug mode and change the download line to test this? I don't know your settings, and I don't have Linux around to test on, but I don't think the OS should matter for this issue.

For reference, I am talking about this line https://github.com/flowtsohg/youtube-song-names-for-obs/blob/master/background.js#L48 which should (probably) be:

chrome.downloads.download({url: stringToUrl(formatted), filename: 'currentsong.txt', conflictAction: 'overwrite', saveAs: false}, (downloadId) => {
  ...
}