Tuna

Tuna v1.9.7

univrsal

Member
1653348394200.png

I've got the basic rework for the formatting done. The options can now also be translated.
 

Takeshino

New Member
What limitation should the album art have?
It's just that it looks like that instead of grabbing the image from the song that is playing directly, the album + artist combo takes priority. So in other words, if I have a 500-strong album "1" with artists "A" to "Z", where every unique song has its own image embedded, I'd have the same image for every song under "1, A" etc. One of these combos has over 200 songs for example (cover artists), and it all ends up being whatever cover was loaded first.

Writing it this way you could say that I don't want it to act like an "Album art", but as "Song art" instead.
 

univrsal

Member
It's just that it looks like that instead of grabbing the image from the song that is playing directly, the album + artist combo takes priority. So in other words, if I have a 500-strong album "1" with artists "A" to "Z", where every unique song has its own image embedded, I'd have the same image for every song under "1, A" etc. One of these combos has over 200 songs for example (cover artists), and it all ends up being whatever cover was loaded first.

Writing it this way you could say that I don't want it to act like an "Album art", but as "Song art" instead.
If you're talking about the VLC source then that's out of my control. VLC caches the album art and then hands the file path to the cover to tuna.
 

univrsal

Member
universallp updated Tuna with a new update entry:

Format refactor

Completely overhauled the formatting system. Now uses full variable
names like {title} or {TITLE}. Added extra options for VLC since VLC
apparently uses a bunch of custom metadata types.

Also changed some things in the JSON representation of the song. It
should now contain all info that is available.

Fixed progress bar jumping around. The progress bar now smoothly moves
using the frame time and gradually speeds up or slows down if it is
behind/ahead of the actual song position.

Because...

Read the rest of this update entry...
 

ExoFury

New Member
Man you are awesome!!
With the new update I managed to get all the data i needed in the widget and a text file. In case you wanna know, this is what I did:

tuna 1.jpg
tuna 2.jpg


Thank you so much for all the support and involvement in developing this plugin! When I go live with my project I will credit the plugin :D
 

Emulanoob

New Member
Is Tuna compatible with "Aimp Player"? Saw alot of support in many players but searching in discussion didn't found anyone using Aimp like me! Would like to know if there's any possibility to support it or if works properly with it. Already tried using most various players with voicemeeter to solve the issues about songs in vod and found it in the Aimp the best support to make it works. Now really would like to find a good plugin to show the current song playing during live to viewers, found a temporary "workaround" but it leaves a great deal to be desired. Really would like to know about Tuna to solve my issues, thanks in advance!
 

univrsal

Member
Is Tuna compatible with "Aimp Player"? Saw alot of support in many players but searching in discussion didn't found anyone using Aimp like me! Would like to know if there's any possibility to support it or if works properly with it. Already tried using most various players with voicemeeter to solve the issues about songs in vod and found it in the Aimp the best support to make it works. Now really would like to find a good plugin to show the current song playing during live to viewers, found a temporary "workaround" but it leaves a great deal to be desired. Really would like to know about Tuna to solve my issues, thanks in advance!
AIMP isn't supported, but AIMP allows plugins to do what tuna does, e.g. https://www.aimp.ru/?do=catalog&rec_id=358.
 

ExoFury

New Member
That's pretty cool, do you stream game trailers?

Yes but not so much currently, just testing mostly. For the end project I wanna make it a 24/7 stream but still need to find a way to print the link in the text file on the stream chat (and print again everytime it changes/for each trailer) :D
 

MySmile

New Member
Hello, everyone!
Can't understand where the problem, I used 'Web Browser' source, with YouTube it's work, but cover img don't show up. Script work well here, and in Request img url shows clearly.
1655067638120.png
1655067781311.png


And with Yandex Music, it's stucked at string 50 and 132 which is:
50: xhr.send(JSON.stringify({data,hostname:window.location.hostname,date:Date.now()}));
132: post({ cover, title, artists, status, progress, duration, album_url });

