TheCaptain989 / radarr-striptracks

A Docker Mod to Radarr/Sonarr to automatically strip out unwanted audio and subtitle tracks
https://hub.docker.com/r/thecaptain989/radarr-striptracks
GNU General Public License v3.0
20 stars 1 forks source link

URL Base breaks API access (was "'Original' language not respected by -org-eng script") #66

Closed ShanDestromp closed 5 months ago

ShanDestromp commented 6 months ago

So I've had /usr/local/bin/striptracks-org-eng.sh set as my script to use for a while now but I don't get too many non-English movies so I don't know if this is a recent breakage/misconfiguration or not.

The movie in question is Audition; TMDB shows the proper original lang is Japanese. Based on my understanding of the striptracks-org-eng.sh script, this means anything other than Japanese or English would be culled.

What actually happened is only the English track (which happens to just be commentary as there is no English dub) was kept.

radarr log of the events

2024-01-01 17:01:35.5|Info|DownloadService|Report for Audition (1999) sent to Transmission from indexer kickasstorrents.to (Prowlarr). Audition (1999) aka Ōdishon aka オーディション (Arrow Remastered 1080p BluRay x265 HEVC 10bit AAC 5 1 Commentary) Takashi Miike Ryo Ishibashi Eihi Shiina Jun Kunimura
2024-01-01 17:09:15.5|Info|MovieService|Assigning file [Audition (1999) [Bluray-1080p] - AAC 5.1 x265.mkv] to movie [[Audition (1999)][tt0235198, 11075]]
2024-01-01 17:09:15.9|Error|striptracks-org-eng.sh|Warn|The 'movie' API with id 41 returned a false hasFile.
2024-01-01 17:09:59.3|Error|striptracks-org-eng.sh|Warn|Script timed out waiting on Radarr job ID . Last status was: 
2024-01-01 17:11:05.4|Info|MoveMovieService|Moving Audition from '/movies/Audition (1997) [1080p]' to '/movies/Audition (1999) [1080p]'
2024-01-01 17:11:05.4|Info|MoveMovieService|Audition moved successfully to /movies/Audition (1999) [1080p]

striptracks log

2024-1-1 17:09:15.9|[1028]Warn|The 'movie' API with id 41 returned a false hasFile.
2024-1-1 17:09:15.9|[1028]Info|Radarr event: Download, Video: /movies/Audition (1997) [1080p]/Audition (1999) [Bluray-1080p] - AAC 5.1 x265.mkv, Size: 9.199G, AudioKeep: :eng:und, SubsKeep: :eng:und
2024-1-1 17:09:16.1|[1028]Info|Original tracks: 6 (audio: 3, subtitles: 2)
2024-1-1 17:09:16.1|[1028]Info|Chapters: 12
2024-1-1 17:09:16.1|[1028]Info|Keeping audio track 3: eng (AAC)
2024-1-1 17:09:16.1|[1028]Info|Keeping subtitles track 4: eng (SubRip/SRT)
2024-1-1 17:09:16.1|[1028]Info|Keeping subtitles track 5: eng (VobSub)
2024-1-1 17:09:16.1|[1028]Info|Removed audio tracks: 1: jpn (AAC),2: jpn (AAC)
2024-1-1 17:09:16.1|[1028]Info|Kept tracks: 4 (audio: 1, subtitles: 2)
2024-1-1 17:09:42.1|[1028]Info|New size: 8.578G
2024-1-1 17:09:42.1|[1028]Info|Calling Radarr API to rescan movie
2024-1-1 17:09:59.3|[1028]Warn|Script timed out waiting on Radarr job ID . Last status was: 
2024-1-1 17:09:59.3|[1028]Info|Completed in 0m 44s
2024-1-1 17:17:15.5|[1453]Info|Radarr event: Test
2024-1-1 17:17:15.5|[1453]Info|Script was test executed successfully.
2024-1-1 17:17:15.5|[1453]Info|Completed in 0m 0s

Radarr is ver 5.2.6.8376 (linuxserver.io docker image) Strip Tracks Ver image

