-
-
Notifications
You must be signed in to change notification settings - Fork 368
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
More portable Export download tasks and imports, support curl #446
base: master
Are you sure you want to change the base?
Conversation
fun generateCurlCommands(credentialsList: List<DownloadCredentials>): List<String> | ||
} | ||
|
||
object DownloadCredentialsFromStringExtractor : DownloadCredentialsFromCurl<String> { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We already have another class with this name which extracts simple links.
it should be something like this instead
object DownloadCredentialsFromCurl: DownloadCredentialExtractor<String>
import com.abdownloadmanager.shared.utils.extractors.Extractor | ||
|
||
|
||
interface DownloadCredentialsFromCurl<T>: Extractor<T, List<DownloadCredentials>> { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
we already had this interface (DownloadCredentialExtractor
) so remove this.
ClipboardUtil.copy( | ||
selections.value | ||
.map { it.downloadLink } | ||
.joinToString(System.lineSeparator()) | ||
) | ||
val credentialsList = selections.value | ||
.mapNotNull { downloadSystem.getDownloadItemById(it.id) } | ||
.map { DownloadCredentials.from(it) } | ||
ClipboardUtil.copy(DownloadCredentialsFromStringExtractor.generateCurlCommands(credentialsList).joinToString("\n")) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please keep the previous logic. which simply copies the download link.
I will add another button to "Export download as Curl" instead later
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
everything looks good thank you
the only think is that we use crowdin for translation
in PR just add english translation. other languages will be featched from Crowdin and rhere is no need to create them here as they make this synchronization with crowdin harder
No description provided.