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

Handle response from listallinfo when data includes flac files with embedded cue sheets. #18

Closed
wants to merge 178 commits into from

Conversation

pccasto
Copy link
Contributor

@pccasto pccasto commented Feb 17, 2019

I initially noticed this as a problem with some of my discs not showing up when drilling down on the albums page. Problem occurred in cases where multiple .flac files were in the same directory e.g. (disc 1).flac, (disc 2).flac.

Turns out that when responding to listallinfo mpd returns the data for the embedded cue/playlist as the last line of data for the file being processed. It does not add a final 'Last-Modified' line, as it would for a file-based playlist. The code that skipped a line after a directory or playlist line was skipping valid data.

This same problem (and approach for fixing) might apply to wavepack files with embedded playlists, but I don't have any of those, so limited the fix to just flac files.

I've included sample below that shows return from a directory with three flac files, and three external cue sheets.

Thanks again for MoOde!

directory: NAS/flac/Yes/The Ultimate Yes (2003)
Last-Modified: 2018-03-18T20:45:22Z
file: NAS/flac/Yes/The Ultimate Yes (2003)/Yes - The Ultimate Yes (Disc 1).flac
Last-Modified: 2018-02-24T20:43:38Z
Time: 4769
duration: 4769.466
Artist: Yes
Disc: 1
Genre: Rock
Album: The Ultimate Yes
Date: 2003
playlist: NAS/flac/Yes/The Ultimate Yes (2003)/Yes - The Ultimate Yes (Disc 1).flac
file: NAS/flac/Yes/The Ultimate Yes (2003)/Yes - The Ultimate Yes (Disc 2).flac
Last-Modified: 2018-02-27T22:44:25Z
Time: 4767
duration: 4767.093
Album: The Ultimate Yes
Artist: Yes
Genre: Rock
Disc: 2
Date: 2003
playlist: NAS/flac/Yes/The Ultimate Yes (2003)/Yes - The Ultimate Yes (Disc 2).flac
file: NAS/flac/Yes/The Ultimate Yes (2003)/Yes - The Ultimate Yes (Disc 3).flac
Last-Modified: 2018-02-24T20:43:38Z
Time: 1211
duration: 1211.400
Disc: 3
Genre: Rock
Artist: Yes
Album: The Ultimate Yes
Date: 2003
playlist: NAS/flac/Yes/The Ultimate Yes (2003)/Yes - The Ultimate Yes (Disc 3).flac
playlist: NAS/flac/Yes/The Ultimate Yes (2003)/Yes - The Ultimate Yes (Disc 1).cue
Last-Modified: 2018-02-22T16:52:26Z
playlist: NAS/flac/Yes/The Ultimate Yes (2003)/Yes - The Ultimate Yes (Disc 2).cue
Last-Modified: 2018-02-27T22:48:05Z
playlist: NAS/flac/Yes/The Ultimate Yes (2003)/Yes - The Ultimate Yes (Disc 3).cue
Last-Modified: 2018-02-24T19:21:46Z

@pccasto
Copy link
Contributor Author

pccasto commented May 2, 2019

Need to shift this as a PR to the develop branch. I might have to create a new PR.

@pccasto pccasto changed the base branch from master to develop May 2, 2019 14:05
@pccasto
Copy link
Contributor Author

pccasto commented May 2, 2019

Interesting, changing the base for the PR was as simple as going the title, hitting edit, and changing the drop-down selection from master to develop.

This branch has no automatic merge conflicts, but needs a review.

moodeaudio and others added 27 commits July 27, 2019 17:44
- Remove dead code
- Remove vars not needed for improved in-place update process
- Adds support for Pi-4B
- Improve layout
- Disable controls when feature is off
- Add srtist and album sort options to genLibraryUTF8Rep()
- Improve robustness of phpSetPermissions()
- Remove SQL escapeString from wlanpwd update since its now a psk
- Add persistant logging (playerlib)
- Add sync and session close before reboot (worker)
- This avoids a low entropy condition that causes wpa_passphrase to just return the input password instead of a generated PSK.
@pccasto
Copy link
Contributor Author

pccasto commented Jul 28, 2019

Closing in favor of PR #46. The other branches had fallen fairly far behind, and the code in the new PR will be easier to test.

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.

None yet

2 participants