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

Feature Request - Option to prefer sync/regular lyrics #14

Open
guiweber opened this issue Nov 7, 2024 · 3 comments
Open

Feature Request - Option to prefer sync/regular lyrics #14

guiweber opened this issue Nov 7, 2024 · 3 comments

Comments

@guiweber
Copy link

guiweber commented Nov 7, 2024

Currently, there is no way to control what gets downloaded if both sync and regular lyrics are available. It's even common for lyrics within the same album to be sync for some songs and not sync for other songs, even though both sync and not sync lyrics are available. It would be great to have an option to prefer sync or regular lyrics download.

Changing the option should also try to replace the already downloaded lyrics of the type that is not preferred, if possible. Maybe that could be an additional option checkbox such as "Replace existing lyrics with preferred type".

@johnpc
Copy link

johnpc commented Nov 15, 2024

This is a great idea. I have a pre 10.9 music library where every song has regular (non sync) lyrics. Unfortunately there is no way to replace the existing lyrics with sync lyrics - when I run lrclib plugin, it detects that lyrics are already present and moves on. Therefore I don't get to enjoy the sync lyrics feature unless I go in and click around the ui one song at a time.

@johnpc
Copy link

johnpc commented Nov 15, 2024

For anyone in my situation, I wrote this cypress script that automates the clicking to re-download lyrics for a playlist:

import 'cypress-if'

const username = "" // FIXME: set your login credentials 
const password = "" // FIXME: set your login credentials 
const musicUrl = "" // link to your playlist
describe('Edit Lyrics for Songs', () => {
	it('Edits lyrics for each song', () => {
	  // Visit the page with the playlist
	  cy.visit(musicUrl);

	  const needsLogin = cy.contains("Please sign in")
	  if (needsLogin) {
		cy.get('#txtManualName').type(username);
		cy.get('#txtManualPassword').type(password);
		cy.contains('button', 'Sign In').click();
	}

	  // Get all song cells
	  cy.get('#childrenContent .listItemButton > .more_vert').each(($songCell, index) => {
		const updatedCell = cy.get(`#childrenContent > div > div:nth-child(${index + 1}) > div.listViewUserDataButtons > button.listItemButton.itemAction.paper-icon-button-light`)

		// Click the three dots menu
		updatedCell.click();

		// Click "Edit lyrics" option
		cy.contains('Edit lyrics').click();

		// In the popup modal, click the search icon
		cy.get('body > div.dialogContainer > div > div.formDialogContent.smoothScrollY > div > form > div > button.btnSearchLyrics.flex-shrink-zero.emby-select-iconbutton.paper-icon-button-light').click()

		// Give time for the results to load (otherwise cypress-if immediately skips the click)
		cy.wait(1000)

		// In the search result, choose the first item
		cy.get('body > div.dialogContainer > div > div.formDialogContent.smoothScrollY > div > div.lyricsResults > div > div:nth-child(1) > button.btnDownload.listItemButton.paper-icon-button-light').if().click();

		// Close the modal, return to list
		cy.get('body > div.dialogContainer > div > div.formDialogHeader > button > span').click();
	  });
	});
  });

@ObscenityIB
Copy link

ObscenityIB commented Nov 24, 2024

I'm just looking for a way to automatically get the lyrics, instead of manually clicking on each song in an album, searching lyrics, then downloading the one I want.

No idea what cypress is @johnpc so I am assuming this script will not work on the jellyfin interface.

Edit: just found I had to force this to happen by running a task:

Yeah, I think I'm waiting for the plugin to get a scheduled task. 😅

Originally posted by @GlassedSilver in #3

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

No branches or pull requests

3 participants