Smiley-McSmiles / jellyman

Jellyman is a set of scripts to install/manage and update the jellyfin-combined tar.gz generic linux package
GNU General Public License v3.0
92 stars 4 forks source link

Download_version() function not displaying full version numbers #61

Closed bzoromski closed 9 months ago

bzoromski commented 9 months ago

function Download_version() may also suffer from same the issue such that there are some missing characters in the variable versionList when running jellyman -vd:

https://github.com/Smiley-McSmiles/jellyman/blob/df133dbe4a903d7f373e42d173b7d24e38f1a2db/scripts/jellyman#L128

Current Jellyfin version installed
jellyfin_10.8.13

Please select a stable version:

     1  10.8.0
     2  10.8.1
     3  10.8.1
     4  10.8.1
     5  10.8.1
     6  10.8.1
     7  10.8.2
     8  10.8.3
     9  10.8.4
    10  10.8.5
    11  10.8.6
    12  10.8.7
    13  10.8.8
    14  10.8.9
Please enter the number corresponding with
the version you want to install [1-14] :

Correct labels for items 3,4,5,6 should be

     3  10.8.10
     4  10.8.11
     5  10.8.12
     6  10.8.13

Originally posted by @hobby-lc in https://github.com/Smiley-McSmiles/jellyman/issues/54#issuecomment-1881044778

Smiley-McSmiles commented 9 months ago

Shit, thank you, I'll be fixing this tomorrow.

bzoromski commented 9 months ago

@Smiley-McSmiles Here is a replacement grep line that would replace both lines 127 & 128 of jellyman (it extracts just the version number so you don't need the sed -r "s|>||g" after it): versionList=$(curl -sL https://repo.jellyfin.org/releases/server/linux/versions/stable/combined/ | grep -oP '(?<=<a href=")[0-9]+\.[0-9]+\.[0-9]+(?=\/">)')

I tried testing it and it now properly displays the version numbers, but attempting to download was not working for me. I could be missing something... am I just not seeing where the $architecture variable gets set when running jellyman? It gets set it in setup.sh but I don't see where it would get set when doing something like jellyman --version-download (and would be required for downloading the new version).

Smiley-McSmiles commented 9 months ago

On line 3 of the jellyman script it sources a file that stores the architecture and other information, so the variable is always available when running jellyman with sudo. Also I did fix this issue with the latest release, I just forgot to update my server when I tested it. My new solution is really just a bandaid but I find it to be the easiest as I just added an asterisk to include anything after it, which works just fine for now. Unless there is a real reason to change it so drastically as you're doing, I will just continue to leave it the way it is currently.

[smiley@stronglap ~]$   versionListVar=$(curl -sL https://repo.jellyfin.org/releases/server/linux/versions/stable/combined/)
        versionList=$(echo "$versionListVar" | grep -o ">[0-9][0-9].[0-9].[0-9]*" | sed -r "s|>||g")
[smiley@stronglap ~]$ echo "$versionList"
10.8.0
10.8.1
10.8.10
10.8.11
10.8.12
10.8.13
10.8.2
10.8.3
10.8.4
10.8.5
10.8.6
10.8.7
10.8.8
10.8.9