mirror of
https://github.com/jellyfin/jellyfin.git
synced 2026-07-16 05:43:54 +03:00
Library Access: bug with content type Music #664
Reference in New Issue
Block a user
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @joern-h on GitHub (May 3, 2019).
System details:
Official Docker Image
Docker host: Arch Linux
CPU: Intel Xeon E3-1230v2
GPU: None
Library folder hierarchy:
media/
├── movies
│ └── a_movie.mp4
├── music
│ └── artist
│ └── album
│ └── song.mp3
└── shows
└── show
└── season
└── S01E01.mp4
The Bug:
I have 3 librarys:
Music: media/music
Movies media/movies
Shows: media/shows
And i can't play music from library Music which content type is "Music" with user "musicuser" which is only allowed to play content from library "Music".
The user is able to show artists, albums and songs, but cant play them.
Following error is shown on the web-interface: "PlaybackErrorNoCompatibleStream"
Steps to reproduce:
Log:
[2019-05-03 13:08:51.242 +02:00] [WRN] "musicuser" is not permitted to access Library "Media Folders".
Workaround:
When i also allow access to the movie library, i am able to play songs again
Note:
This occured after i updated from jellyfin 10.2.2 to 10.3.2
All other librarys restrictions work fine.
@pjeanjean commented on GitHub (May 7, 2019):
I have a similar issue since I updated from 10.2.X to 10.3.2, except that even my root user is restricted for music libraries (and adding new permissions does not change anything).
The issue is for files that used to work fine before, as well as newly added ones.
(Granting a user acces for ALL libraries does fix the issue however)
@pjeanjean commented on GitHub (May 7, 2019):
After some more testing, the permission issue also happens whenever I try to open any subfolder inside a library, unless my user has access granted to all libraries.
This looks like an issue with #930 but I don't have any development environment to check...
@joern-h commented on GitHub (May 20, 2019):
I figured it out...
user.Policy.EnabledFolders.Any(i => new Guid(i) == item.Id)this is only true if item is the EnabledFolder, but false if it is a child of it (different id)
I'm now testing if my solution is 100% proof, maybe someone can help testing...
If all works on my server, i will create a pull request
@WisdomCode commented on GitHub (Jun 3, 2019):
I was searching for this issue quite a while, I have the same problem, and it expands further for me:
When looking up an actor (for movies) or an artist (for music), no movies (or albums respectively) are shown, the log gives me the same error at that point. The music playback is impossible as well. This also happens with my admin account, it is not bound to the actual level of user authorization, but to the accessible libraries: I have for every user a specific amount of libraries accessible, no one (not even the admin) can access all libraries. When this access is granted however, the bug disappears.
I hope this was helpful, as this is especially annoying with music, not being able to access the albums of a specific artist.
@pjeanjean commented on GitHub (Jun 3, 2019):
Your issues are definitely caused by the same reason (Enforcement of access permissions with PR #930), but you should probably open another issue because the problem with actors and artists is a bit different than the ones discussed before...
Music albums and subfolders didn't work because there was no check for the permission of subfolders inside libraries.
However, actors and artists exist outside of libraries and are thus managed differently (they will not be fixed by joern_h's PR).
@anthonylavado commented on GitHub (Jun 4, 2019):
@pjeanjean @joern-h Apologies for asking instead of reviewing (limited time at the moment), are both fixes (#1394/#1437) needed then, or only one of them?
In either case, we'd like to get it targeted against the release branch I think, as it seems like a big enough bug.
@pjeanjean commented on GitHub (Jun 5, 2019):
Both are indeed needed,: joern-h's fix solves the issue for real subfolders (that still need to be checked for libraries permissions accesses) while mine solves the issue for virtual folders (that don't have an actual library).
@DrPandemic commented on GitHub (Jun 27, 2019):
https://github.com/jellyfin/jellyfin/pull/1394 was merged and seems to be fixing the issues.
@bmcgonag commented on GitHub (Dec 7, 2019):
I am experiencing this same issue after upgrading to 10.4.2 hosted through docker on Linux x64.
I am unable to get into my TV Shows folder, on Roku. I can get into the Jellyfin application, and when I select the TV Shows folder, it puts a message on the screen that says
I can't seem to get around it, and it was working before the update for Jellyfin-Roku, so maybe it's an issue on that software only. Don't know.
I do have all access to all libraries.
@anthonylavado commented on GitHub (Dec 7, 2019):
As mentioned in https://github.com/jellyfin/jellyfin-roku/issues/96, Roku is just going through refactoring right now.