Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Blacklisting certain tracks from presence detection #62

Open
1 task done
mynnshaw opened this issue Oct 21, 2024 · 6 comments
Open
1 task done

Blacklisting certain tracks from presence detection #62

mynnshaw opened this issue Oct 21, 2024 · 6 comments
Labels
enhancement New feature or request needs media processing pipeline This needs a rework of how media is processed internally needs settings window This feature needs a settings window

Comments

@mynnshaw
Copy link

Is there an existing issue for this?

  • I have searched the existing issues

Describe the problem

Adding onto a previous conversation into the Discord Server about adding a status to the Discord bot that reads from other users, it was proposed that the status would be dropped if the user stopped listening, in the case of playing an unwanted track, etc.

Where this issue comes in is trying to prevent this in the first place. There could be users who listen to specific artists with perhaps controversial backgrounds who want to hide their listening history. With platforms like Spotify, they offer a Private Listening session feature which may not broadcast what you're listening to, but not only is this a hassle and an inconvenience to turn on/off repeatedly for some users, this kind of thing doesn't exist on some offline players right now.

There are also some users (like myself) may be producers and use players such as foobar2000 or MusicBee to listen to our creations. It could be a variety of reasons such as ensuring quality, compiling tracklists, adding metadata, etc. However sometimes, the song can be played and we may accidently leak the title of a song, or a new album, etc. That could easily be prevented if we just didn't show the album playing at all.

Solution

