Skip to content

fix: stop opening .sln/.mts/.gsm developer files as media#84

Merged
twangodev merged 1 commit into
mainfrom
fix/ext-collisions
Jun 25, 2026
Merged

fix: stop opening .sln/.mts/.gsm developer files as media#84
twangodev merged 1 commit into
mainfrom
fix/ext-collisions

Conversation

@twangodev

@twangodev twangodev commented Jun 25, 2026

Copy link
Copy Markdown
Owner

Removes the .sln, .mts, and .gsm extensions that hijacked Visual Studio solution files, TypeScript sources, and ArchiCAD objects into the media player; raw signed-linear audio is re-registered under the non-colliding .slin. Fixes #78.

Summary by CodeRabbit

  • Bug Fixes
    • Improved media type recognition for raw audio files, including support for the slin extension.
    • Updated video file detection so transport-stream related extensions are less likely to conflict with TypeScript files.
    • Refined the IDE’s media file recognition list to match the latest supported extensions.

The Media file type registered raw and telephony audio extensions that
collide with common developer files. Because the editor uses
FileEditorPolicy.HIDE_DEFAULT_EDITOR, a matched file opens in the player
with the text editor hidden, so the file cannot be viewed as text.

- .sln (Asterisk signed-linear PCM) clobbered Visual Studio / Rider
  solution files (#78). Re-register the format under .slin, Asterisk's
  own non-colliding alias for the same headerless s16le stream, so raw
  signed-linear audio stays supported.
- .mts (AVCHD transport stream) clobbered TypeScript ES-module sources.
  The container is still reachable via the already-registered .m2ts and
  .m2t, mirroring the earlier .ts removal (#45), so .mts is just dropped.
- .gsm (raw GSM 06.10) clobbered ArchiCAD GDL objects; dropped.

.au and .caf are kept: their only real alternative extensions (.snd,
.caff) either collide worse (.snd vs X-Plane sound config) or do not
reach actual files (.caff is effectively unused).

Updates the three mirrored extension lists (frontend descriptor,
MediaClassification, MediaTranscoder raw-audio hints) and adds
regression tests locking .mts/.ts out of video and .slin (not .sln)
as the signed-linear extension.

Fixes #78
Copilot AI review requested due to automatic review settings June 25, 2026 21:43

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot was unable to review this pull request because the user who requested the review has reached their quota limit.

@coderabbitai

coderabbitai Bot commented Jun 25, 2026

Copy link
Copy Markdown

Review Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro

Run ID: 51a44937-b618-473d-944a-263e1926dbe6

📥 Commits

Reviewing files that changed from the base of the PR and between d90c24b and 61620ad.

📒 Files selected for processing (4)
  • backend/src/main/kotlin/dev/twango/jetplay/transcode/MediaTranscoder.kt
  • frontend/src/main/resources/dev.twango.jetplay.frontend.xml
  • shared/src/main/kotlin/dev/twango/jetplay/media/MediaClassification.kt
  • shared/src/test/kotlin/dev/twango/jetplay/media/MediaClassificationTest.kt

📝 Walkthrough

Walkthrough

Updates shared media classification so .mts is no longer video and raw-audio uses .slin, then aligns the transcoder and IntelliJ media extension lists with the new names.

Changes

Media extension classification updates

Layer / File(s) Summary
Shared media classification rules
shared/src/main/kotlin/dev/twango/jetplay/media/MediaClassification.kt, shared/src/test/kotlin/dev/twango/jetplay/media/MediaClassificationTest.kt
VIDEO_EXTENSIONS drops mts, rawAudioExtensions uses slin instead of sln/gsm, and tests cover the updated video and raw-audio classifications.
Runtime and IDE registrations
backend/src/main/kotlin/dev/twango/jetplay/transcode/MediaTranscoder.kt, frontend/src/main/resources/dev.twango.jetplay.frontend.xml
MediaTranscoder maps slin to s16le, and the IntelliJ media file type extension list is updated to the revised set.

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~10 minutes

Possibly related PRs

  • twangodev/jetplay#31 — Updates raw-audio extension/hint handling and related plugin registration.
  • twangodev/jetplay#54 — Changes MediaClassification and its tests around video extension classification.

Poem

I hopped through the media burrow at night,
Past .sln and .mts with a twitchy delight.
Now .slin hums softly, all tidy and neat,
And TypeScript files stay safe from my feet.
🐇✨

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title is concise and accurately summarizes the main fix: media files no longer claim .sln/.mts/.gsm extensions.
Linked Issues check ✅ Passed The PR stops .sln files from being registered as media, satisfying the issue's request to ignore them or let IDE text view handle them.
Out of Scope Changes check ✅ Passed The .mts and .gsm removals plus matching tests/config updates support the same extension-collision fix and stay within scope.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
✨ Finishing Touches
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch fix/ext-collisions

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@github-actions

Copy link
Copy Markdown
Contributor

Qodana Community for JVM

It seems all right 👌

No new problems were found according to the checks applied

💡 Qodana analysis was run in the pull request mode: only the changed files were checked

View the detailed Qodana report

To be able to view the detailed Qodana report, you can either:

To get *.log files or any other Qodana artifacts, run the action with upload-result option set to true,
so that the action will upload the files as the job artifacts:

      - name: 'Qodana Scan'
        uses: JetBrains/qodana-action@v2026.1.3
        with:
          upload-result: true
Contact Qodana team

Contact us at qodana-support@jetbrains.com

@twangodev twangodev merged commit 56447c6 into main Jun 25, 2026
15 checks passed
@twangodev twangodev deleted the fix/ext-collisions branch June 25, 2026 22:09
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

dotnet .sln are opened as audio files

2 participants