Enhance MusicTag Genre Filtering In Jellyfin
Hey everyone! Today, let's dive into how we can seriously level up our music library management in Jellyfin using the MusicTags plugin. We're going to explore some cool enhancements, specifically focusing on genre tag filtering and how to make those tags work across your entire music collection.
Problem Statement
So, the main goal here is to improve how Jellyfin handles music genres, especially when a song fits into multiple categories. Currently, if you tag a song with multiple genres (like progressive rock\psychedelic rock
), Jellyfin treats it as one combined genre. This limits the effectiveness of features like instant mix, which should ideally pull songs from either progressive rock OR psychedelic rock, not just songs that are both.
The Delimiter Dilemma
Many of us tag our media files with multiple genres using a delimiter. For instance, you might tag a Pink Floyd song as progressive rock\psychedelic rock
. The idea is to tell Jellyfin, "Hey, this song belongs to both genres!" The current setup in Jellyfin allows you to specify a custom tag delimiter, which is fantastic:
This helps, but the MusicTags plugin doesn't fully recognize these delimiters to create separate genre tags. Instead of getting GENRE: progressive rock
and GENRE: psychedelic rock
, you end up with a single tag: GENRE: progressive rock\psychedelic rock
. This is a bummer because it restricts the flexibility of genre-based music selection.
Missing Album and Artist Genre Tags
Another snag is that genre tags are only applied to songs, not to the albums or artists. Tagging genres per song is excellent for creating instant mixes and fine-tuning your listening experience. However, having genre tags on albums and artists would be a game-changer. It would align with how Jellyfin already handles genres and provide a more cohesive library experience. Imagine browsing your albums and seeing genre tags right there – super handy!
Proposed Solutions
To tackle these issues, here are a couple of feature requests that could significantly enhance the MusicTags plugin and Jellyfin's music library management.
Genre Tag Splitting with Delimiters
The first enhancement is to make the MusicTags plugin recognize delimiters and create multiple genre tags. When an artist or song has multiple genres separated by a delimiter in the media file, the plugin should generate individual tags for each genre. For example:
- Input:
GENRE: progressive rock\psychedelic rock
- Desired Output:
GENRE: progressive rock
andGENRE: psychedelic rock
This would drastically improve the accuracy and flexibility of genre-based selections, making instant mixes far more effective and tailored to your tastes.
Copying Genre Tags to Albums and Artists
The second feature request is to copy genre tags from songs to their corresponding albums and artists. This would ensure that genre information is consistent across your entire music library. When a song is tagged with a specific genre, that tag should also be applied to the album and artist associated with the song.
- Scenario: A song tagged with
GENRE: blues
is part of an album. The album and the artist should also receive theGENRE: blues
tag.
This enhancement would provide a more comprehensive and user-friendly browsing experience, especially when you want to filter music by genre at the album or artist level.
Why These Features Matter
So, why are these feature requests so important? The primary reason is that they would enable administrators to allow or block content (songs, albums, artists) by genre for different users through parental control settings. Think of it like the LanguageTags plugin – a fantastic example of how tag filtering can be used to manage content access.
Enhanced Parental Control
With genre tag filtering, parents could easily restrict access to certain types of music for their children. For example, if you want to prevent your kids from listening to explicit rap or heavy metal, you could block those genres at the server level.
Streamlined Folder Structures and User Experience
Genre tag filtering with delimiters would also simplify folder structures and improve the overall user experience. Instead of creating complex folder hierarchies to sort music by genre, you could rely on tags to organize and filter your collection. This would make it much easier for users to find and enjoy the music they love.
If a parent (album/artist) does not carry the MusicTags from the songs, then the users will still see a blank album item even if the correspondent genre was blocked on their profile via parental control.
Use Case Scenario
Imagine a scenario where a user has blocked the GENRE: metal
on their profile. Without the proposed enhancements, they might still see metal albums listed in their library because the album itself isn't tagged with the GENRE: metal
tag. By copying the genre tags from the songs to the albums and artists, you ensure that the filtering is consistent and effective throughout the entire library.
Addressing Potential Concerns
Now, I know that tag filtering might not have been the original intention of the MusicTags plugin. It was likely designed to be used with the SmartPlaylist plugin to create custom playlists and bypass the instant mix feature. However, I believe that filtering can still be a valuable secondary benefit of MusicTags.
Balancing Functionality
The goal is to enhance the plugin without straying too far from its core purpose. By focusing on genre tag splitting and copying, we can add significant value to the plugin while maintaining its original functionality.
Separate Feature Requests
I understand that these are essentially two separate feature requests. I combined them because they both contribute to the same end goal: improved tag filtering. However, if it would be more helpful, I can certainly open separate issues for each request.
Practical Implementation
To better illustrate how these features would work, let’s walk through a practical implementation example.
Genre Tag Splitting Example
- User Tags a Song:
- A user tags a song with the genre
Electronic\Dance
.
- A user tags a song with the genre
- MusicTags Plugin Processes the Tag:
- The plugin detects the
\
delimiter. - The plugin creates two separate genre tags:
GENRE: Electronic
andGENRE: Dance
.
- The plugin detects the
- Jellyfin Displays the Tags:
- The song now appears under both the
Electronic
andDance
genres in Jellyfin.
- The song now appears under both the
Genre Tag Copying Example
- Song is Tagged:
- A song in an album is tagged with
GENRE: Pop
.
- A song in an album is tagged with
- MusicTags Plugin Copies the Tag:
- The plugin automatically copies the
GENRE: Pop
tag to the album and the artist.
- The plugin automatically copies the
- Jellyfin Displays the Tags:
- When browsing the album or artist, the
Pop
genre is now visible.
- When browsing the album or artist, the
Configuration Options
To ensure maximum flexibility, the MusicTags plugin could include configuration options for these features.
Delimiter Setting
- Option: A setting to specify the delimiter used to separate multiple genres (e.g.,
\
,,
,;
). - Default:
\
Genre Tag Copying Toggle
- Option: A toggle to enable or disable the automatic copying of genre tags to albums and artists.
- Default: Enabled (with a warning that disabling it may affect parental control effectiveness)
Conclusion
In conclusion, enhancing the MusicTags plugin with genre tag splitting and copying capabilities would significantly improve the music library management experience in Jellyfin. These features would provide more accurate genre-based selections, streamline folder structures, enhance parental control, and create a more cohesive and user-friendly browsing experience.
Thanks for reading, and I hope these suggestions resonate with you! Let’s make Jellyfin even better together!