RandomNinjaAtk / docker-lidarr-extended

lidarr-extended :: Lidarr application packaged with multiple scripts to provide additional functionality
GNU General Public License v3.0
279 stars 25 forks source link

Add option to download videos in mp4 format. #237

Closed snorkrat closed 1 year ago

snorkrat commented 1 year ago

Added docker environment variable videoContainer to specify either mkv or mp4 for downloading videos as Plex does not read embedded metadata in mkv's or external nfo files.

snorkrat commented 1 year ago

Resolves #233

RandomNinjaAtk commented 1 year ago

I've looked through a bunch of proposed changes, it doesn't appear to handle tidal videos.

Have you tested that it works with tidal videos?

FYI: I have not had an opportunity to test the changes.

snorkrat commented 1 year ago

AFAIK the code to download Tidal videos saves in mp4 currently, before passing to the sma.ini

    if echo "$1" | grep -i "tidal" | read; then
        TidalClientTest
        sleep 1
        TidaldlStatusCheck
        tidal-dl -o "$downloadPath/incomplete" -l "$1"
        find "$downloadPath/incomplete" -type f -exec mv "{}" "$downloadPath/incomplete"/ \;
        find "$downloadPath/incomplete" -mindepth 1 -type d -exec rm -rf "{}" \; &>/dev/null
        find "$downloadPath/incomplete" -type f -regex ".*/.*\.\(mkv\|mp4\)"  -print0 | while IFS= read -r -d '' video; do
            file="${video}"
            filenoext="${file%.*}"
            filename="$(basename "$video")"
            extension="${filename##*.}"
            filenamenoext="${filename%.*}"
            mv "$file" "$downloadPath/incomplete/${2}${3}.mp4"
        done
        if [ -f "$downloadPath/incomplete/${2}${3}.mp4" ]; then
            chmod 666 "$downloadPath/incomplete/${2}${3}.mp4"
            downloadFailed=false
        else
            downloadFailed=true
        fi

From my understanding it is the current sma.ini that repackages the existing tidal.mp4 to an mkv container. There is no need for me to touch the current tidal download, only pass the output to the sma-mp4.ini (which I do), which in this case won't do much as it's already an mp4.

I don't use tidal, will setup a free account to test this week - but there shouldn't be any issue.

RandomNinjaAtk commented 1 year ago

Good point, I'll try to get this merged soon.