Adding a blacklist feature to Music Presence could solve the above. I would imagine that it allows hiding specific song titles (while also requiring the artist; you wouldn't want to block "Blinding Lights" by The Weeknd but maybe you want to block "Blinding Lights" by Controversial Artist) or even specific albums.

I could see this working two ways, whatever is more convenient is better.

  1. Artist, Title, and Album are all blacklisted individually. This might be problematic if you want to only block the name of an album by one artist (only block "Cool Album" by "Cool Dude"), however it's simpler than requiring extra details.
  2. Perhaps requiring both an artist and title could also be viable. Optionally, allow the user to also add the album name if needed. This could be problematic if all you want to do is block the entirety of an artist or just the entirety of one album by an artist, but perhaps this could be tweaked.

Ideally, when the blacklist detects the currently playing song is blacklisted, I would quite obviously expect it to maybe... just not trigger the status at all. If this is not viable, an ugly hack to consider might be just simply reading "Cannot display". Self explanitory.

I'm open to tweaking my mockup idea.

Alternatives

Obviously, when it comes to foobar2000, you could use a plugin that supports title query to hide the currently playing song. However, this is not implemented in foo_discord_rich yet, so you would have to do some pretty ugly hacks to hide specific tracks. Alternatively, a foobar2000 component could be made from scratch to feed title query to foobar2000, but this would require extra setup for users just to simply blacklist certain songs from appearing on their Music Presence status.

On streaming services, there's very little alternatives apart from the "private session" feature that some services may have. As far as I know, this is a feature on Spotify, however turning it on and off when trying to blacklist a single artist is an inconvenience at best, and at worst it may not do anything at all since Music Presence reads from media control API.

Additional context

The only thing that could possibly hinder the addition of this is that some players do not display the playing album on Music Presence due to limitations, so blacklisting albums on those players would not work and it could prove to be an issue when blocking only a specific version of a track (if you really want to do that).

If you decide to go the component route for foobar2000, this is what a title query looks like in settings. This one's from the foo_scrobble 1.6 component:
image

@mynnshaw mynnshaw added the enhancement New feature or request label Oct 21, 2024
@ungive ungive moved this to Todo in Music Presence Oct 21, 2024
@ungive
Copy link
Owner

ungive commented Oct 21, 2024

Thanks for the elaborate write-up!

I'll definitely add something like this, but it will require a settings window which I'll have to work on first. But the possibility to blacklist certain artists/songs/album for peace of mind would be a good addition, yeah. Personally I wouldn't use it, but for producers that can definitely spare you some headaches.

The only thing that could possibly hinder the addition of this is that some players do not display the playing album on Music Presence due to limitations, so blacklisting albums on those players would not work and it could prove to be an issue when blocking only a specific version of a track (if you really want to do that).

I see that also becoming an issue when you want to block an album but the player does not report the album, which means it "slips through" and is shared/shown in your status anyway.

I'd suggest these options for blacklisting:

  • Artist only (everything from this artist)
  • Artist + song title (a specific song from an artist)
  • Artist + album name (a whole album from an artist)

I don't think it makes sense to ever block songs that have a specific title or a specific album name only, they should always be associated with the artist.

Another thought would be to "censor" specific parts of the metadata e.g. share the song but without the artist or with a replaced artist name. That's more work though and I don't see too much use for it when you can just either change the metadata in your media file or not share it at all. Let me know what you think!

I'll keep this in mind for the settings window when I work on it. Until then I'll put it on the waiting list, I don't think this is too pressing of an issue right now.

@ungive ungive added the needs settings window This feature needs a settings window label Oct 21, 2024
@ungive ungive mentioned this issue Oct 21, 2024
1 task
@mynnshaw
Copy link
Author

mynnshaw commented Oct 21, 2024

Thanks for the elaborate write-up!

Thank you! I wanted to clarify and note all the possible bumps that could be handled when implimenting this, so I made sure to outline them best I could!

The three options you've chosen for blacklisting is definitely more than enough and was what I had in mind. Blocking a song title/album title without adding an artist to it first is definitely silly and something I didn't think about, I was writing this issue when I was about to log off for the night so that might have something to do with it lol. That was under the assumption that the album title would be unique enough to not be flagged by other artists, but obviously the Blinding Lights by The Weeknd vs Other Artist debate applies here too, so maybe force an artist to be specified always like you said.

Another thought would be to "censor" specific parts of the metadata e.g. share the song but without the artist or with a replaced artist name. That's more work though and I don't see too much use for it when you can just either change the metadata in your media file or not share it at all.

This is an interesting approach to the problem! This could be helpful in cases with obscene song titles perhaps, or maybe in the case that you can just censor the song/album name if only one of the two hasn't been revealed yet, but I would honestly prefer just having it not show at all. This would be a cool alternative though!
I can see it's usage, but for what I was thinking of, at that point I would rather just mess with the metadata than put a fake artist/title/album over it and just cloak the song metadata myself. Which is probably something that I could do myself.

I definitely agree with a lot of this though, I look forward to seeing how it may work out and I should be free for testing some time if you would like me to test the feature in the near future :P

I think I can live a little longer without this feature since I don't really listen to my own tracks that often, but when implemented, this feature could help a lot of headaches and possibly also be a good safety net for some!

Edit: borked formatting, oops lol

@mynnshaw
Copy link
Author

I also just realized that the album artist vs artist tag headache might also be something of note. I tag my own releases in a way that the album artist is the correct artist and the artist tag is a list of all featured producers. This may be a minor problem which is likely less impactful for streaming services that can use their respective APIs (or MB ofc, lol), but might be a problem for local releases & unofficial mixtapes not on MusicBrainz yet.

@ungive
Copy link
Owner

ungive commented Oct 22, 2024

One could check if the artist field "contains" the artist you specified, instead of checking for direct matches. But that could get problematic with short artist names, like an artist called Lana could match for Lana Del Rey. One could split by separators, like ",", "&", "feat." but that's tricky.

Another idea I have is to block songs differently by following these steps:

  • Go to the settings
  • Click on "Record songs to block"
  • See a hint pop up "Recording... Play some songs that you want to blacklist for your status. During recording your presence is disabled."
  • Now it records what youre playing and you just play those songs you don't want in your status (note that with recording I mean only recording the song metadata)
  • The songs appear in a list while you're recording and you can remove them again if you want to
  • Per recorded song you can also tick a checkbox that says "blacklist entire album", but thats only available when the media player reports the album

This method has many benefits:

  • You get immediate feedback that this song that is recorded will be blocked. Seeing it appear and showing that it will be block invokes a lot more confidence that it will actually be blocked, compared to when you write down text and you have to hope it works
  • You don't need to write anything down or copy paste song names and artist names
  • The UI gets a lot simpler, the algorithm is a lot simpler and less error-prone and the settings entry in settings.json is not as complex as it would have to be with entering text to match

There's a problem with blacklisting multiple songs in one go though: You don't get the confidence that it will actually be blocked, compared to when you "record" it as described above.

For that reason I propose to only allow blocking individual songs. I reckon you won't block like 20 songs at once, right? It can always be extended though if the need arises by adding a checkbox like "Block entire album". But such an option can trip really quickly, e.g.

  • I recorded the song "Song" by "Lana Del Rey, Frank Ocean" on the album "Album". I click on "Block entire album". I close the settings expecting this song will be blocked: "No" by "Lana Del Rey" on "Album". The album matches but how to we match artists? Music Presence often doesn't get the album artist. Most players don't report it. I suggest to only block individual songs and play and record them all. You don't use this feature too often I presume and playing all songs gives you the confidence they will all be blocked.

I'd also say that blocking songs is specific for each media player. Blocking one song with foobar doesn't block it in TIDAL e.g. Thoughts? This further ensures you get the confidence that these songs will be blocked and differences in how players report the media are taken care of.

@PapitaConPure
Copy link

To add to this, MusicBee's AutoDJ feature has a track filter that looks like this:
image
That's overkill for this issue, but it should help a bit with ideas.

@mynnshaw
Copy link
Author

I forgot to respond to this thread, oops. I was caught up for the past few days. :P

For that reason I propose to only allow blocking individual songs. I reckon you won't block like 20 songs at once, right? It can always be extended though if the need arises by adding a checkbox like "Block entire album".

This is definitely true; I usually don't have all tracks I'm working on loaded at once, but for other uses, one person may block 20+ songs in regular use, so it's worth noting that.

I'd also say that blocking songs is specific for each media player. Blocking one song with foobar doesn't block it in TIDAL e.g.

Asking somebody else, they may say they want it to be blocked on all platforms, but I think this would be help to tell between released and unreleased tracks if I ever release to streaming. :)

I think I agree with this idea too, as long as it can reliably hide a handful of tracks, it's honestly enough to me. Maybe some things could be ironed out in a future version so people who want to hide controversial artists have more flexibility.

To add to this, MusicBee's AutoDJ feature has a track filter that looks like this:

This would be a headache for some to use but this would be cool to imagine lol

@ungive ungive added the needs media processing pipeline This needs a rework of how media is processed internally label Nov 15, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request needs media processing pipeline This needs a rework of how media is processed internally needs settings window This feature needs a settings window
Projects
Status: Backlog
Development

No branches or pull requests

3 participants