The error is:
userscript.html?name=Tuna%2520browser%2520script.user.js&id=6dbfcb2d-c038-4e81-8a3a-bacf6390b403:50 Refused to connect to 'http://localhost:1608/' because it violates the following Content Security Policy directive: "connect-src 'self' music.yandex.ru yastatic.net mc.yandex.ru mc.yandex.ru mc.admetrica.ru *.strm.yandex.net mc.yandex.md 'self' blob: an.yandex.ru strm.yandex.ru *.strm.yandex.net verify.yandex.ru *.verify.yandex.ru mc.yandex.ru yandex.st yastatic.net matchid.adfox.yandex.ru adfox.yandex.ru ads.adfox.ru ads6.adfox.ru jstracer.yandex.ru yastat.net yandex.ru tps.doubleverify.com pixel.adsafeprotected.com amc.yandex.ru *.music.qa.yandex.ru *.music.yandex.ru *.yandex.net *.mt.yandex.ru api.passport.yandex.ru passport.yandex.ru content.adfox.ru an.yandex.ru ydx.iframe.tvzavr.ru wss://push.yandex.ru wss://push-sandbox.yandex.ru wss://ws-api.music.yandex.net yandex.st matchid.adfox.yandex.ru adfox.yandex.ru ads.adfox.ru ads6.adfox.ru jstracer.yandex.ru yastat.net yandex.ru epislon.ru strm.yandex.ru www.gstatic.com".

1655068539707.png
 

Attachments

  • 1655064617961.png
    1655064617961.png
    426 KB · Views: 16

frankiesimon

New Member
Thank you so much for this plugin, it's really great. Will there be a 1.7.0 .pkg release for MacOS? I could only get 1.6.0 from the GitHub page and the forum doesn't have it. Right now Spotify album covers don't seem to be picked up even though the token appears to be received correctly - but I'm not on the latest version so it's probably best to upgrade not to check it.

Also - I was wondering if there's a way to disable the placeholder image somehow. I would like to see downloaded cover art when there is anything that isn't a placeholder but to see nothing instead of the placeholder image. Is it stored somewhere where I can replace it with an empty image?
 

univrsal

Member
Hello, everyone!
Can't understand where the problem, I used 'Web Browser' source, with YouTube it's work, but cover img don't show up. Script work well here, and in Request img url shows clearly. View attachment 84124View attachment 84125

And with Yandex Music, it's stucked at string 50 and 132 which is:
50: xhr.send(JSON.stringify({data,hostname:window.location.hostname,date:Date.now()}));
132: post({ cover, title, artists, status, progress, duration, album_url });

The error is:
userscript.html?name=Tuna%2520browser%2520script.user.js&id=6dbfcb2d-c038-4e81-8a3a-bacf6390b403:50 Refused to connect to 'http://localhost:1608/' because it violates the following Content Security Policy directive: "connect-src 'self' music.yandex.ru yastatic.net mc.yandex.ru mc.yandex.ru mc.admetrica.ru *.strm.yandex.net mc.yandex.md 'self' blob: an.yandex.ru strm.yandex.ru *.strm.yandex.net verify.yandex.ru *.verify.yandex.ru mc.yandex.ru yandex.st yastatic.net matchid.adfox.yandex.ru adfox.yandex.ru ads.adfox.ru ads6.adfox.ru jstracer.yandex.ru yastat.net yandex.ru tps.doubleverify.com pixel.adsafeprotected.com amc.yandex.ru *.music.qa.yandex.ru *.music.yandex.ru *.yandex.net *.mt.yandex.ru api.passport.yandex.ru passport.yandex.ru content.adfox.ru an.yandex.ru ydx.iframe.tvzavr.ru wss://push.yandex.ru wss://push-sandbox.yandex.ru wss://ws-api.music.yandex.net yandex.st matchid.adfox.yandex.ru adfox.yandex.ru ads.adfox.ru ads6.adfox.ru jstracer.yandex.ru yastat.net yandex.ru epislon.ru strm.yandex.ru www.gstatic.com".

