From 0fddd91667767d055eacb6fb5f13116b7fda9432 Mon Sep 17 00:00:00 2001 From: Gabe Farrell Date: Thu, 13 Mar 2025 02:28:27 -0400 Subject: [PATCH] Add debug log --- README.md | 98 ++++++++++++++++++- ...behf_Set_Subtitle_Dispositions_By_Title.js | 1 + 2 files changed, 98 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index 0de0f75..34c3539 100644 --- a/README.md +++ b/README.md @@ -32,4 +32,100 @@ Moves the default audio and default subtitle tracks to the first index, if they - [ ] Make Anime Subtitle Fixer have an option to exclude titles when counting (this is hardcoded right now) - [ ] Investigate using mkvmerge instead of ffmpeg in Set Subtitle Dispositions By Title to stop increase in file size (https://www.reddit.com/r/ffmpeg/comments/wsogpl/removing_subtitle_track_results_in_a_bigger_file/) - [x] Plugin to strip PGA subs if ASS exists -- [x] Plugin to move first audio track in language to first audio track (can be done as a combination of Make First Audio in Lang Default and Make Default Tracks First) \ No newline at end of file +- [x] Plugin to move first audio track in language to first audio track (can be done as a combination of Make First Audio in Lang Default and Make Default Tracks First) +- [ ] The subtitle track 6 made it to the end of the switch case in Set_Subtitle_Dispositions_by_Title with desiredDisposition[6]="undefined" +```json +{ + index:5, + codec_name:"hdmv_pgs_subtitle", + codec_long_name:"HDMV Presentation Graphic Stream subtitles", + codec_type:"subtitle", + codec_tag_string:"[0][0][0][0]", + codec_tag:"0x0000", + r_frame_rate:"0/0", + avg_frame_rate:"0/0", + time_base:"1/1000", + start_pts:0, + start_time:"0.000000", + duration_ts:1418976, + duration:"1418.976000", + disposition:{ + default:1, + dub:0, + original:0, + comment:0, + lyrics:0, + karaoke:0, + forced:0, + hearing_impaired:0, + visual_impaired:0, + clean_effects:0, + attached_pic:0, + timed_thumbnails:0, + non_diegetic:0, + captions:0, + descriptions:0, + metadata:0, + dependent:0, + still_image:0 +}, + tags: + { + language:"eng", + title:"Signs & Songs", + BPS:"3468", + DURATION:"00:14:41.172000000", + NUMBER_OF_FRAMES:"46", + NUMBER_OF_BYTES:"382042", + _STATISTICS_WRITING_APP:"mkvpropedit v88.0 ('All I Know') 64-bit", + _STATISTICS_WRITING_DATE_UTC:"2025-03-13 06:16:57", + _STATISTICS_TAGS:"BPS DURATION NUMBER_OF_FRAMES NUMBER_OF_BYTES" + } +}, + { + index:6, + codec_name:"hdmv_pgs_subtitle", + codec_long_name:"HDMV Presentation Graphic Stream subtitles", + codec_type:"subtitle", + codec_tag_string:"[0][0][0][0]", + codec_tag:"0x0000", + r_frame_rate:"0/0", + avg_frame_rate:"0/0", + time_base:"1/1000", + start_pts:0, + start_time:"0.000000", + duration_ts:1418976, + duration:"1418.976000", + disposition:{ + default:0, + dub:0, + original:0, + comment:0, + lyrics:0, + karaoke:0, + forced:0, + hearing_impaired:0, + visual_impaired:0, + clean_effects:0, + attached_pic:0, + timed_thumbnails:0, + non_diegetic:0, + captions:0, + descriptions:0, + metadata:0, + dependent:0, + still_image:0 + }, + tags: + { + language:"eng", + BPS:"40541", + DURATION:"00:23:27.240000000", + NUMBER_OF_FRAMES:"754", + NUMBER_OF_BYTES:"7131467", + _STATISTICS_WRITING_APP:"mkvpropedit v88.0 ('All I Know') 64-bit", + _STATISTICS_WRITING_DATE_UTC:"2025-03-13 06:16:57", + _STATISTICS_TAGS:"BPS DURATION NUMBER_OF_FRAMES NUMBER_OF_BYTES" + } +} +``` \ No newline at end of file diff --git a/Tdarr_Plugin_gabehf_Set_Subtitle_Dispositions_By_Title.js b/Tdarr_Plugin_gabehf_Set_Subtitle_Dispositions_By_Title.js index b46b499..f109300 100644 --- a/Tdarr_Plugin_gabehf_Set_Subtitle_Dispositions_By_Title.js +++ b/Tdarr_Plugin_gabehf_Set_Subtitle_Dispositions_By_Title.js @@ -204,6 +204,7 @@ const plugin = (file, librarySettings, inputs, otherArguments) => { response.infoLog += `☒Subtitle stream 0:s:${i} detected as being [${titles_to_remove_disposition}] or has disposition overlapping with new default/forced; removing disposition. \n`; break; default: + response.infoLog += `☒Subtitle stream 0:s:${i} reached the end of switch case with desired disposition "${desiredDispositions[i]}"` // should not get here, error } }