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

Feature Request: Expose Extras #787

Open
mihawk90 opened this issue Nov 5, 2023 · 7 comments
Open

Feature Request: Expose Extras #787

mihawk90 opened this issue Nov 5, 2023 · 7 comments
Labels
enhancement New feature or request

Comments

@mihawk90
Copy link

mihawk90 commented Nov 5, 2023

Jellyfin already has the ability to scan and sort various types of extras into the library given they are in the correct directories, and they are appropriately displayed in the WebUI.
In Kodi it seems there is no way to expose this functionality though.

After installing the Extras Addon (and restarting Kodi), the Extras option is available, however it has no content (movie plays fine though, so share is reachable). Switching to Native Playback mode unfortunately had no effect at all.

Would be nice to see this at one point :)

@oddstr13 oddstr13 added the enhancement New feature or request label Nov 6, 2023
@oddstr13
Copy link
Member

oddstr13 commented Nov 6, 2023

I wasn't aware of the extras addon, but I've been tracking this somewhat relevant Kodi feature PR since Kodi 17/18 some time xbmc/xbmc#14972

@mihawk90
Copy link
Author

mihawk90 commented Nov 6, 2023

Yeah that addon has been around forever :D

Unfortunately that PR isn't well documented in exactly how or where it looks for Extras (or even different movie versions for that matter).

It's kinda nuts that this PR has been around for more then 5 years and has still not made it 😅

@mihawk90
Copy link
Author

Looking for something entirely unrelated I just noticed there's actually already code for it, but it's all commented out:

def get_video_extras(item_id, path, server_id=None, api_client=None):
''' Returns the video files for the item as plugin listing, can be used
to browse actual files or video extras, etc.
'''
if not item_id and 'plugin.video.jellyfin' in path:
item_id = path.split('/')[-2]
if not item_id:
return
# TODO implement????
# Jellyfin(server_id).get_client().jellyfin.get_item(item_id)
"""
def getVideoFiles(jellyfinId,jellyfinPath):
#returns the video files for the item as plugin listing, can be used for browsing the actual files or videoextras etc.
jellyfin = jellyfinserver.Read_JellyfinServer()
if not jellyfinId:
if "plugin.video.jellyfin" in jellyfinPath:
jellyfinId = jellyfinPath.split("/")[-2]
if jellyfinId:
item = jellyfin.getItem(jellyfinId)
putils = playutils.PlayUtils(item)
if putils.isDirectPlay():
#only proceed if we can access the files directly. TODO: copy local on the fly if accessed outside
filelocation = putils.directPlay()
if not filelocation.endswith("/"):
filelocation = filelocation.rpartition("/")[0]
dirs, files = xbmcvfs.listdir(filelocation)
for file in files:
file = filelocation + file
li = xbmcgui.ListItem(file, path=file)
xbmcplugin.addDirectoryItem(handle=PROCESS_HANDLE, url=file, listitem=li)
for dir in dirs:
dir = filelocation + dir
li = xbmcgui.ListItem(dir, path=dir)
xbmcplugin.addDirectoryItem(handle=PROCESS_HANDLE, url=dir, listitem=li, isFolder=True)
#xbmcplugin.endOfDirectory(PROCESS_HANDLE)
"""

@mcarlton00
Copy link
Member

So fun fact, that comment predates Jellyfin existing. So it appears the previous Emby dev never fully implemented it and nobody has brought it up around here until now. Unfortunately it looks like that code block won't work, so it'll take a bit more effort than just uncommenting and having things work.

@mihawk90
Copy link
Author

Oh yeah I didn't expect it to just work anyway, just found it amusing that this was even in there 😅

@nothing2obvi
Copy link

I would also really love this feature. I used the arr-scripts to download trailers for shows and movies, and while I'm happy I can view them on the web or on AndroidTV, and can view the movie trailers on Kodi (not sure if they're playing straight from YouTube or from my downloads), it would be great to be able to watch the trailers I have for shows.

@philamp
Copy link

philamp commented Mar 31, 2024

... May I suggest also this idea :
Would it be possible to have a new menu item somewhere (at some point when selecting a library movie/show) that would go in the "shared network folder" (the path used in "Native mode" but would be used in "Add-on" mode as well somehow).

For instance, this could be an additional item on the variant/versions selection popin named "go to shared network folder", then another popin would appear to select the variant/version and then it would go in the folder (using kodi file manager) that contains this variant/version.

That would be perfect to fill the gap of media capabilities between jellyfin and Kodi (would be easy to play a BDMV media for instance, or to access any extras or anything else inside the "shared network folder")

It would also be seen as an "hybrid mode", between "native mode" and "add-on mode", chosen at play time.

I don't know if this link is feasible though... so it's just a suggestion :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

5 participants