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

[Bug] %(uploader).valueB not working as intended #680

Open
2 tasks done
ThiCraft2 opened this issue Jan 5, 2025 · 3 comments
Open
2 tasks done

[Bug] %(uploader).valueB not working as intended #680

ThiCraft2 opened this issue Jan 5, 2025 · 3 comments
Labels
bug Something isn't working Waiting For Release Implemented but not released yet

Comments

@ThiCraft2
Copy link

ThiCraft2 commented Jan 5, 2025

  • Tried latest version

  • This issue is not duplicated with any other open or closed issues

Describe the bug

When using %(uploader).valueB, the artist section (in both file name and metadata) will be limited to 30 characters, even when changing said value. It doesn't save everything after download.

Expected behavior

What I tested is an EDM megacollab song, with 6 artists (five DJs, one singer).
What I expected to see: "Clarx, 3rd Prototype, Debris, EMDI, Harley Bird, Sweet Harmony" (appears when about to download)
What happens: "Clarx, 3rd Prototype, Debris," (after download)

Steps to reproduce

  1. Apply %(uploader).valueB and change the value to increase the character limit
  2. Download
  3. Nothing ever happens

Device information

Device: Samsung Galaxy A35 5G
System: Android 14
OS: OneUI 6.1
Tried with every version (stable, nightly, master) without youtube premium.

Screenshots / Recordings

The song I used.
Screenshot_20250105_044601_RVX Music

The command tab before downloading.
Screenshot_20250105_203153.jpg

Additional context

