deniscerri / ytdlnis

Android Video/Audio Downloader app using yt-dlp
GNU General Public License v3.0
3.79k stars 130 forks source link

[BUG] Album/playlist track number not being saved #482

Closed TuTiuTe closed 4 months ago

TuTiuTe commented 4 months ago

** Before making an issue make sure you are using the latest version of yt-dlp in the settings. Perhaps try using the nightly version of yt-dlp. If that didn't help, proceed with the issue I am using the latest version, even switched to the beta version to make sure

Describe the bug A few months ago, whenever I downloaded a playlist, its songs were numbered in the metadata in the same order as they are in the playlist Right now, it just doesn't work despite there clearly being the intent to do the same thing as before when checking the logs

To Reproduce Steps to reproduce the behavior: Just try to download any playlist, look at their metadata, and they won't be numbered

Expected behavior The tracks should have been properly numbered in the metadata

Screenshots / Video Recording The playlist I want to download Screenshot_20240524-161506_Fennec

Screenshot_20240524-161614_YTDLnis

Here is the log, showing it has set the track number to index 11 image23

Here is a screenshot of the change not actually happening (it's not the same track, but every track doesn't have their track number) Screenshot_20240524_170943

(please complete the following information):

zaednasr commented 4 months ago

Did ytdlp change a command? What is supposed to be the correct one? Because the app knows the playlist index at least

TuTiuTe commented 4 months ago

I looked around a bit in yt-dl's documentation. I managed to embed the right metadata by doing --parse-metadata "playlist_index:%(track_number)s". The log in ytdlnis indicates it does --parse-metadata "%(track_number,playlist_index)d:%(meta_track_number)s" Since I tried yt-dl on my pc, it might be a different version in ytdlnis and the fix is maybe not as easy as modifying that one line of code

zaednasr commented 4 months ago

Try copying the apps log and test in terminal mode. Because ytdlp is the same

TuTiuTe commented 4 months ago

it solved the issue in the mobile app when using "track_number" instead of "meta_track_number"

TuTiuTe commented 4 months ago

"meta_track_number" is in line 1174 of /app/src/main/java/com/deniscerri/ytdl/util/InfoUtil.kt I have barely used git in my life and have no clue on how to make the change myself

zaednasr commented 4 months ago

Check the latest beta: https://github.com/deniscerri/ytdlnis/releases/tag/v1.7.6.1-beta

TuTiuTe commented 4 months ago

Works perfectly thx <3