Site Tools


Hotfix release available: 2024-02-06a "Kaos". upgrade now! [55.1] (what's this?)
New release available: 2024-02-06 "Kaos". upgrade now! [55] (what's this?)
onny:jellyfin

Further api findings

Information about currently logged in user

/Users/Public?format=json

Exclude playlists Jellyfin server

./Emby.Naming/Common/NamingOptions.cs:                ".flac",
./MediaBrowser.Model/Dlna/MediaFormatProfile.cs:        FLAC,
./MediaBrowser.Model/Dlna/MediaFormatProfileResolver.cs:            if (StringHelper.EqualsIgnoreCase(container, "flac"))
./MediaBrowser.Model/Dlna/MediaFormatProfileResolver.cs:                return MediaFormatProfile.FLAC;
./MediaBrowser.Model/Net/MimeTypes.cs:            if (StringHelper.EqualsIgnoreCase(ext, ".flac"))
./MediaBrowser.Model/Net/MimeTypes.cs:                return "audio/flac";
MediaBrowser.Controller/Playlists/Playlist.cs
[...]
        public static string[] SupportedExtensions =
            {
                ".sos"
            };
[...]

Convert Plex playlists

https://turbotux.de/Users/{user_id}/Items?api_key={api_key}&IncludeItemTypes=Playlist&format=json
https://turbotux.de/Users/eb8c2ec5352843d3a16ca11c26d3551c/Items?api_key={api_key}&IncludeItemTypes=Playlist&format=json
https://turbotux.de/Users/eb8c2ec5352843d3a16ca11c26d3551c/Items?api_key=a5dc4ea2f58d490db39c9e0ad204aa83&IncludeItemTypes=Playlist&format=json
https://turbotux.de/Users/eb8c2ec5352843d3a16ca11c26d3551c/Items?api_key=a5dc4ea2f58d490db39c9e0ad204aa83&IncludeItemTypes=Playlist&format=json

https://turbotux.de/Items?format=json&Recursive=true&IncludeItemTypes=Playlist&api_key=MYAPIKEY

this one is good:

https://turbotux.de/Users/eb8c2ec5352843d3a16ca11c26d3551c/Items?api_key=a5dc4ea2f58d490db39c9e0ad204aa83&IncludeItemTypes=Playlist&format=json&Recursive=true

creating playlist

https://turbotux.de/Playlists?UserId=eb8c2ec5352843d3a16ca11c26d3551c&Name=lolorollo&api_key=a5dc4ea2f58d490db39c9e0ad204aa83

this works

curl --data "UserId=eb8c2ec5352843d3a16ca11c26d3551c&Name=lolorollo&api_key=a5dc4ea2f58d490db39c9e0ad204aa83" "https://turbotux.de/Playlists?UserId=eb8c2ec5352843d3a16ca11c26d3551c&Name=lolorollo&api_key=a5dc4ea2f58d490db39c9e0ad204aa83"

searching track

https://turbotux.de/Search/Hints?UserId=eb8c2ec5352843d3a16ca11c26d3551c&Limit=50&IncludeItemTypes=Music&SearchTerm=Catene&format=json

its only hint

https://turbotux.de/Search/Hints?UserId=eb8c2ec5352843d3a16ca11c26d3551c&SearchTerm=danke%20gut&format=json&api_key=a5dc4ea2f58d490db39c9e0ad204aa83

extra fields

https://turbotux.de/Items?UserId=eb8c2ec5352843d3a16ca11c26d3551c&format=json&api_key=a5dc4ea2f58d490db39c9e0ad204aa83&Recursive=true&IncludeItemTypes=Audio%2CMusicAlbum%2CMusicArtist&Fields=Path&SearchTerm=Baobab%20Sira

Import playlists Jellyfin

  • Remove previous library: rm /var/lib/jellyfin/data/library.*
  • Add new library, disable real time monitoring and metadata fetching
  • Creating API key
    • Go to server settings (icon upper right corner)
    • Expert → Advanced, left menu
    • Menu upper middle part: Security
    • Beside title api keys, click on the plus symbol
    • App name: playlist importer
    • Copy api key hash, something like a5dc4ea2f58d490db39c9e0ad204aa83
  • Get userid hash
    • Click on the profile icon, upper right corner
    • Click on profile
    • Copy userid hash from the url which looks like: myserver.com/web/index.html#!/myprofile.html?userId=eb8c2ec5352843d3a16ca11c26d3551c

audio normalization

return _config.GetConfiguration<EncodingOptions>("encoding");
onny@onnuex /tmp> r128gain test.flac test_quieter.flac 
Analyzing loudness of file 'test.flac'...
Analyzing loudness of file 'test_quieter.flac'...
File 'test.flac': loudness = -13.2 LUFS, sample peak = -0.5 dBFS
File 'test_quieter.flac': loudness = -20.6 LUFS, sample peak = -7.8 dBFS
Tagging file 'test.flac'
Tagging file 'test_quieter.flac'
Apr 09 18:02:43 picloud dotnet[10436]: [18:02:43] [INF] /usr/bin/ffmpeg -i file:"/mnt/audio/music/Mac Demarco/All Of Our Yesterdays (Single)/01 All Of Our Yesterdays.flac" -map_metadata -1 -map_chapters -1 -threads 0   -acodec aac -strict experimental -ac 2 -vn -f segment -max_delay 5000000 -avoid_negative_ts disabled -start_at_zero -segment_time 3  -individual_header_trailer 0 -segment_format mpegts -segment_list_type m3u8 -segment_start_number 0 -segment_list "/var/lib/jellyfin/transcoding-temp/6d88998728f39c3666d33c311a1bbb33.m3u8" -y "/var/lib/jellyfin/transcoding-temp/6d88998728f39c3666d33c311a1bbb33%d.ts"
MediaBrowser.Api/Playback/Hls/BaseHlsService.cs
return string.Format("{0} {1} -map_metadata -1 -map_chapters -1 -threads {2} {3} {    4} {5} -f segment -max_delay 5000000 -avoid_negative_ts disabled -start_at_zero -segment_time {6}     {10} -individual_header_trailer 0 -segment_format {11} -segment_list_entry_prefix {12} -segment_li    st_type m3u8 -segment_start_number {7} -segment_list \"{8}\" -y \"{9}\"",
[...]
var args = string.Format("{0} {1} {2} -map_metadata -1 -map_chapters -1 -threads {3} {    4} {5} -max_delay 5000000 -avoid_negative_ts disabled -start_at_zero {6} -hls_time {7} -individual    _header_trailer 0 -start_number {8} -hls_list_size {9}{10} -y \"{11}\"",

public share audio

jellyfin fetching json when logged in:

it will require an access token! same page without login

lets achieve something like

jellyfin-web/src/components/appRouter.js
        // if (apiClient && apiClient.isLoggedIn()) {
        // 
        //     console.log('appRouter - user is authenticated');
        // 
        //     if (route.isDefaultRoute) {
        //         console.log('appRouter - loading skin home page');
        //         loadUserSkinWithOptions(ctx);
        //         return;
        //     } else if (route.roles) {
        // 
        //         validateRoles(apiClient, route.roles).then(function () {
        // 
        //             callback();
        // 
        //         }, beginConnectionWizard);
        //         return;
        //     }
        // }
jellyfin-web/src/bower_components/apiclient/apiclientcore.js
        var url = userId ? this.getUrl("Users/" + userId + "/Items/" + itemId) : this.getUrl("Users/Guest/Items/" + itemId);

now it fails on backend userid validation

Input string was not in a correct format.

Internal server error http://localhost:8096/emby/Users/Guest/Items/9cf4001dc9b153f8637d660b66628ea4

  • System.FormatException: Input string was not in a correct format.
  • /jellyfin-10.3.1/Emby.Server.Implementations/Services/StringMapTypeDeserializer.cs
  • /jellyfin-10.3.1/Emby.Server.Implementations/Services/ServicePath.cs
onny/jellyfin.txt · Last modified: 2021/10/31 10:42 by 127.0.0.1