(Here's the log with 70 as set value)
Downloading:
Title: Evolution
URL: https://youtu.be/K3hfHTxNuCQ
Type: audio
Command:
-N "3" --trim-filenames "182" --no-mtime --sponsorblock-remove "music_offtopic" --force-keyframes-at-cuts --audio-quality "0" --extractor-args "youtube:lang=fr" --load-info-json "/storage/emulated/0/Android/data/com.deniscerri.ytdl/files/downloads/infojsons/a6af348d5a7744a2c2edd153b0792edf.info.json" -f "251/ba/b" -x --audio-format "opus" -P "/storage/emulated/0/Android/data/com.deniscerri.ytdl/files/downloads/189" -S "hasaud,size,acodec:opus,aext:opus,lang:en" -o "%(uploader).70B - %(title).70B.%(ext)s" --replace-in-metadata "title" ".+" "Evolution" --parse-metadata "%(title)s:%(meta_title)s" --replace-in-metadata "uploader" ".+" "Clarx, 3rd Prototype, Debris, " --parse-metadata "%(uploader)s:%(artist)s" --embed-metadata --parse-metadata "%(playlist_uploader,artist|)s:^(?P<first_artist>.*?)(?:(?=,\s+)|$)" --parse-metadata "%(album_artist,first_artist|)s:%(album_artist)s" --parse-metadata "description:(?:Released on: )(?P<dscrptn_year>\d{4})" --parse-metadata "%(dscrptn_year,release_year,release_date>%Y,upload_date>%Y)s:(?P<meta_date>\d+)" --embed-thumbnail --convert-thumbnails "png" --ppa "ThumbnailsConvertor:-vf crop="'if(gt(ih,iw),iw,ih)':'if(gt(iw,ih),ih,iw)'"" "https://youtu.be/K3hfHTxNuCQ"

[MetadataParser] Changed title to: Evolution
[MetadataParser] Parsed meta_title from '%(title)s': 'Evolution'
[MetadataParser] Changed uploader to: Clarx, 3rd Prototype, Debris,
[MetadataParser] Parsed artist from '%(uploader)s': 'Clarx, 3rd Prototype, Debris, '
[MetadataParser] Parsed first_artist from '%(playlist_uploader,artist|)s': 'Clarx'
[MetadataParser] Parsed album_artist from '%(album_artist,first_artist|)s': 'Clarx'
[MetadataParser] Parsed dscrptn_year from '%(description)s': '2021'
[MetadataParser] Parsed meta_date from '%(dscrptn_year,release_year,release_date>%Y,upload_date>%Y)s': '2021'
[SponsorBlock] Fetching SponsorBlock segments
[SponsorBlock] No matching segments were found in the SponsorBlock database
[info] K3hfHTxNuCQ: Downloading 1 format(s): 251
[info] Downloading video thumbnail 42 ...
[info] Writing video thumbnail 42 to: /storage/emulated/0/Android/data/com.deniscerri.ytdl/files/downloads/189/Clarx, 3rd Prototype, Debris, - Evolution.webp
[ThumbnailsConvertor] Converting thumbnail "/storage/emulated/0/Android/data/com.deniscerri.ytdl/files/downloads/189/Clarx, 3rd Prototype, Debris, - Evolution.webp" to png
Deleting original file /storage/emulated/0/Android/data/com.deniscerri.ytdl/files/downloads/189/Clarx, 3rd Prototype, Debris, - Evolution.webp (pass -k to keep)
[download] Destination: /storage/emulated/0/Android/data/com.deniscerri.ytdl/files/downloads/189/Clarx, 3rd Prototype, Debris, - Evolution.webm

[download] 100% of 2.34MiB in 00:00:00 at 7.13MiB/s
[ExtractAudio] Destination: /storage/emulated/0/Android/data/com.deniscerri.ytdl/files/downloads/189/Clarx, 3rd Prototype, Debris, - Evolution.opus
Deleting original file /storage/emulated/0/Android/data/com.deniscerri.ytdl/files/downloads/189/Clarx, 3rd Prototype, Debris, - Evolution.webm (pass -k to keep)
[ModifyChapters] SponsorBlock information is unavailable
[Metadata] Adding metadata to "/storage/emulated/0/Android/data/com.deniscerri.ytdl/files/downloads/189/Clarx, 3rd Prototype, Debris, - Evolution.opus"
[EmbedThumbnail] mutagen: Adding thumbnail to "/storage/emulated/0/Android/data/com.deniscerri.ytdl/files/downloads/189/Clarx, 3rd Prototype, Debris, - Evolution.opus"

@ThiCraft2 ThiCraft2 added the bug Something isn't working label Jan 5, 2025
@deniscerri
Copy link
Owner

Ah i know what's wrong.
There is some of code still hanging around.
Before i set .30B as default filename template there was a transition period where i hard coded it. So uploader would always be 30 bytes.

if (downloadItem.author.isNotBlank()){
                metadataCommands.addOption("--replace-in-metadata", "uploader", ".+", downloadItem.author.take(30))
                metadataCommands.addOption("--parse-metadata", "%(uploader)s:%(artist)s")
            }

I'll fix this. In the meantime in the download card just make the author textfield empty

@deniscerri deniscerri added the Waiting For Release Implemented but not released yet label Jan 5, 2025
@ThiCraft2
Copy link
Author

Oh that's why xD
Thank you for your response and your determination to make downloading an easier experience.

@error-reporting
Copy link

* [x]  Tried latest version

* [x]  This issue is not duplicated with any other open or closed issues

Describe the bug

When using %(uploader).valueB, the artist section (in both file name and metadata) will be limited to 30 characters, even when changing said value. It doesn't save everything after download.

Expected behavior

What I tested is an EDM megacollab song, with 6 artists (five DJs, one singer). What I expected to see: "Clarx, 3rd Prototype, Debris, EMDI, Harley Bird, Sweet Harmony" (appears when about to download) What happens: "Clarx, 3rd Prototype, Debris," (after download)

Steps to reproduce

1. Apply %(uploader).valueB and change the value to increase the character limit

2. Download

3. Nothing ever happens

Device information

Device: Samsung Galaxy A35 5G System: Android 14 OS: OneUI 6.1 Tried with every version (stable, nightly, master) without youtube premium.

Screenshots / Recordings

The song I used. Screenshot_20250105_044601_RVX Music

The command tab before downloading. Screenshot_20250105_203153.jpg

Additional context

(Here's the log with 70 as set value) Downloading: Title: Evolution URL: https://youtu.be/K3hfHTxNuCQ Type: audio Command: -N "3" --trim-filenames "182" --no-mtime --sponsorblock-remove "music_offtopic" --force-keyframes-at-cuts --audio-quality "0" --extractor-args "youtube:lang=fr" --load-info-json "/storage/emulated/0/Android/data/com.deniscerri.ytdl/files/downloads/infojsons/a6af348d5a7744a2c2edd153b0792edf.info.json" -f "251/ba/b" -x --audio-format "opus" -P "/storage/emulated/0/Android/data/com.deniscerri.ytdl/files/downloads/189" -S "hasaud,size,acodec:opus,aext:opus,lang:en" -o "%(uploader).70B - %(title).70B.%(ext)s" --replace-in-metadata "title" ".+" "Evolution" --parse-metadata "%(title)s:%(meta_title)s" --replace-in-metadata "uploader" ".+" "Clarx, 3rd Prototype, Debris, " --parse-metadata "%(uploader)s:%(artist)s" --embed-metadata --parse-metadata "%(playlist_uploader,artist|)s:^(?P<first_artist>.*?)(?:(?=,\s+)|$)" --parse-metadata "%(album_artist,first_artist|)s:%(album_artist)s" --parse-metadata "description:(?:Released on: )(?P<dscrptn_year>\d{4})" --parse-metadata "%(dscrptn_year,release_year,release_date>%Y,upload_date>%Y)s:(?P<meta_date>\d+)" --embed-thumbnail --convert-thumbnails "png" --ppa "ThumbnailsConvertor:-vf crop="'if(gt(ih,iw),iw,ih)':'if(gt(iw,ih),ih,iw)'"" "https://youtu.be/K3hfHTxNuCQ"

[MetadataParser] Changed title to: Evolution [MetadataParser] Parsed meta_title from '%(title)s': 'Evolution' [MetadataParser] Changed uploader to: Clarx, 3rd Prototype, Debris, [MetadataParser] Parsed artist from '%(uploader)s': 'Clarx, 3rd Prototype, Debris, ' [MetadataParser] Parsed first_artist from '%(playlist_uploader,artist|)s': 'Clarx' [MetadataParser] Parsed album_artist from '%(album_artist,first_artist|)s': 'Clarx' [MetadataParser] Parsed dscrptn_year from '%(description)s': '2021' [MetadataParser] Parsed meta_date from '%(dscrptn_year,release_year,release_date>%Y,upload_date>%Y)s': '2021' [SponsorBlock] Fetching SponsorBlock segments [SponsorBlock] No matching segments were found in the SponsorBlock database [info] K3hfHTxNuCQ: Downloading 1 format(s): 251 [info] Downloading video thumbnail 42 ... [info] Writing video thumbnail 42 to: /storage/emulated/0/Android/data/com.deniscerri.ytdl/files/downloads/189/Clarx, 3rd Prototype, Debris, - Evolution.webp [ThumbnailsConvertor] Converting thumbnail "/storage/emulated/0/Android/data/com.deniscerri.ytdl/files/downloads/189/Clarx, 3rd Prototype, Debris, - Evolution.webp" to png Deleting original file /storage/emulated/0/Android/data/com.deniscerri.ytdl/files/downloads/189/Clarx, 3rd Prototype, Debris, - Evolution.webp (pass -k to keep) [download] Destination: /storage/emulated/0/Android/data/com.deniscerri.ytdl/files/downloads/189/Clarx, 3rd Prototype, Debris, - Evolution.webm

[download] 100% of 2.34MiB in 00:00:00 at 7.13MiB/s [ExtractAudio] Destination: /storage/emulated/0/Android/data/com.deniscerri.ytdl/files/downloads/189/Clarx, 3rd Prototype, Debris, - Evolution.opus Deleting original file /storage/emulated/0/Android/data/com.deniscerri.ytdl/files/downloads/189/Clarx, 3rd Prototype, Debris, - Evolution.webm (pass -k to keep) [ModifyChapters] SponsorBlock information is unavailable [Metadata] Adding metadata to "/storage/emulated/0/Android/data/com.deniscerri.ytdl/files/downloads/189/Clarx, 3rd Prototype, Debris, - Evolution.opus" [EmbedThumbnail] mutagen: Adding thumbnail to "/storage/emulated/0/Android/data/com.deniscerri.ytdl/files/downloads/189/Clarx, 3rd Prototype, Debris, - Evolution.opus"

%(uploader).valueB limit does work for any value smaller than 30B

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working Waiting For Release Implemented but not released yet
Projects
None yet
Development

No branches or pull requests

3 participants