Eole-foobar-theme icon indicating copy to clipboard operation
Eole-foobar-theme copied to clipboard

I can't open cover in it full size, it doesn't do anything

Open pityalvarez opened this issue 3 years ago • 3 comments

image

pityalvarez avatar Jan 14 '22 16:01 pityalvarez

Same issue with 1.2.3b21.

darkj2k avatar Aug 30 '22 03:08 darkj2k

Which version of windows? It works on my computer, but it's not surprise that it doesn't work for everyone. The problematic code is below, can you try it in a separate panel and give me the error thrown? A file needs to be currently playing, otherwise it will throw an error which just mean "nothing is playing"

var img = utils.GetAlbumArtV2(fb.GetNowPlaying(), 0, false);
var filepath = fb.ProfilePath+"\\original_size.jpg";
img.SaveAs(filepath, "image/jpeg");
var WshShell = new ActiveXObject("WScript.Shell");		
WshShell.Run("\"" + filepath + "\"", 0);	

PS: In case someone passing by knows a more robust approach to open a jpg file, Ii would be helpful there 🙏

Ottodix avatar Aug 30 '22 07:08 Ottodix

Which version of windows? It works on my computer, but it's not surprise that it doesn't work for everyone. The problematic code is below, can you try it in a separate panel and give me the error thrown? A file needs to be currently playing, otherwise it will throw an error which just mean "nothing is playing"

var img = utils.GetAlbumArtV2(fb.GetNowPlaying(), 0, false);
var filepath = fb.ProfilePath+"\\original_size.jpg";
img.SaveAs(filepath, "image/jpeg");
var WshShell = new ActiveXObject("WScript.Shell");		
WshShell.Run("\"" + filepath + "\"", 0);	

PS: In case someone passing by knows a more robust approach to open a jpg file, Ii would be helpful there 🙏

Windows 11. Sorry I don't know how to do that. maybe you can give me the modified file to replace current one for testing.

For now in settings I check double clicks action for open cover in its full/original size. But it just play or pause when double clicks it. Also nothing display in console when double clicks.

darkj2k avatar Sep 21 '22 03:09 darkj2k

You can do it by doing so:

  1. Start foobar, play any song you want, make sure to choose a song with an associated cover. Then pause playback while you are doing the next steps.
  2. rename the file WSHcoverpanel.js to WSHcoverpanelBAK.js
  3. create a new WSHcoverpanel.js
  4. inside this file, paste the provided code
  5. Hold shift, right-clic the little cover at the bottom-left corner, choose Reload.

Then hopefully you will see an error message. On my computer, it opens the cover in its original size like it should.

Later, in order to get back the right code, you can delete this new WSHcoverpanel.js and rename WSHcoverpanelBAK.js back to WSHcoverpanel.js

Ottodix avatar Sep 24 '22 09:09 Ottodix

You can do it by doing so:

By your guideline after choose "Reload: I just got following in console: Spider Monkey Panel v1.6.1 (CoverPanel: CoverPanel v1.2.3b21 by Ottodix): initialized in 186 ms

darkj2k avatar Sep 25 '22 03:09 darkj2k

Okey, fuck, it means that it didn't trigger any error, and it didn't work neither. As I don't have windows 11, I'll ask on foobar forum

Ottodix avatar Sep 25 '22 10:09 Ottodix

Marc2k3 said: "It's entirely up to each user to set a default app for opening jpg (or any other) files. On clean installs, the user is usually prompted the first time they try and open a file from Explorer. Once that is done, the script should succeed."

Ottodix avatar Sep 25 '22 11:09 Ottodix

Ok, I just tried to test this "solution", and i guess it doesn't explain your issue. Just to confirm, can you try to go to your foobar profile directory after executing the script, in order to ensure that double-clicking original_size.jpg works and opens a picture viewer with the cover?

Ottodix avatar Sep 25 '22 17:09 Ottodix

Actually I just clean installed Windows 11 22H2 two days ago and had .jpg open with IrfanView by default (my default picture viewer). Double clicks any .jpg will open by IrfanView has no problem. Tested by your guideline with clean portable installation of foorbar2000 1.6.2 and 2.0B10(x86) all came with same result which as you said no error has been trigger.

Let me know if there anything I can do for this issue.

darkj2k avatar Sep 26 '22 04:09 darkj2k

Hi, Can you try again the test script i provided 2 days ago But replace WshShell.Run("\"" + filepath + "\"", 0);

with WshShell.Run("\"" + filepath + "\"");

The only difference is the last argument which have been removed, the zero.

EDIT: And if it works, then the issue is fixed with my latest commit. Only one file updated, JStheme_common.js https://github.com/Ottodix/Eole-foobar-theme/commit/d5012b8386d8b369c65008f374d170694d6ce6fc

Ottodix avatar Sep 26 '22 08:09 Ottodix

I just replace the JStheme_common.js with your latest commit and it... WORKS. :-) Thanks sooo much.

foobar

Just one small issue. if set the cover button to play/pause, it will play/pause first then show the full size cover art after double clicks it. Now I change the cover button to "show now playing" to avoid this play/pause issue.

darkj2k avatar Sep 26 '22 15:09 darkj2k

Ah yep, double-clic action and play/pause are kind of incompatible. But well, I like this play/pause button there, I don't want to remove it

Ottodix avatar Sep 26 '22 15:09 Ottodix