View attachment 84127
I've fixed the issue with the cover on youtube and will make a release. I don't have yandex music so I can't test the issues myself, but from what it looks like the website won't allow the script to connect to the plugin. I don't think there's much you can do about that, but web development is not really my expertise.
Thank you so much for this plugin, it's really great. Will there be a 1.7.0 .pkg release for MacOS? I could only get 1.6.0 from the GitHub page and the forum doesn't have it. Right now Spotify album covers don't seem to be picked up even though the token appears to be received correctly - but I'm not on the latest version so it's probably best to upgrade not to check it.
macOS isn't supported anymore and hasn't been for quite some time. If Apple didn't make it so difficult I'd maybe consider it again but as it stands now I don't intend on supporting macOS anymore.
Also - I was wondering if there's a way to disable the placeholder image somehow. I would like to see downloaded cover art when there is anything that isn't a placeholder but to see nothing instead of the placeholder image. Is it stored somewhere where I can replace it with an empty image?
How do I change the placeholder cover?
The placeholder image is saved under C:\Program Files\obs-studio\data\obs-plugins\tuna\placeholder.png or ~/.config/obs-studio/plugins/tuna/data/placeholder.png. It can be replaced with a transparent png if you don't want anything to show when nothing is playing.
 

ExoFury

New Member
With the new update, I'm having some trouble with loading the covers with the VLC source. While before the update everything worked well, now they randomly don't load and show the placeholder instead. I cannot seem to determine a pattern or reason. OBS log looks fine and so does the JSON console. The cover exported in the song cover path, in most cases, is also the placeholder.

Things I tried and noticed:

- I deleted all cached covers from AppData\Roaming\vlc\art
- After I delete the covers I sometimes get this in OBS log:
20:44:13.503: [tuna] Couldn't fetch file from file:///C:/Users/Claudiu/AppData/Roaming/vlc/art/artistalbum/Big%20Ambitions/Official%20Trailer/art.png to D:/ExoFury/Projects/game trailers and teasers/cover.png.tmp, curl error: Couldn't read a file:// file (37)
- Despite the error above, the cover for that media file loads fine (until it plays again some time after and on a random play time it does not show anymore)
- I mentioned random because on the same file it may load the cover on the first play, load on the next one, fail to load on the third and then load again on the fourth, and so on..
- I noticed that sometimes while the cover is not loaded by the widget it does show up correctly in JSON and song cover path
- If it does the thing above, when I pause then the cover in JSON and song cover path show the placeholder and when I press play again, it changes to the correct cover but it does not refresh in the widget too
- Another thing I noticed is that the more I let the playlist run the more frequent this thing is happening.
- I don't think it is related but I noticed that the setting "Search for missing covers on itunes.apple.com with size" does not save on OBS exit. I unchecked and when I opened OBS it was checked again.

fetch cover.jpg
 

univrsal

Member
With the new update, I'm having some trouble with loading the covers with the VLC source. While before the update everything worked well, now they randomly don't load and show the placeholder instead. I cannot seem to determine a pattern or reason. OBS log looks fine and so does the JSON console. The cover exported in the song cover path, in most cases, is also the placeholder.

Things I tried and noticed:

- I deleted all cached covers from AppData\Roaming\vlc\art
- After I delete the covers I sometimes get this in OBS log:
20:44:13.503: [tuna] Couldn't fetch file from file:///C:/Users/Claudiu/AppData/Roaming/vlc/art/artistalbum/Big%20Ambitions/Official%20Trailer/art.png to D:/ExoFury/Projects/game trailers and teasers/cover.png.tmp, curl error: Couldn't read a file:// file (37)
- Despite the error above, the cover for that media file loads fine (until it plays again some time after and on a random play time it does not show anymore)
- I mentioned random because on the same file it may load the cover on the first play, load on the next one, fail to load on the third and then load again on the fourth, and so on..
- I noticed that sometimes while the cover is not loaded by the widget it does show up correctly in JSON and song cover path
- If it does the thing above, when I pause then the cover in JSON and song cover path show the placeholder and when I press play again, it changes to the correct cover but it does not refresh in the widget too
- Another thing I noticed is that the more I let the playlist run the more frequent this thing is happening.
- I don't think it is related but I noticed that the setting "Search for missing covers on itunes.apple.com with size" does not save on OBS exit. I unchecked and when I opened OBS it was checked again.

