Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix music multidisc indexing #761

Merged
merged 1 commit into from
Aug 19, 2023
Merged

Conversation

csaavedra
Copy link
Contributor

@csaavedra csaavedra commented Aug 16, 2023

Kodi uses internally a right-shift operation to codify in a single integer disc number and track number. This is taken into account in this addon but, incorrectly, it is done for discnumber > 1 only, while Kodi uses it for tracks in all discs.

Fix this by directly codifying the track and disc number for all discs.

This patch is based on investigation by user @neightwulf in github.

Fixes #732

Kodi uses internally a right-shift operation to codify in a
single integer disc number and track number. This is taken
into account in this addon but, incorrectly, it is done for
discnumber > 1 only, while Kodi uses it for tracks in all
discs.

Fix this by directly codifying the track and disc number
for all discs.

This patch is based on investigation by user @neightwulf in
github.
@sonarqubecloud
Copy link

Kudos, SonarCloud Quality Gate passed!    Quality Gate passed

Bug A 0 Bugs
Vulnerability A 0 Vulnerabilities
Security Hotspot A 0 Security Hotspots
Code Smell A 0 Code Smells

No Coverage information No Coverage information
No Duplication information No Duplication information

@codecov
Copy link

codecov bot commented Aug 18, 2023

Codecov Report

Merging #761 (d98d64f) into master (eadcc46) will increase coverage by 0.00%.
Report is 3 commits behind head on master.
The diff coverage is 0.00%.

@@           Coverage Diff           @@
##           master     #761   +/-   ##
=======================================
  Coverage   21.05%   21.05%           
=======================================
  Files          63       63           
  Lines        8544     8543    -1     
  Branches     1573     1572    -1     
=======================================
  Hits         1799     1799           
+ Misses       6729     6728    -1     
  Partials       16       16           
Files Changed Coverage Δ
jellyfin_kodi/objects/music.py 11.78% <0.00%> (+0.03%) ⬆️

📣 We’re building smart automated test selection to slash your CI/CD build times. Learn more

@oddstr13 oddstr13 changed the title music: Fix multidisc indexing Fix music multidisc indexing Aug 19, 2023
@oddstr13 oddstr13 merged commit 78a8f6b into jellyfin:master Aug 19, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Multi-disc albums not shown correctly, include "disc 0" with all disc tracks
2 participants