Repository navigation
Conversation
A file with several tracks is listed as one URL per track, the track in its fragment. ArchiveSource parsed the whole URL, fragment included, so it looked for a file named "Game.nsf#3" in the archive and found none.
Container URLs aren't expanded a second time, so an archive holding an NSF, GBS or other file with several tracks was added as one entry that played only its first track. When an archive holds a single file, open it through the containers and list its tracks if it has more than one. Archives of several files, and single-track files, list as before.
So that a plugin finds the files a file comes with, such as its playlists, inside an archive as it does in a folder.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This follows on from #557. The Game Boy soundtracks I get from https://www.zophar.net/music come as zips, and dropping one into Cog as it is added a single entry for the GBS, which only ever played the first song, for a length that had nothing to do with it.
Container URLs aren't expanded a second time, so a file with several tracks inside an archive stayed one entry. When an archive holds a single playable file, ArchiveContainer now opens it through the containers and lists its tracks if it has more than one. Archives of several files, and single-track files, are listed exactly as before, without opening anything more. For those tracks to play, ArchiveSource now leaves the track fragment off the URL when opening it. It also implements
filesBesideURL:from #557, so the per-track playlists are found inside the zip as well.Tested with a Debug build: on its own, the zip lists every song of the GBS; together with #557, the zips of Castlevania: The Adventure, Belmont's Revenge and Legends list every track in their playlists' order with its title and length. A zip of VGMs lists exactly as before.