As there is no org-eng-debug wrapper I made one (just added the -d flag with no other changes; below are the relevant logs.

radarr log

2024-01-01 18:05:33.8|Error|striptracks-org-eng-debug.sh|Debug|Enabling debug logging level 1. Starting Radarr run for: UNKNOWN (UNKNOWN)
2024-01-01 18:05:36.7|Error|striptracks-org-eng-debug.sh|Debug|Enabling debug logging level 1. Starting Radarr run for: UNKNOWN (UNKNOWN)
2024-01-01 18:06:53.4|Info|RecycleBinProvider|Recycling Bin has not been configured, deleting permanently. /movies/Audition (1999) [1080p]/Audition (1999) [Bluray-1080p] - AAC 5.1 x265.mkv
2024-01-01 18:06:53.7|Info|RecycleBinProvider|Recycling Bin has not been configured, deleting permanently. /movies/Audition (1999) [1080p]/Audition (1999) [Bluray-1080p] - AAC 5.1 x265.nfo
2024-01-01 18:07:11.2|Info|MovieService|Assigning file [Audition (1999) [Bluray-1080p] - AAC 5.1 x265.mkv] to movie [[Audition (1999)][tt0235198, 11075]]
2024-01-01 18:07:11.3|Error|striptracks-org-eng-debug.sh|Debug|Enabling debug logging level 1. Starting Radarr run for: Audition (1999)
2024-01-01 18:07:11.5|Error|striptracks-org-eng-debug.sh|Warn|The 'movie' API with id 1276 returned a false hasFile.
2024-01-01 18:07:45.0|Error|striptracks-org-eng-debug.sh|Warn|Script timed out waiting on Radarr job ID . Last status was: 

striptracks-org-eng-debug.sh log

2024-1-1 18:07:11.3|[2735]Debug|Enabling debug logging level 1. Starting Radarr run for: Audition (1999)
2024-1-1 18:07:11.3|[2735]Debug|Reading from Radarr config file '/config/config.xml'
2024-1-1 18:07:11.4|[2735]Debug|Getting Radarr version. Calling Radarr API using GET and URL 'http://localhost:7878//radarr/api/v3/system/status'
2024-1-1 18:07:11.4|[2735]Debug|Detected Radarr version 
2024-1-1 18:07:11.4|[2735]Debug|Using temporary file "/movies/Audition (1999) [1080p]/Audit.tmp.l7kdMU"
2024-1-1 18:07:11.4|[2735]Debug|Getting list of language codes. Calling Radarr API using GET and URL 'http://localhost:7878//radarr/api/v3/language'
2024-1-1 18:07:11.4|[2735]Debug|Getting list of quality profiles. Calling Radarr API using GET and URL 'http://localhost:7878//radarr/api/v3/qualityProfile'
2024-1-1 18:07:11.5|[2735]Debug|Getting video information for movie '1276'. Calling Radarr API using GET and URL 'http://localhost:7878//radarr/api/v3/movie/1276'
2024-1-1 18:07:11.5|[2735]Warn|The 'movie' API with id 1276 returned a false hasFile.
2024-1-1 18:07:11.5|[2735]Debug|Command line ':org' code specified for audio. Changing ':org:eng:und' to ':eng:und'
2024-1-1 18:07:11.5|[2735]Info|Radarr event: Download, Video: /movies/Audition (1999) [1080p]/Audition (1999) [Bluray-1080p] - AAC 5.1 x265.mkv, Size: 9.199G, AudioKeep: :eng:und, SubsKeep: :eng:und
2024-1-1 18:07:11.5|[2735]Debug|Executing: /usr/bin/mkvmerge -J "/movies/Audition (1999) [1080p]/Audition (1999) [Bluray-1080p] - AAC 5.1 x265.mkv"
2024-1-1 18:07:11.6|[2735]Debug|Chapters: 12 entries
2024-1-1 18:07:11.6|[2735]Debug|Track ID 0: video (HEVC/H.265/MPEG-H) [codec_id:V_MPEGH/ISO/HEVC codec_private_data:01022000000090000000000078f000fcfdfafa00000f04200001001940010c01ffff022000000300900000030000030078998a0240210001002f420101022000000300900000030000030078a003c0801047db65998a9246d2f016a020202080000003008000000c0422000100064401c171b31227000109034e0105fffffffffffffffffe2ca2de09b51747dbbb55a4fe7fc2fc4e7832363520286275696c642031393929202d20332e352b312d6630633130323262363a5b4c696e75785d5b4743432031302e322e305d5b3634206269745d203130626974202d20482e3236352f4845564320636f646563202d20436f7079726967687420323031332d3230313820286329204d756c7469636f7265776172652c20496e63202d20687474703a2f2f783236352e6f7267202d206f7074696f6e733a2063707569643d31313131303339206672616d652d746872656164733d352077707020706d6f646520706d65206e6f2d70736e72206e6f2d7373696d206c6f672d6c6576656c3d322062697464657074683d313020696e7075742d6373703d31206670733d32342f3120696e7075742d7265733d31393230783130333620696e7465726c6163653d3020746f74616c2d6672616d65733d30206c6576656c2d6964633d3020686967682d746965723d31207568642d62643d30207265663d35206e6f2d616c6c6f772d6e6f6e2d636f6e666f726d616e6365206e6f2d7265706561742d6865616465727320616e6e657862206e6f2d617564206e6f2d68726420696e666f20686173683d30206e6f2d74656d706f72616c2d6c6179657273206f70656e2d676f70206d696e2d6b6579696e743d3234206b6579696e743d32343020676f702d6c6f6f6b61686561643d3020626672616d65733d3820622d61646170743d3220622d707972616d696420626672616d652d626961733d302072632d6c6f6f6b61686561643d3430206c6f6f6b61686561642d736c696365733d30207363656e656375743d343020686973742d7363656e656375743d30207261646c3d30206e6f2d73706c696365206e6f2d696e7472612d72656672657368206374753d3634206d696e2d63752d73697a653d38207265637420616d70206d61782d74752d73697a653d33322074752d696e7465722d64657074683d332074752d696e7472612d64657074683d33206c696d69742d74753d302072646f712d6c6576656c3d322064796e616d69632d72643d302e3030206e6f2d7373696d2d7264207369676e68696465206e6f2d74736b6970206e722d696e7472613d30206e722d696e7465723d30206e6f2d636f6e73747261696e65642d696e747261207374726f6e672d696e7472612d736d6f6f7468696e67206d61782d6d657267653d35206c696d69742d726566733d30206e6f2d6c696d69742d6d6f646573206d653d33207375626d653d34206d6572616e67653d35372074656d706f72616c2d6d7670206e6f2d6672616d652d647570206e6f2d686d6520776569676874702077656967687462206e6f2d616e616c797a652d7372632d70696373206465626c6f636b3d303a30206e6f2d73616f206e6f2d73616f2d6e6f6e2d6465626c6f636b2072643d362073656c6563746976652d73616f3d30206e6f2d6561726c792d736b6970206e6f2d72736b6970206e6f2d666173742d696e747261206e6f2d74736b69702d66617374206e6f2d63752d6c6f73736c65737320622d696e747261206e6f2d73706c697472642d736b697020726470656e616c74793d30207073792d72643d342e3030207073792d72646f713d31302e3030206e6f2d72642d726566696e65206e6f2d6c6f73736c65737320636271706f6666733d3020637271706f6666733d302072633d61627220626974726174653d31303530302071636f6d703d302e3630207170737465703d312073746174732d77726974653d302073746174732d726561643d322063706c78626c75723d32302e302071626c75723d302e35206970726174696f3d312e3130207062726174696f3d312e30302061712d6d6f64653d302061712d737472656e6774683d302e3030206e6f2d637574726565207a6f6e652d636f756e743d30206e6f2d7374726963742d6362722071672d73697a653d36342072632d677261696e2071706d61783d36392071706d696e3d3020636f6e73742d766276207361723d31206f7665727363616e3d3020766964656f666f726d61743d352072616e67653d3020636f6c6f727072696d3d31207472616e736665723d3120636f6c6f726d61747269783d31206368726f6d616c6f633d3020646973706c61792d77696e646f773d3020636c6c3d302c30206d696e2d6c756d613d30206d61782d6c756d613d31303233206c6f67322d6d61782d706f632d6c73623d38207675692d74696d696e672d696e666f207675692d6872642d696e666f20736c696365733d31206e6f2d6f70742d71702d707073206e6f2d6f70742d7265662d6c6973742d6c656e6774682d707073206e6f2d6d756c74692d706173732d6f70742d727073207363656e656375742d626961733d302e303520686973742d7468726573686f6c643d302e3033206e6f2d6f70742d63752d64656c74612d7170206e6f2d61712d6d6f74696f6e206e6f2d6864723130206e6f2d68647231302d6f7074206e6f2d6468647231302d6f7074206e6f2d6964722d7265636f766572792d73656920616e616c797369732d72657573652d6c6576656c3d3020616e616c797369732d736176652d72657573652d6c6576656c3d3020616e616c797369732d6c6f61642d72657573652d6c6576656c3d30207363616c652d666163746f723d3020726566696e652d696e7472613d3020726566696e652d696e7465723d3020726566696e652d6d763d3120726566696e652d6374752d646973746f7274696f6e3d30206e6f2d6c696d69742d73616f206374752d696e666f3d30206e6f2d6c6f77706173732d64637420726566696e652d616e616c797369732d747970653d3020636f70792d7069633d31206d61782d617573697a652d666163746f723d312e30206e6f2d64796e616d69632d726566696e65206e6f2d73696e676c652d736569206e6f2d686576632d6171206e6f2d737674206e6f2d6669656c642071702d61646170746174696f6e2d72616e67653d312e3030207363656e656375742d61776172652d71703d30636f6e666f726d616e63652d77696e646f772d6f6666736574732072696768743d3020626f74746f6d3d30206465636f6465722d6d61782d726174653d30206e6f2d7662762d6c6976652d6d756c74692d7061737380 codec_private_length:2428 color_matrix_coefficients:1 color_primaries:1 color_range:1 color_transfer_characteristics:1 default_duration:41666666 default_track:true display_dimensions:1920x1036 display_unit:0 enabled_track:true forced_track:false language:und minimum_timestamp:21000000 num_index_entries:952 number:1 packetizer:mpegh_p2_video pixel_dimensions:1920x1036 uid:11233738002489688000]
2024-1-1 18:07:11.6|[2735]Debug|Track ID 1: audio (AAC) [audio_channels:6 audio_sampling_frequency:48000 codec_id:A_AAC codec_private_data:11b056e500 codec_private_length:5 default_duration:21333333 default_track:true enabled_track:true forced_track:false language:jpn minimum_timestamp:0 num_index_entries:0 number:2 track_name:Original\sJapanese\stheatrical\s5.1 uid:15331821077659617000]
2024-1-1 18:07:11.6|[2735]Debug|Track ID 2: audio (AAC) [audio_channels:2 audio_sampling_frequency:48000 codec_id:A_AAC codec_private_data:119056e500 codec_private_length:5 default_duration:21333333 default_track:false enabled_track:true forced_track:false language:jpn minimum_timestamp:0 num_index_entries:0 number:3 track_name:Commentary\swith\sdirector\sTakashi\sMiike\sand\sscreenwriter\sDaisuke\sTengan uid:13627825006079668000]
2024-1-1 18:07:11.6|[2735]Debug|Track ID 3: audio (AAC) [audio_channels:2 audio_sampling_frequency:48000 codec_id:A_AAC codec_private_data:119056e500 codec_private_length:5 default_duration:21333333 default_track:false enabled_track:true forced_track:false language:eng minimum_timestamp:0 num_index_entries:0 number:4 track_name:Commentary\sby\sMiike\sbiographer\sTom\sMes uid:7566065560638655000]
2024-1-1 18:07:11.6|[2735]Debug|Track ID 4: subtitles (SubRip/SRT) [codec_id:S_TEXT/UTF8 codec_private_length:0 default_track:false enabled_track:true encoding:UTF-8 forced_track:false language:eng num_index_entries:855 number:5 text_subtitles:true track_name:English uid:5929036242854758000]
2024-1-1 18:07:11.6|[2735]Debug|Track ID 5: subtitles (VobSub) [codec_id:S_VOBSUB codec_private_data:73697a653a203139323078313038300a6f72673a20302c20300a7363616c653a20313030252c20313030250a616c7068613a20313030250a736d6f6f74683a204f46460a66616465696e2f6f75743a20302c20300a616c69676e3a204f4646206174204c45465420544f500a74696d65206f66667365743a20300a666f7263656420737562733a204f46460a70616c657474653a203030303030302c206630663066302c206363636363632c203939393939392c203333333366612c203131313162622c206661333333332c206262313131312c203333666133332c203131626231312c206661666133332c206262626231312c206661333366612c206262313162622c203333666166612c203131626262620a637573746f6d20636f6c6f72733a204f46462c2074726964783a20313030302c20636f6c6f72733a203030303030302c203434343434342c203838383838382c206363636363630a codec_private_length:348 content_encoding_algorithms:0 default_track:false enabled_track:true forced_track:false language:eng minimum_timestamp:7200000000 num_index_entries:1383 number:6 track_name:English\sfor\sJapanese\scommentary uid:7713837813280926000]
2024-1-1 18:07:11.6|[2735]Info|Original tracks: 6 (audio: 3, subtitles: 2)
2024-1-1 18:07:11.7|[2735]Info|Chapters: 12
2024-1-1 18:07:11.7|[2735]Info|Keeping audio track 3: eng (AAC)
2024-1-1 18:07:11.7|[2735]Info|Keeping subtitles track 4: eng (SubRip/SRT)
2024-1-1 18:07:11.7|[2735]Info|Keeping subtitles track 5: eng (VobSub)
2024-1-1 18:07:11.7|[2735]Info|Removed audio tracks: 1: jpn (AAC),2: jpn (AAC)
2024-1-1 18:07:11.7|[2735]Info|Kept tracks: 4 (audio: 1, subtitles: 2)
2024-1-1 18:07:11.7|[2735]Debug|Executing: nice /usr/bin/mkvmerge --title "Audition (1999)" -q -o "/movies/Audition (1999) [1080p]/Audit.tmp.l7kdMU" -a 3 -s 4,5 "/movies/Audition (1999) [1080p]/Audition (1999) [Bluray-1080p] - AAC 5.1 x265.mkv"
2024-1-1 18:07:27.8|[2735]Debug|Deleting or recycling "/movies/Audition (1999) [1080p]/Audition (1999) [Bluray-1080p] - AAC 5.1 x265.mkv". Calling Radarr API using DELETE and URL 'http://localhost:7878//radarr/api/v3/moviefile/2851'
2024-1-1 18:07:27.8|[2735]Debug|Renaming: "/movies/Audition (1999) [1080p]/Audit.tmp.l7kdMU" to "/movies/Audition (1999) [1080p]/Audition (1999) [Bluray-1080p] - AAC 5.1 x265.mkv"
2024-1-1 18:07:27.8|[2735]Info|New size: 8.578G
2024-1-1 18:07:27.8|[2735]Info|Calling Radarr API to rescan movie
2024-1-1 18:07:27.8|[2735]Debug|Forcing rescan of movie '1276'. Calling Radarr API using POST and URL 'http://localhost:7878//radarr/api/v3/command' with data {"name":"RescanMovie","movieId":1276}
2024-1-1 18:07:28.9|[2735]Debug|Checking job  completion. Calling Radarr API using GET and URL 'http://localhost:7878//radarr/api/v3/command/'
2024-1-1 18:07:29.0|[2735]Debug|Job not done. Waiting 1 second.
2024-1-1 18:07:30.0|[2735]Debug|Job not done. Waiting 1 second.
2024-1-1 18:07:31.1|[2735]Debug|Job not done. Waiting 1 second.
2024-1-1 18:07:32.2|[2735]Debug|Job not done. Waiting 1 second.
2024-1-1 18:07:33.3|[2735]Debug|Job not done. Waiting 1 second.
2024-1-1 18:07:34.3|[2735]Debug|Job not done. Waiting 1 second.
2024-1-1 18:07:35.4|[2735]Debug|Job not done. Waiting 1 second.
2024-1-1 18:07:36.5|[2735]Debug|Job not done. Waiting 1 second.
2024-1-1 18:07:37.5|[2735]Debug|Job not done. Waiting 1 second.
2024-1-1 18:07:38.6|[2735]Debug|Job not done. Waiting 1 second.
2024-1-1 18:07:39.7|[2735]Debug|Job not done. Waiting 1 second.
2024-1-1 18:07:40.8|[2735]Debug|Job not done. Waiting 1 second.
2024-1-1 18:07:41.8|[2735]Debug|Job not done. Waiting 1 second.
2024-1-1 18:07:42.9|[2735]Debug|Job not done. Waiting 1 second.
2024-1-1 18:07:44.0|[2735]Debug|Job not done. Waiting 1 second.
2024-1-1 18:07:45.0|[2735]Warn|Script timed out waiting on Radarr job ID . Last status was: 
2024-1-1 18:07:45.0|[2735]Info|Completed in 0m 34s
2024-1-1 18:07:45.0|[2735]Debug|Exit code 18

In particular the line 2024-1-1 18:07:11.5|[2735]Debug|Command line ':org' code specified for audio. Changing ':org:eng:und' to ':eng:und' seems to be the culprit though I'm guess it's also related to the false hasFile?

Am I completely misunderstanding the purpose and usage of the org setting? In my Radarr custom formats I have both English and Original set as wanted (though neither are "required"; and using the "Test Parsing" functionality in radarr with the filename Odishon.1999.Arrow.1080p.BluRay.x265.hevc.10bit.AAC.5.1.commentary-HeVK; it properly maps to the correct movie, shows the original language as Japanese and matches my "EnglishOrig" custom format.

image
TheCaptain989 commented 6 months ago

Let me take a look. Thanks for reporting this.

TheCaptain989 commented 6 months ago

In particular the line 2024-1-1 18:07:11.5|[2735]Debug|Command line ':org' code specified for audio. Changing ':org:eng:und' to ':eng:und' seems to be the culprit though I'm guess it's also related to the false hasFile?

Am I completely misunderstanding the purpose and usage of the org setting? In my Radarr custom formats I have both English and Original set as wanted (though neither are "required"; and using the "Test Parsing" functionality in radarr with the filename Odishon.1999.Arrow.1080p.BluRay.x265.hevc.10bit.AAC.5.1.commentary-HeVK; it properly maps to the correct movie, shows the original language as Japanese and matches my "EnglishOrig" custom format.

Ah, okay, now I know what's going on. You're actually running into an issue related to issue #64, though not exactly the same. Basically, my script does not yet support the Custom Format Language selections. I've already been working on this and am making some progress, but it will be several weeks out before I have coded full support.
In the meantime, I suggest using the Language setting in the Quality Profile configuration instead, like this: image

If you use this configuration with the -org-eng wrapper it should work as you intend.

ShanDestromp commented 6 months ago

Thanks for the quick follow-up. Like I said I don't get many F/L items and when I set things up I must have mis-understood the instructions on setting up the preferred language. I've gone through and made sure all my quality profiles to "original" for the language and deleted my custom format and....no dice. Still drops the Japanese audio (leaving the English commentary). In the logs I'm still getting a Command line ':org' code specified for audio. Changing ':org:eng:und' to ':eng:und'

To be clear on my workflow: Delete the custom format profile> reset all quality profiles to have "Original" as the release language > manual import of the file (movies > manual import > set it to the correct movie). If the issue is the manual import I can try an actual download again but I'm trying to avoid redownloading the same file a bunch of times testing, so I just made a spare that I allow to be imported and not deleted on import.

striptracks log

2024-1-1 21:09:32.5|[4414]Debug|Enabling debug logging level 1. Starting Radarr run for: Audition (1999)
2024-1-1 21:09:32.5|[4414]Debug|Reading from Radarr config file '/config/config.xml'
2024-1-1 21:09:32.6|[4414]Debug|Getting Radarr version. Calling Radarr API using GET and URL 'http://localhost:7878//radarr/api/v3/system/status'
2024-1-1 21:09:32.6|[4414]Debug|Detected Radarr version 
2024-1-1 21:09:32.6|[4414]Debug|Using temporary file "/movies/Audition (1999) [1080p]/Audit.tmp.DQtZYd"
2024-1-1 21:09:32.6|[4414]Debug|Getting list of language codes. Calling Radarr API using GET and URL 'http://localhost:7878//radarr/api/v3/language'
2024-1-1 21:09:32.6|[4414]Debug|Getting list of quality profiles. Calling Radarr API using GET and URL 'http://localhost:7878//radarr/api/v3/qualityProfile'
2024-1-1 21:09:32.7|[4414]Debug|Getting video information for movie '1276'. Calling Radarr API using GET and URL 'http://localhost:7878//radarr/api/v3/movie/1276'
2024-1-1 21:09:32.7|[4414]Warn|The 'movie' API with id 1276 returned a false hasFile.
2024-1-1 21:09:32.7|[4414]Debug|Command line ':org' code specified for audio. Changing ':org:eng:und' to ':eng:und'
2024-1-1 21:09:32.7|[4414]Info|Radarr event: Download, Video: /movies/Audition (1999) [1080p]/Audition (1999) [Bluray-1080p] - AAC 5.1 x265.mkv, Size: 9.199G, AudioKeep: :eng:und, SubsKeep: :eng:und
2024-1-1 21:09:32.7|[4414]Debug|Executing: /usr/bin/mkvmerge -J "/movies/Audition (1999) [1080p]/Audition (1999) [Bluray-1080p] - AAC 5.1 x265.mkv"
2024-1-1 21:09:32.9|[4414]Debug|Chapters: 12 entries
2024-1-1 21:09:32.9|[4414]Debug|Track ID 0: video (HEVC/H.265/MPEG-H) [codec_id:V_MPEGH/ISO/HEVC codec_private_data:01022000000090000000000078f000fcfdfafa00000f04200001001940010c01ffff022000000300900000030000030078998a0240210001002f420101022000000300900000030000030078a003c0801047db65998a9246d2f016a020202080000003008000000c0422000100064401c171b31227000109034e0105fffffffffffffffffe2ca2de09b51747dbbb55a4fe7fc2fc4e7832363520286275696c642031393929202d20332e352b312d6630633130323262363a5b4c696e75785d5b4743432031302e322e305d5b3634206269745d203130626974202d20482e3236352f4845564320636f646563202d20436f7079726967687420323031332d3230313820286329204d756c7469636f7265776172652c20496e63202d20687474703a2f2f783236352e6f7267202d206f7074696f6e733a2063707569643d31313131303339206672616d652d746872656164733d352077707020706d6f646520706d65206e6f2d70736e72206e6f2d7373696d206c6f672d6c6576656c3d322062697464657074683d313020696e7075742d6373703d31206670733d32342f3120696e7075742d7265733d31393230783130333620696e7465726c6163653d3020746f74616c2d6672616d65733d30206c6576656c2d6964633d3020686967682d746965723d31207568642d62643d30207265663d35206e6f2d616c6c6f772d6e6f6e2d636f6e666f726d616e6365206e6f2d7265706561742d6865616465727320616e6e657862206e6f2d617564206e6f2d68726420696e666f20686173683d30206e6f2d74656d706f72616c2d6c6179657273206f70656e2d676f70206d696e2d6b6579696e743d3234206b6579696e743d32343020676f702d6c6f6f6b61686561643d3020626672616d65733d3820622d61646170743d3220622d707972616d696420626672616d652d626961733d302072632d6c6f6f6b61686561643d3430206c6f6f6b61686561642d736c696365733d30207363656e656375743d343020686973742d7363656e656375743d30207261646c3d30206e6f2d73706c696365206e6f2d696e7472612d72656672657368206374753d3634206d696e2d63752d73697a653d38207265637420616d70206d61782d74752d73697a653d33322074752d696e7465722d64657074683d332074752d696e7472612d64657074683d33206c696d69742d74753d302072646f712d6c6576656c3d322064796e616d69632d72643d302e3030206e6f2d7373696d2d7264207369676e68696465206e6f2d74736b6970206e722d696e7472613d30206e722d696e7465723d30206e6f2d636f6e73747261696e65642d696e747261207374726f6e672d696e7472612d736d6f6f7468696e67206d61782d6d657267653d35206c696d69742d726566733d30206e6f2d6c696d69742d6d6f646573206d653d33207375626d653d34206d6572616e67653d35372074656d706f72616c2d6d7670206e6f2d6672616d652d647570206e6f2d686d6520776569676874702077656967687462206e6f2d616e616c797a652d7372632d70696373206465626c6f636b3d303a30206e6f2d73616f206e6f2d73616f2d6e6f6e2d6465626c6f636b2072643d362073656c6563746976652d73616f3d30206e6f2d6561726c792d736b6970206e6f2d72736b6970206e6f2d666173742d696e747261206e6f2d74736b69702d66617374206e6f2d63752d6c6f73736c65737320622d696e747261206e6f2d73706c697472642d736b697020726470656e616c74793d30207073792d72643d342e3030207073792d72646f713d31302e3030206e6f2d72642d726566696e65206e6f2d6c6f73736c65737320636271706f6666733d3020637271706f6666733d302072633d61627220626974726174653d31303530302071636f6d703d302e3630207170737465703d312073746174732d77726974653d302073746174732d726561643d322063706c78626c75723d32302e302071626c75723d302e35206970726174696f3d312e3130207062726174696f3d312e30302061712d6d6f64653d302061712d737472656e6774683d302e3030206e6f2d637574726565207a6f6e652d636f756e743d30206e6f2d7374726963742d6362722071672d73697a653d36342072632d677261696e2071706d61783d36392071706d696e3d3020636f6e73742d766276207361723d31206f7665727363616e3d3020766964656f666f726d61743d352072616e67653d3020636f6c6f727072696d3d31207472616e736665723d3120636f6c6f726d61747269783d31206368726f6d616c6f633d3020646973706c61792d77696e646f773d3020636c6c3d302c30206d696e2d6c756d613d30206d61782d6c756d613d31303233206c6f67322d6d61782d706f632d6c73623d38207675692d74696d696e672d696e666f207675692d6872642d696e666f20736c696365733d31206e6f2d6f70742d71702d707073206e6f2d6f70742d7265662d6c6973742d6c656e6774682d707073206e6f2d6d756c74692d706173732d6f70742d727073207363656e656375742d626961733d302e303520686973742d7468726573686f6c643d302e3033206e6f2d6f70742d63752d64656c74612d7170206e6f2d61712d6d6f74696f6e206e6f2d6864723130206e6f2d68647231302d6f7074206e6f2d6468647231302d6f7074206e6f2d6964722d7265636f766572792d73656920616e616c797369732d72657573652d6c6576656c3d3020616e616c797369732d736176652d72657573652d6c6576656c3d3020616e616c797369732d6c6f61642d72657573652d6c6576656c3d30207363616c652d666163746f723d3020726566696e652d696e7472613d3020726566696e652d696e7465723d3020726566696e652d6d763d3120726566696e652d6374752d646973746f7274696f6e3d30206e6f2d6c696d69742d73616f206374752d696e666f3d30206e6f2d6c6f77706173732d64637420726566696e652d616e616c797369732d747970653d3020636f70792d7069633d31206d61782d617573697a652d666163746f723d312e30206e6f2d64796e616d69632d726566696e65206e6f2d73696e676c652d736569206e6f2d686576632d6171206e6f2d737674206e6f2d6669656c642071702d61646170746174696f6e2d72616e67653d312e3030207363656e656375742d61776172652d71703d30636f6e666f726d616e63652d77696e646f772d6f6666736574732072696768743d3020626f74746f6d3d30206465636f6465722d6d61782d726174653d30206e6f2d7662762d6c6976652d6d756c74692d7061737380 codec_private_length:2428 color_matrix_coefficients:1 color_primaries:1 color_range:1 color_transfer_characteristics:1 default_duration:41666666 default_track:true display_dimensions:1920x1036 display_unit:0 enabled_track:true forced_track:false language:und minimum_timestamp:21000000 num_index_entries:952 number:1 packetizer:mpegh_p2_video pixel_dimensions:1920x1036 uid:11233738002489688000]
2024-1-1 21:09:32.9|[4414]Debug|Track ID 1: audio (AAC) [audio_channels:6 audio_sampling_frequency:48000 codec_id:A_AAC codec_private_data:11b056e500 codec_private_length:5 default_duration:21333333 default_track:true enabled_track:true forced_track:false language:jpn minimum_timestamp:0 num_index_entries:0 number:2 track_name:Original\sJapanese\stheatrical\s5.1 uid:15331821077659617000]
2024-1-1 21:09:32.9|[4414]Debug|Track ID 2: audio (AAC) [audio_channels:2 audio_sampling_frequency:48000 codec_id:A_AAC codec_private_data:119056e500 codec_private_length:5 default_duration:21333333 default_track:false enabled_track:true forced_track:false language:jpn minimum_timestamp:0 num_index_entries:0 number:3 track_name:Commentary\swith\sdirector\sTakashi\sMiike\sand\sscreenwriter\sDaisuke\sTengan uid:13627825006079668000]
2024-1-1 21:09:32.9|[4414]Debug|Track ID 3: audio (AAC) [audio_channels:2 audio_sampling_frequency:48000 codec_id:A_AAC codec_private_data:119056e500 codec_private_length:5 default_duration:21333333 default_track:false enabled_track:true forced_track:false language:eng minimum_timestamp:0 num_index_entries:0 number:4 track_name:Commentary\sby\sMiike\sbiographer\sTom\sMes uid:7566065560638655000]
2024-1-1 21:09:32.9|[4414]Debug|Track ID 4: subtitles (SubRip/SRT) [codec_id:S_TEXT/UTF8 codec_private_length:0 default_track:false enabled_track:true encoding:UTF-8 forced_track:false language:eng num_index_entries:855 number:5 text_subtitles:true track_name:English uid:5929036242854758000]
2024-1-1 21:09:32.9|[4414]Debug|Track ID 5: subtitles (VobSub) [codec_id:S_VOBSUB codec_private_data:73697a653a203139323078313038300a6f72673a20302c20300a7363616c653a20313030252c20313030250a616c7068613a20313030250a736d6f6f74683a204f46460a66616465696e2f6f75743a20302c20300a616c69676e3a204f4646206174204c45465420544f500a74696d65206f66667365743a20300a666f7263656420737562733a204f46460a70616c657474653a203030303030302c206630663066302c206363636363632c203939393939392c203333333366612c203131313162622c206661333333332c206262313131312c203333666133332c203131626231312c206661666133332c206262626231312c206661333366612c206262313162622c203333666166612c203131626262620a637573746f6d20636f6c6f72733a204f46462c2074726964783a20313030302c20636f6c6f72733a203030303030302c203434343434342c203838383838382c206363636363630a codec_private_length:348 content_encoding_algorithms:0 default_track:false enabled_track:true forced_track:false language:eng minimum_timestamp:7200000000 num_index_entries:1383 number:6 track_name:English\sfor\sJapanese\scommentary uid:7713837813280926000]
2024-1-1 21:09:32.9|[4414]Info|Original tracks: 6 (audio: 3, subtitles: 2)
2024-1-1 21:09:32.9|[4414]Info|Chapters: 12
2024-1-1 21:09:32.9|[4414]Info|Keeping audio track 3: eng (AAC)
2024-1-1 21:09:32.9|[4414]Info|Keeping subtitles track 4: eng (SubRip/SRT)
2024-1-1 21:09:32.9|[4414]Info|Keeping subtitles track 5: eng (VobSub)
2024-1-1 21:09:32.9|[4414]Info|Removed audio tracks: 1: jpn (AAC),2: jpn (AAC)
2024-1-1 21:09:32.9|[4414]Info|Kept tracks: 4 (audio: 1, subtitles: 2)
2024-1-1 21:09:32.9|[4414]Debug|Executing: nice /usr/bin/mkvmerge --title "Audition (1999)" -q -o "/movies/Audition (1999) [1080p]/Audit.tmp.DQtZYd" -a 3 -s 4,5 "/movies/Audition (1999) [1080p]/Audition (1999) [Bluray-1080p] - AAC 5.1 x265.mkv"
2024-1-1 21:09:49.1|[4414]Debug|Deleting or recycling "/movies/Audition (1999) [1080p]/Audition (1999) [Bluray-1080p] - AAC 5.1 x265.mkv". Calling Radarr API using DELETE and URL 'http://localhost:7878//radarr/api/v3/moviefile/2852'
2024-1-1 21:09:49.1|[4414]Debug|Renaming: "/movies/Audition (1999) [1080p]/Audit.tmp.DQtZYd" to "/movies/Audition (1999) [1080p]/Audition (1999) [Bluray-1080p] - AAC 5.1 x265.mkv"
2024-1-1 21:09:49.1|[4414]Info|New size: 8.578G
2024-1-1 21:09:49.2|[4414]Info|Calling Radarr API to rescan movie
2024-1-1 21:09:49.2|[4414]Debug|Forcing rescan of movie '1276'. Calling Radarr API using POST and URL 'http://localhost:7878//radarr/api/v3/command' with data {"name":"RescanMovie","movieId":1276}
2024-1-1 21:09:50.2|[4414]Debug|Checking job  completion. Calling Radarr API using GET and URL 'http://localhost:7878//radarr/api/v3/command/'
2024-1-1 21:09:50.3|[4414]Debug|Job not done. Waiting 1 second.
2024-1-1 21:09:51.4|[4414]Debug|Job not done. Waiting 1 second.
2024-1-1 21:09:52.4|[4414]Debug|Job not done. Waiting 1 second.
2024-1-1 21:09:53.5|[4414]Debug|Job not done. Waiting 1 second.
2024-1-1 21:09:54.6|[4414]Debug|Job not done. Waiting 1 second.
2024-1-1 21:09:55.7|[4414]Debug|Job not done. Waiting 1 second.
2024-1-1 21:09:56.7|[4414]Debug|Job not done. Waiting 1 second.
2024-1-1 21:09:57.8|[4414]Debug|Job not done. Waiting 1 second.
2024-1-1 21:09:58.9|[4414]Debug|Job not done. Waiting 1 second.
2024-1-1 21:09:59.9|[4414]Debug|Job not done. Waiting 1 second.
2024-1-1 21:10:01.0|[4414]Debug|Job not done. Waiting 1 second.
2024-1-1 21:10:02.1|[4414]Debug|Job not done. Waiting 1 second.
2024-1-1 21:10:03.2|[4414]Debug|Job not done. Waiting 1 second.
2024-1-1 21:10:04.2|[4414]Debug|Job not done. Waiting 1 second.
2024-1-1 21:10:05.3|[4414]Debug|Job not done. Waiting 1 second.
2024-1-1 21:10:06.3|[4414]Warn|Script timed out waiting on Radarr job ID . Last status was: 
2024-1-1 21:10:06.3|[4414]Info|Completed in 0m 34s
2024-1-1 21:10:06.3|[4414]Debug|Exit code 18
TheCaptain989 commented 6 months ago

I looked more closely at your logs and something weird is going on. This message The 'movie' API with id 1276 returned a false hasFile. shouldn't be showing up as early as it is, to your point, the :org is basically getting stripped out, and the job ID number is blank in this message: Checking job completion. I've never seen any of these behaviors before.

I'm going to try to replicate your issue, but it seems like it may be due to a Radarr upgrade and some new incompatibility. Is there a way you could use an older version and see if the issue goes away?

ShanDestromp commented 6 months ago

Not ghosting you just been busy with life.

I do have a spare server that might be have an older copy of Radarr to test with but otherwise I'll have to spin up a new instance (of an old version) to test with since the *darrs don't like rolling back to previous versions.

TheCaptain989 commented 6 months ago

Not ghosting you just been busy with life.

Same. :wink:

Anyway, I have NOT been able to reproduce this at all. I'm running the same version of Radarr and everything is working as expected...

Something in your configuration may be confusing my script. I just noticed that the version detection isn't working either. None of the API calls are working at all, clearly. I also just noticed that the URL its trying to use has two backslashes, which is probably screwing up curl.

Could you check your config.xml file for Radarr? Please remove the ApiKey and SSL passwords, but it should look something like this:

<Config>
  <LogLevel>Info</LogLevel>
  <Port>7878</Port>
  <UrlBase></UrlBase>
  <BindAddress>*</BindAddress>
  <ApiKey>XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX</ApiKey>
  <AuthenticationMethod>Forms</AuthenticationMethod>
  <Branch>master</Branch>
  <LaunchBrowser>False</LaunchBrowser>
  <UpdateMechanism>Docker</UpdateMechanism>
  <InstanceName>Radarr</InstanceName>
  <AuthenticationRequired>DisabledForLocalAddresses</AuthenticationRequired>
  <EnableSsl>False</EnableSsl>
</Config>
ShanDestromp commented 6 months ago

Something in your configuration may be confusing my script. I just noticed that the version detection isn't working either. None of the API calls are working at all, clearly.

I don't think it's my configuration specifically (as in unique to me) but rather that I happen to have a URL base set, and somehow your script(?) is adding an extra / where there shouldn't be one. Doing a test on the url from the logs (and manually passing along the apikey); with the extra / it kicks me to an error page; but removing the slash (or even the whole baseURL entirely) works fine. I'm not sure where the extra / is coming from as per the *arr documentation it's supposed to have the / as part of URL Base but it might be a simple case of stripping the extra out before you create the URL to call?

Could you check your config.xml file for Radarr?

radarr config.xml

<Config>
  <LogLevel>Info</LogLevel>
  <Port>7878</Port>
  <UrlBase>/radarr</UrlBase>
  <BindAddress>*</BindAddress>
  <SslPort>9898</SslPort>
  <EnableSsl>False</EnableSsl>
  <ApiKey>REMOVED</ApiKey>
  <AuthenticationMethod>Forms</AuthenticationMethod>
  <Branch>master</Branch>
  <LaunchBrowser>True</LaunchBrowser>
  <UpdateMechanism>Docker</UpdateMechanism>
  <AnalyticsEnabled>False</AnalyticsEnabled>
  <UpdateAutomatically>True</UpdateAutomatically>
  <SslCertPath></SslCertPath>
  <SslCertPassword></SslCertPassword>
  <InstanceName>Radarr</InstanceName>
  <AuthenticationRequired>DisabledForLocalAddresses</AuthenticationRequired>
  <Theme>light</Theme>
</Config>

Docker compose

  radarr:
    container_name: radarr
    environment:
      PGID: '1001'
      PUID: '1000'
      TZ: America/New_York
      DOCKER_MODS: linuxserver/mods:universal-tshoot|linuxserver/mods:radarr-striptracks
      UMASK: '002'
    image: ghcr.io/linuxserver/radarr
    logging:
      options:
        max-size: 10m
    ports:
    - published: 7878
      target: 7878
    restart: unless-stopped
    volumes:
    - /nexus/docker/config/radarr:/config:rw
    - /nexus/dalek:/downloads:rw
    - /nexus/tardis/Media/Movies:/movies:rw

Current radarr version info

image
TheCaptain989 commented 6 months ago

That was my suspicion, though. I'm sure the script logic is just dumb. Let me check it now...

TheCaptain989 commented 6 months ago

Okay, I have pushed a development version of the script that hopefully permanently fixes this for all values of the URL base.

Please update your DOCKER_MODS variable to DOCKER_MODS=thecaptain989/radarr-striptracks:develop to give it a try.

ShanDestromp commented 6 months ago

Looks like we have a potential winner. TL;DR: Striptracks now connects to the API, determines the O/L is Japanese and appends it to the command(s) as expected. In this particular case it didn't "do" anything because the source movie was Japanese only audio and only English subs which means everything was kept; but that's what I expected in this case anyway. I'll see if I can "locate" something more complicated to double check with but as of now I think we have a winner.

Radarr.log

2024-01-06 23:24:07.7|Info|RecycleBinProvider|Recycling Bin has not been configured, deleting permanently. /movies/Audition (1999) [1080p]/Audition (1999) [Bluray-1080p] - AAC 5.1 x265.mkv
2024-01-06 23:24:07.8|Info|RecycleBinProvider|Recycling Bin has not been configured, deleting permanently. /movies/Audition (1999) [1080p]/Audition (1999) [Bluray-1080p] - AAC 5.1 x265.nfo
2024-01-06 23:24:23.2|Info|MovieService|Assigning file [Audition (1999) [Bluray-1080p] - AAC 5.1 x265.mkv] to movie [[Audition (1999)][tt0235198, 11075]]
2024-01-06 23:24:23.5|Error|striptracks-debug-org-eng.sh|Debug|Enabling debug logging level 1. Starting Radarr run for: Audition (1999)

Striptracks.log

2024-1-6 23:24:23.5|[1093]Debug|Enabling debug logging level 1. Starting Radarr run for: Audition (1999)
2024-1-6 23:24:23.5|[1093]Debug|Reading from Radarr config file '/config/config.xml'
2024-1-6 23:24:23.5|[1093]Debug|Getting Radarr version. Calling Radarr API using GET and URL 'http://localhost:7878/radarr/api/v3/system/status'
2024-1-6 23:24:23.6|[1093]Debug|Detected Radarr version 5.2.6.8376
2024-1-6 23:24:23.6|[1093]Debug|Checking compatibility of Radarr version 5.2.6.8376 against feature apiv3
2024-1-6 23:24:23.6|[1093]Debug|Feature apiv3 is compatible.
2024-1-6 23:24:23.6|[1093]Debug|Using temporary file "/movies/Audition (1999) [1080p]/Audit.tmp.2HwaP5"
2024-1-6 23:24:23.6|[1093]Debug|Getting list of language codes. Calling Radarr API using GET and URL 'http://localhost:7878/radarr/api/v3/language'
2024-1-6 23:24:23.6|[1093]Debug|Getting list of quality profiles. Calling Radarr API using GET and URL 'http://localhost:7878/radarr/api/v3/qualityProfile'
2024-1-6 23:24:23.7|[1093]Debug|Getting video information for movie '1276'. Calling Radarr API using GET and URL 'http://localhost:7878/radarr/api/v3/movie/1276'
2024-1-6 23:24:23.9|[1093]Debug|Getting video file information for moviefile '2855'. Calling Radarr API using GET and URL 'http://localhost:7878/radarr/api/v3/moviefile/2855'
2024-1-6 23:24:24.0|[1093]Debug|Detected quality 'Bluray-1080p'
2024-1-6 23:24:24.0|[1093]Debug|Detected release group 'HeVK'
2024-1-6 23:24:24.0|[1093]Debug|Detected quality profile '(7) HD High'
2024-1-6 23:24:24.0|[1093]Debug|Detected quality profile language(s) '(-2) Original'
2024-1-6 23:24:24.0|[1093]Debug|Detected original video language of 'Japanese (:jpn)' from movie '1276'
2024-1-6 23:24:24.1|[1093]Debug|Mapped profile language(s) 'Original' to ISO639-2 code string ':jpn'
2024-1-6 23:24:24.1|[1093]Debug|Command line ':org' code specified for audio. Changing ':org:eng:und' to ':jpn:eng:und'
2024-1-6 23:24:24.1|[1093]Info|Radarr event: Download, Video: /movies/Audition (1999) [1080p]/Audition (1999) [Bluray-1080p] - AAC 5.1 x265.mkv, Size: 9.199G, AudioKeep: :jpn:eng:und, SubsKeep: :eng:und
2024-1-6 23:24:24.1|[1093]Debug|Executing: /usr/bin/mkvmerge -J "/movies/Audition (1999) [1080p]/Audition (1999) [Bluray-1080p] - AAC 5.1 x265.mkv"
2024-1-6 23:24:24.2|[1093]Debug|Chapters: 12 entries
2024-1-6 23:24:24.2|[1093]Debug|Track ID 0: video (HEVC/H.265/MPEG-H) [codec_id:V_MPEGH/ISO/HEVC codec_private_data:01022000000090000000000078f000fcfdfafa00000f04200001001940010c01ffff022000000300900000030000030078998a0240210001002f420101022000000300900000030000030078a003c0801047db65998a9246d2f016a020202080000003008000000c0422000100064401c171b31227000109034e0105fffffffffffffffffe2ca2de09b51747dbbb55a4fe7fc2fc4e7832363520286275696c642031393929202d20332e352b312d6630633130323262363a5b4c696e75785d5b4743432031302e322e305d5b3634206269745d203130626974202d20482e3236352f4845564320636f646563202d20436f7079726967687420323031332d3230313820286329204d756c7469636f7265776172652c20496e63202d20687474703a2f2f783236352e6f7267202d206f7074696f6e733a2063707569643d31313131303339206672616d652d746872656164733d352077707020706d6f646520706d65206e6f2d70736e72206e6f2d7373696d206c6f672d6c6576656c3d322062697464657074683d313020696e7075742d6373703d31206670733d32342f3120696e7075742d7265733d31393230783130333620696e7465726c6163653d3020746f74616c2d6672616d65733d30206c6576656c2d6964633d3020686967682d746965723d31207568642d62643d30207265663d35206e6f2d616c6c6f772d6e6f6e2d636f6e666f726d616e6365206e6f2d7265706561742d6865616465727320616e6e657862206e6f2d617564206e6f2d68726420696e666f20686173683d30206e6f2d74656d706f72616c2d6c6179657273206f70656e2d676f70206d696e2d6b6579696e743d3234206b6579696e743d32343020676f702d6c6f6f6b61686561643d3020626672616d65733d3820622d61646170743d3220622d707972616d696420626672616d652d626961733d302072632d6c6f6f6b61686561643d3430206c6f6f6b61686561642d736c696365733d30207363656e656375743d343020686973742d7363656e656375743d30207261646c3d30206e6f2d73706c696365206e6f2d696e7472612d72656672657368206374753d3634206d696e2d63752d73697a653d38207265637420616d70206d61782d74752d73697a653d33322074752d696e7465722d64657074683d332074752d696e7472612d64657074683d33206c696d69742d74753d302072646f712d6c6576656c3d322064796e616d69632d72643d302e3030206e6f2d7373696d2d7264207369676e68696465206e6f2d74736b6970206e722d696e7472613d30206e722d696e7465723d30206e6f2d636f6e73747261696e65642d696e747261207374726f6e672d696e7472612d736d6f6f7468696e67206d61782d6d657267653d35206c696d69742d726566733d30206e6f2d6c696d69742d6d6f646573206d653d33207375626d653d34206d6572616e67653d35372074656d706f72616c2d6d7670206e6f2d6672616d652d647570206e6f2d686d6520776569676874702077656967687462206e6f2d616e616c797a652d7372632d70696373206465626c6f636b3d303a30206e6f2d73616f206e6f2d73616f2d6e6f6e2d6465626c6f636b2072643d362073656c6563746976652d73616f3d30206e6f2d6561726c792d736b6970206e6f2d72736b6970206e6f2d666173742d696e747261206e6f2d74736b69702d66617374206e6f2d63752d6c6f73736c65737320622d696e747261206e6f2d73706c697472642d736b697020726470656e616c74793d30207073792d72643d342e3030207073792d72646f713d31302e3030206e6f2d72642d726566696e65206e6f2d6c6f73736c65737320636271706f6666733d3020637271706f6666733d302072633d61627220626974726174653d31303530302071636f6d703d302e3630207170737465703d312073746174732d77726974653d302073746174732d726561643d322063706c78626c75723d32302e302071626c75723d302e35206970726174696f3d312e3130207062726174696f3d312e30302061712d6d6f64653d302061712d737472656e6774683d302e3030206e6f2d637574726565207a6f6e652d636f756e743d30206e6f2d7374726963742d6362722071672d73697a653d36342072632d677261696e2071706d61783d36392071706d696e3d3020636f6e73742d766276207361723d31206f7665727363616e3d3020766964656f666f726d61743d352072616e67653d3020636f6c6f727072696d3d31207472616e736665723d3120636f6c6f726d61747269783d31206368726f6d616c6f633d3020646973706c61792d77696e646f773d3020636c6c3d302c30206d696e2d6c756d613d30206d61782d6c756d613d31303233206c6f67322d6d61782d706f632d6c73623d38207675692d74696d696e672d696e666f207675692d6872642d696e666f20736c696365733d31206e6f2d6f70742d71702d707073206e6f2d6f70742d7265662d6c6973742d6c656e6774682d707073206e6f2d6d756c74692d706173732d6f70742d727073207363656e656375742d626961733d302e303520686973742d7468726573686f6c643d302e3033206e6f2d6f70742d63752d64656c74612d7170206e6f2d61712d6d6f74696f6e206e6f2d6864723130206e6f2d68647231302d6f7074206e6f2d6468647231302d6f7074206e6f2d6964722d7265636f766572792d73656920616e616c797369732d72657573652d6c6576656c3d3020616e616c797369732d736176652d72657573652d6c6576656c3d3020616e616c797369732d6c6f61642d72657573652d6c6576656c3d30207363616c652d666163746f723d3020726566696e652d696e7472613d3020726566696e652d696e7465723d3020726566696e652d6d763d3120726566696e652d6374752d646973746f7274696f6e3d30206e6f2d6c696d69742d73616f206374752d696e666f3d30206e6f2d6c6f77706173732d64637420726566696e652d616e616c797369732d747970653d3020636f70792d7069633d31206d61782d617573697a652d666163746f723d312e30206e6f2d64796e616d69632d726566696e65206e6f2d73696e676c652d736569206e6f2d686576632d6171206e6f2d737674206e6f2d6669656c642071702d61646170746174696f6e2d72616e67653d312e3030207363656e656375742d61776172652d71703d30636f6e666f726d616e63652d77696e646f772d6f6666736574732072696768743d3020626f74746f6d3d30206465636f6465722d6d61782d726174653d30206e6f2d7662762d6c6976652d6d756c74692d7061737380 codec_private_length:2428 color_matrix_coefficients:1 color_primaries:1 color_range:1 color_transfer_characteristics:1 default_duration:41666666 default_track:true display_dimensions:1920x1036 display_unit:0 enabled_track:true forced_track:false language:und minimum_timestamp:21000000 num_index_entries:952 number:1 packetizer:mpegh_p2_video pixel_dimensions:1920x1036 uid:11233738002489688000]
2024-1-6 23:24:24.2|[1093]Debug|Track ID 1: audio (AAC) [audio_channels:6 audio_sampling_frequency:48000 codec_id:A_AAC codec_private_data:11b056e500 codec_private_length:5 default_duration:21333333 default_track:true enabled_track:true forced_track:false language:jpn minimum_timestamp:0 num_index_entries:0 number:2 track_name:Original\sJapanese\stheatrical\s5.1 uid:15331821077659617000]
2024-1-6 23:24:24.2|[1093]Debug|Track ID 2: audio (AAC) [audio_channels:2 audio_sampling_frequency:48000 codec_id:A_AAC codec_private_data:119056e500 codec_private_length:5 default_duration:21333333 default_track:false enabled_track:true forced_track:false language:jpn minimum_timestamp:0 num_index_entries:0 number:3 track_name:Commentary\swith\sdirector\sTakashi\sMiike\sand\sscreenwriter\sDaisuke\sTengan uid:13627825006079668000]
2024-1-6 23:24:24.3|[1093]Debug|Track ID 3: audio (AAC) [audio_channels:2 audio_sampling_frequency:48000 codec_id:A_AAC codec_private_data:119056e500 codec_private_length:5 default_duration:21333333 default_track:false enabled_track:true forced_track:false language:eng minimum_timestamp:0 num_index_entries:0 number:4 track_name:Commentary\sby\sMiike\sbiographer\sTom\sMes uid:7566065560638655000]
2024-1-6 23:24:24.3|[1093]Debug|Track ID 4: subtitles (SubRip/SRT) [codec_id:S_TEXT/UTF8 codec_private_length:0 default_track:false enabled_track:true encoding:UTF-8 forced_track:false language:eng num_index_entries:855 number:5 text_subtitles:true track_name:English uid:5929036242854758000]
2024-1-6 23:24:24.3|[1093]Debug|Track ID 5: subtitles (VobSub) [codec_id:S_VOBSUB codec_private_data:73697a653a203139323078313038300a6f72673a20302c20300a7363616c653a20313030252c20313030250a616c7068613a20313030250a736d6f6f74683a204f46460a66616465696e2f6f75743a20302c20300a616c69676e3a204f4646206174204c45465420544f500a74696d65206f66667365743a20300a666f7263656420737562733a204f46460a70616c657474653a203030303030302c206630663066302c206363636363632c203939393939392c203333333366612c203131313162622c206661333333332c206262313131312c203333666133332c203131626231312c206661666133332c206262626231312c206661333366612c206262313162622c203333666166612c203131626262620a637573746f6d20636f6c6f72733a204f46462c2074726964783a20313030302c20636f6c6f72733a203030303030302c203434343434342c203838383838382c206363636363630a codec_private_length:348 content_encoding_algorithms:0 default_track:false enabled_track:true forced_track:false language:eng minimum_timestamp:7200000000 num_index_entries:1383 number:6 track_name:English\sfor\sJapanese\scommentary uid:7713837813280926000]
2024-1-6 23:24:24.3|[1093]Info|Original tracks: 6 (audio: 3, subtitles: 2)
2024-1-6 23:24:24.3|[1093]Info|Chapters: 12
2024-1-6 23:24:24.3|[1093]Info|Keeping audio track 1: jpn (AAC)
2024-1-6 23:24:24.3|[1093]Info|Keeping audio track 2: jpn (AAC)
2024-1-6 23:24:24.3|[1093]Info|Keeping audio track 3: eng (AAC)
2024-1-6 23:24:24.3|[1093]Info|Keeping subtitles track 4: eng (SubRip/SRT)
2024-1-6 23:24:24.3|[1093]Info|Keeping subtitles track 5: eng (VobSub)
2024-1-6 23:24:24.3|[1093]Info|Kept tracks: 6 (audio: 3, subtitles: 2)
2024-1-6 23:24:24.3|[1093]Debug|No tracks will be removed from video "/movies/Audition (1999) [1080p]/Audition (1999) [Bluray-1080p] - AAC 5.1 x265.mkv"
2024-1-6 23:24:24.3|[1093]Info|No tracks would be removed from video. Setting Title only and exiting.
2024-1-6 23:24:24.3|[1093]Debug|Executing: /usr/bin/mkvpropedit -q --edit info --set "title=Audition (1999)" "/movies/Audition (1999) [1080p]/Audition (1999) [Bluray-1080p] - AAC 5.1 x265.mkv"
2024-1-6 23:24:24.3|[1093]Info|Completed in 0m 1s
2024-1-6 23:24:24.3|[1093]Debug|Exit code 0
TheCaptain989 commented 6 months ago

Good deal. 😮‍💨

I'll keep working on the other major issue that I'm fighting with of Custom Formats for now but I'll leave this open until I push a production version.

Thanks again for reporting it and working with me.

ShanDestromp commented 6 months ago

Thanks again for reporting it and working with me.

👍

One last (hopefully) update until you push to main: Just tested on a Dual Lang (eng and chn) file that had 39(!) sub tracks. Kept the two audio (expected) and purged all the subs except English, exactly as wanted. Filesize reduction of 200MB just in sub tracks. Doesn't sound like much until you have a thousand movies on-hand