Latest WACUP public preview for x86 & x64 is build #20202 (September 28th 2024) (x86 & x64 changelogs)
Latest restricted WACUP beta release is build #20202 (September 28th 2024) (x86 & x64 changelogs)


NOTE: Beta testers are added in a limited & subjective manner as I can only support so many people as part of the beta test program to keep it useful for my needs.

Unless I think you're going to be helpful, not all requests will be accepted but might still be later on. Remember that beta testing is to help me & the limitations currently works for my needs for this project.

Author Topic: SMTC not using album artist  (Read 2765 times)

yuunarii

  • Jr. Member
  • **
  • Posts: 5
    • View Profile
SMTC not using album artist
« on: January 19, 2024, 10:45:58 AM »
Hello there!!

I recently was suggested to check out Wacup, after struggling with getting this SMTC plugin: https://github.com/NanMetal/gen_smtc to work properly with Winamp. The problem with this first plugin was that it apparently used the artist info in place of the AlbumArtist. I figured out the pieces of code I had to edit/add to change it, but I'm not that tech savvy, so I didn't quite know how to compile the raw code back into a plugin.

I was super happy to see Wacup came with build-in SMTC capabilities. However when I tried using it, I ran into the same issue. The AlbumArtist was using the same value as Artist. Because I don't have access to the raw code this time, I can't check if this plugin has the same quirk as the original Winamp plugin I used. If it does, I'd be very thankful if this could be changed!!

For some context, a lot of songs I listen to are from albums that have a variety of artists working on under the same album artist group name. Hence why I'd prefer to be able to display the Album Artist.

Thank you very much in advance!!  :)

dro

  • Admin / WACUP Developer
  • Administrator
  • Hero Member
  • *****
  • Posts: 4753
    • View Profile
    • WACUP (Winamp Community Update Project)
Re: SMTC not using album artist
« Reply #1 on: January 19, 2024, 12:02:16 PM »
Are the files being played in the local library ? If so then that will usually return artist for albumartist if it's not specifically set in the file metadata & for some of the cases with it not being in the local library db, the handling might emulate that behaviour when the files are directly queried.