View attachment 84200
Can you try the latest nightly build? https://github.com/univrsal/tuna/actions/runs/2495429170
You have to log into github to download it
 

ExoFury

New Member
Can you try the latest nightly build? https://github.com/univrsal/tuna/actions/runs/2495429170
You have to log into github to download it

Been playing with it the whole day and got kinda the same result. Works well for a while then after some time covers don't get loaded. The more I let it run, the more often it happens (from once every 30 files to once every 2 files played).

I can confirm the following behavior tho:
- File plays, widget does not have the cover loaded
- JSON and song cover path DO have the correct cover while file is playing tho
- If I pause, those two are replaced with the placeholder
- When I press play, the correct cover is fetched again, but not in the widget
- When file plays and has the placeholder cover, if I refresh the widget then the correct one is displayed
- Considering these, I guess there is a delay in fetching the cover when play starts and while it does fetch it eventually, it does not update
- I've considered doing a JS refresh on the widget but it loads all the values and displays the default ones for a second on each refresh
- It seems to happen more often when its idle and when I surf thru the playlist I find the occurrence very rare
- Tried setting the refresh rate in Tuna settings to 1000ms and maybe its just a coincidence but it helped for just a while (like 1h and then the covers started not loading again)
 

univrsal

Member
Been playing with it the whole day and got kinda the same result. Works well for a while then after some time covers don't get loaded. The more I let it run, the more often it happens (from once every 30 files to once every 2 files played).

I can confirm the following behavior tho:
- File plays, widget does not have the cover loaded
- JSON and song cover path DO have the correct cover while file is playing tho
- If I pause, those two are replaced with the placeholder
- When I press play, the correct cover is fetched again, but not in the widget
- When file plays and has the placeholder cover, if I refresh the widget then the correct one is displayed
- Considering these, I guess there is a delay in fetching the cover when play starts and while it does fetch it eventually, it does not update
- I've considered doing a JS refresh on the widget but it loads all the values and displays the default ones for a second on each refresh
- It seems to happen more often when its idle and when I surf thru the playlist I find the occurrence very rare
- Tried setting the refresh rate in Tuna settings to 1000ms and maybe its just a coincidence but it helped for just a while (like 1h and then the covers started not loading again)
It seems like the browser widget is caching the album art. Can you try the latest nightly and see if it changes anything. I didn't have any issues anymore, but I didn't test it extensively
 

ExoFury

New Member
It seems like the browser widget is caching the album art. Can you try the latest nightly and see if it changes anything. I didn't have any issues anymore, but I didn't test it extensively

Been running it all day. All fine in the beggining then after 1-2h it started doing it. This time I also noticed that sometimes it was the cover from the last media instead of the placeholder but this happened very rarely.
I noticed there was a thing in the widget javascript to prevent caching.. the number string added to cover paths.. shoudn't that prevent the caching? Or that is something else?
I'm starting to think that maybe is something on my end... should I try to rollback to a previous version where I remember it working fine and see how it goes?
 

univrsal

Member
Been running it all day. All fine in the beggining then after 1-2h it started doing it. This time I also noticed that sometimes it was the cover from the last media instead of the placeholder but this happened very rarely.
I noticed there was a thing in the widget javascript to prevent caching.. the number string added to cover paths.. shoudn't that prevent the caching? Or that is something else?
I'm starting to think that maybe is something on my end... should I try to rollback to a previous version where I remember it working fine and see how it goes?
Sure, if you're using your own widget you might want to try the one on github I changed some things since the last release
 

ExoFury

New Member
Sure, if you're using your own widget you might want to try the one on github I changed some things since the last release

The one in the latest nightly build? I'm actualy using a bit modified widget from the 1.6.1 version i believe. Will try the latest one and see how it goes before trying a rollback
 

Skillybelly

New Member
Hello there,
Thanks for this great plugin. But once i'm clicking login so it redirect me and i get this message,
INVALID_CLIENT: Invalid redirect URI. Any thoughts?
 
Top