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

Allow original songs to be derived from another song #1587

Draft
wants to merge 3 commits into
base: main
Choose a base branch
from

Conversation

Susko3
Copy link
Collaborator

@Susko3 Susko3 commented Oct 5, 2023

As it turns out, original/base versions of original songs can already be added to the database, just that there's a bunch of special casing to try to hide that fact from the frontend and the API.

This PR just removes the special cases, allowing:

  • original song pages to show their original/base versions under "Original version" (including API)
  • base song pages to show the original song under "Alternate versions"

Things that are currently missing from this PR

  • UX considerations for the text shown, as having an original version of an original song is a bit cumbersome
  • Tests (although I do find it interesting that no existing tests failed from this change)

Breaking changes

Original songs that have an original version entered in the database will show that in the UI

People could accidentally enter in an original version (and not realise it, as it's hidden). Those entries should be removed/fixed before this PR makes it in.

I'd like to see which songs are affected. In the spirit of not DoS-ing VocaDB, this is best queried directly from the database:

SELECT Id, EnglishName, ArtistString, OriginalVersion FROM Songs
WHERE SongType = 'Original' AND OriginalVersion IS NOT NULL;
GO

Behaviour on current version of live website

You can already add an original version to an original song on the live website:

  1. On the Edit page, change the song type to not be Original song
  2. Select the desired song to be the Original version
  3. Change song type back to Original song (while the GUI is invisible, the original version remains selected)
  4. Save changes

You can see a song changed this way in https://vocadb.net/Song/ViewVersion/1714212.
But it won't show on the main song page.

image

Note the absence of originalVersionId in the API request for the original song

image

and the inclusion of the original song in the base's derived songs.

image

Susko3 added 3 commits October 5, 2023 23:44
…e UI

This shows eligible `Original song`s as having an "Original version", which doesn't make much sense.
A better name for this would be "Base version".
Comment on lines -311 to 313
if (data.songType !== SongType.Original && !this.originalVersion.entry) {
if (!this.originalVersion.entry) {
this.getOriginal(data.linkedPages);
}
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

This will cause original songs that have unofficial links to another original song on VocaDB (or UtaiteDB/TouhouDB) to have the latter song considered the original version (this would only be shown in the UI and wouldn't be reflected in the database).

Example: https://vocadb.net/S/201986 (this one actually doesn't matter in the end as the song will have a properly defined demo version).

Could also be checked with an SQL query to the database.

@Susko3 Susko3 marked this pull request as draft October 5, 2023 23:34
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.

1 participant