As WACUP's local library plug-in follows that behaviour for compatibility vs expectations with Winamp's local library plug-in though it can be disabled (preferences -> media library -> local library -> uncheck 'Use Artist for Album Artist if not available when reading metadata' but it'll then require a refresh of all of the local library metadata & might cause other things to not work in an expected manner for filter / album related groupings.

Before even doing that, just double-checking what metadata might be in the local library db for the albumartist value &/or the file directly would be the best starting point to make sure it's not actually working as intended vs the data that's available to the plug-in requests.

WACUP's SMTC handling is using the albumartist field that the local library (or the direct file handling if not in the local library db) record returns & doesn't have any context to work with to adjust things (per my blurb above). From a quick look at that repository it seems to have no context of albumartist & just sets song.artist for both artist & albumartist fields.

-dro

yuunarii

  • Jr. Member
  • **
  • Posts: 5
    • View Profile
Re: SMTC not using album artist
« Reply #2 on: January 19, 2024, 02:26:47 PM »
Thank you for responding so quickly!!
All songs are played from a local winamp/wacup playlist. So I'm assuming that falls under local library? The songs in questions all possess album artist meta data tags.

I tried disabling the "artist for album artist" and also refreshing the cached playlist details. No luck sadly. It still displays the artist in the application I use (the application is set to use the albumartist).

The albumartist displays just fine in the title details (I adjusted the title formatting to be [%albumartist% - ]$if2(%title%,$filepart(%filename%))), so I'd like to assume the local library is able to read that value.

Ahhh that explains it!! I ran into the exact same stuff when using NanMetal's plugin for winamp. It didn't fetch any AlbumArtist data, and instead used Artist as replacement. I'm assuming we're looking at the same files, so I attached some screenshots of code with highlighted bits where I changed/added some stuff. (First 2 attachments are in winamp.cs, 3rd attachment is in SystemMediaTransportControl.cs).
Unfortunately I don't know enough about Winamp to compile the code into a plugin, so I wasn't able to test it.

dro

  • Admin / WACUP Developer
  • Administrator
  • Hero Member
  • *****
  • Posts: 4753
    • View Profile
    • WACUP (Winamp Community Update Project)
Re: SMTC not using album artist
« Reply #3 on: January 19, 2024, 03:31:08 PM »
The playlists aren't the same as the local library. The local library is the part within the media library window & the local library node / sub-nodes shown within that & it's within the options for it where metadata refreshing can be triggered assuming you've either added files into it or have it set to add what's been played automatically (default behaviour).

If you're getting the expected %albumartist% back for playing metadata then wacup's plug-in (which is cppwinrt based & not c# based like the one you've mentioned) should also be getting that too as it's handled via the same internal api calls to get file related metadata. So if the title reading is working, the plug-in should work & right now I don't see why it'd not be working (I've yet to check back over the past 3 months of dev work to make sure it's not down to something else being wrong) since as long as I get an albumartist string back I set it on the MusicDisplayProperties object.

How are you checking that it's showing the wrong albumartist? As I don't see it exposed in the Win10 ui.

-dro

yuunarii

  • Jr. Member
  • **
  • Posts: 5
    • View Profile
Re: SMTC not using album artist
« Reply #4 on: January 19, 2024, 04:11:13 PM »
Ah I see. So would it be better to store all songs in the local library, and create playlists from there? What I normally do is just drag songs directly from my PC into a playlist, without loading them into Winamp's library.

There's not really a way for me to properly test it outside of trial and error. I primarily am trying to use a python script to display songs that are currently playing in Winamp/Wacup. By default the script uses artist, but I managed to change it to album_artist, without it breaking. Initially I thought the issue might have been with the python script, as it wasn't recognizing "albumartist" and kept crashing. Later I found out that you're supposed to use album_artist. That works.
If you wish to check it for yourself, it's the VRCplayingnow.py script made by this person: https://github.com/cyberkitsune/vrc-osc-scripts
I think the script uses something called asyncio in order to get the media info. Here's the post I used for info on that: https://stackoverflow.com/questions/65011660/how-can-i-get-the-title-of-the-currently-playing-media-in-windows-10-with-python

I just assumed because the script still runs properly, and the other meta data (title) is displayed correctly, that the issue may lay with the SMTC plugin. Again apologies for my ignorance!! I'm not very familiar with this sort of stuff. I kinda had hoped it would have been as easy as just changing "artist" to "albumartist" haha.

dro

  • Admin / WACUP Developer
  • Administrator
  • Hero Member
  • *****
  • Posts: 4753
    • View Profile
    • WACUP (Winamp Community Update Project)
Re: SMTC not using album artist
« Reply #5 on: January 19, 2024, 05:29:38 PM »
As long as the files playing have the metadata then it doesn't really matter. The local library acts like a cache so it makes getting the metadata faster but for wacup I've also tried to do things unlike with winamp so it'll do caching of the metadata requests for direct reads to avoid performance hits against that.

The main reason for asking where the files might be handled is because the metadata cached in the local library db is what will be used over the file's & changing read settings may not always cause that metadata cache to be refreshed without manual intervention (something that the beta does a bit better than the current preview build you're using).

From what you're trying to use, as long as the scripts are querying the right things then I don't think there's anything I can really do as my code is setting all of the values it can & then I don't have anything else to do with it until the next song related update that's needed.

For the other plug-in, what you posted is probably what's needed to get it to send the information but you then need to get it to build with those changes. Also from a quick look at the python script, like you say it doesn't even look for albumartist (just artist, title & playback position if I'm reading it correctly) & if I had any inkling of python scripting I'd try to check what values are being held in the current_media_info[] object to inspect what it is holding from the smtc api.

-dro

yuunarii

  • Jr. Member
  • **
  • Posts: 5
    • View Profile
Re: SMTC not using album artist
« Reply #6 on: January 19, 2024, 06:01:40 PM »
Ah alright that's good to know!!

Ah alright then!! If your code is outputting the albumartist tag just fine on your end, then it indeed must be something within the python script that's going wrong.

And yep the original python script doesn't have anything albumartist related. I tried replacing all instances where "artist" is used with "album_artist", which luckily does keep the script functional. But like I mentioned, it still will display the artist value. I really have no clue why.

If it's any help to you, apparently the python script uses the winsdk library to build. According to the Stackoverflow post, the current_media_info[] object holds the following values (see attachment). I'm personally not familiar with python either.

Do you recommend I reach out to the python script author instead about this issue?

dro

  • Admin / WACUP Developer
  • Administrator
  • Hero Member
  • *****
  • Posts: 4753
    • View Profile
    • WACUP (Winamp Community Update Project)
Re: SMTC not using album artist
« Reply #7 on: January 23, 2024, 12:57:27 AM »
It might be better to ask them assuming they're active vs me trying to have a go eventually at some point plus python isn't something I can try to get into at this time with everything else I need to get done.

-dro

yuunarii

  • Jr. Member
  • **
  • Posts: 5
    • View Profile
Re: SMTC not using album artist
« Reply #8 on: January 23, 2024, 12:53:56 PM »
Oh no worries!! I don't expect you to start fiddling with a script in a language you're not familiar with!! Was more just wanting to confirm that everything works properly on the Wacup end, so that it's clear the issue is on the python script end.
In that case I'll be sure to take all this info to the dev of the script in question.

Thank you so much for taking the time to look at this issue, I really appreciate it!!