namidaco / namida

A Beautiful and Feature-rich Music & Video Player with Youtube Support, Built in Flutter
Other
2.27k stars 135 forks source link

[BUG] Imports M3U but Displays Wrong Music #342

Open Nadim147c opened 2 months ago

Nadim147c commented 2 months ago

Expected Behavior

The tracks in the playlist should match those in the M3U file.

Current Behavior

When importing M3U playlists into the music player, the playlist loads, but the tracks include a random track (most likely name starting with a number). Additionally, metadata of the tracks that are included in the m3u files aren't shown.

Additional Information

  1. The m3u file uses 'lf' (\n) and relative path. Here's the head of the file.
    #EXTM3U
    #EXTINF:0,Hold Of Me
    ./Hold Of Me [6dIZb64N6ICAWrf1RJrKfB].mp3
    #EXTINF:1,7 Minutes
    ./7 Minutes [6FYbr9QzRoZPh0Re8lDO9z].mp3
    #EXTINF:2,A Place We Knew
    ./A Place We Knew [3Pbvin812FYYIh8cnHSSEz].mp3
  2. I tried the same thing with the beta version and got the same result.

Steps to Reproduce

  1. Open Namida.
  2. Import any M3U file (a playlist from a local file).
  3. Check the list of songs displayed.

Screenshots

Screenshot_2024-09-11-15-34-49-64_efbfb0790a8187cbd43560835da1b509

Logs

logs_3.8.5_240805177.txt

MSOB7YY commented 1 month ago

this seems like an issue with path parsing, the "Anne-Marie - 2002" is repeated on purpose right?

MSOB7YY commented 1 month ago

i did a fix in a0fc75e8cda7352bd27654c79dad36e43927a1f6, pls try out the beta v4.3.0 from https://github.com/namidaco/namida-snapshots/releases/

Nadim147c commented 1 month ago

Hey @MSOB7YY, I updated to the latest snapshot and the metadata bug seems to be fixed. But invalid track is still existing.

My “.m3u” files actually looked like this:

#EXTM3U

#EXTINF:0,Hold Of Me
./Hold Of Me [6dIZb64N6ICAWrf1RJrKfB].mp3

#EXTINF:1,7 Minutes
./7 Minutes [6FYbr9QzRoZPh0Re8lDO9z].mp3

#EXTINF:2,A Place We Knew
./A Place We Knew [3Pbvin812FYYIh8cnHSSEz].mp3

I thought empty lines couldn't cause any issue but turns out I was wrong. The issue is the empty lines, and removing them from the “.m3u” files fix all the playlist.

MSOB7YY commented 1 month ago

i see, thanks for literally debugging lmao i just added a check for empty lines just in case, will be available in 4.3.5 or later https://github.com/namidaco/namida-snapshots/releases, thank you <3

ahmadnbl commented 1 month ago

Hi! Sorry for bump this issue.

I think I got the same issue in here, cmiiw. I already try to use your latest beta atm (4.4.4) and I still got the issue. Here's the screen record and screenshot that might help to explain the issue.

Spoiler warning https://github.com/user-attachments/assets/101d6d57-badc-4ae7-86d5-50a31a92296b ![Screenshot_20240920_201054](https://github.com/user-attachments/assets/2bca217c-7579-4363-8ebf-b3fefa486fd7)

The issue occurred when I try to play any music that came from playlist. The miniplayer and expanded fullscreen player is just showing the file name and not the metadata. But if I play it through the Tracks, Artist, or Album menu it works fine.

The content of my m3u8 playlist is looks like this, immediately giving the media path without any starting or ending comments/texts. This is auto-generated by some music-service importer. I don't know if these contents causing the issue.

../../Bring Me The Horizon/DArkSide - Single/01 DArkSide.m4a
../../Bring Me The Horizon/That's the Spirit/02 Happy Song.m4a
../../Bring Me The Horizon/Sempiternal (Deluxe)/04 Sleepwalking.m4a
../../Bring Me The Horizon/amo/02 MANTRA.m4a
../../Bring Me The Horizon/POST HUMAN_ SURVIVAL HORROR/03 Teardrops.m4a
../../Bring Me The Horizon/Kool-Aid - Single/01 Kool-Aid.m4a
../../Bring Me The Horizon/Sempiternal (Deluxe)/06 Shadow Moses.m4a
../../Bring Me The Horizon/POST HUMAN_ NeX GEn/05 liMOusIne (feat. AURORA).m4a
../../Bring Me The Horizon/AmEN! (feat. Lil Uzi Vert, Daryl Palumbo & Glassjaw) - Single/01 AmEN! (feat. Lil Uzi Vert, Daryl Palumbo & Glassjaw).m4a
../../Bring Me The Horizon/POST HUMAN_ SURVIVAL HORROR/06 Kingslayer (feat. BABYMETAL).m4a
../../Bring Me The Horizon/POST HUMAN_ SURVIVAL HORROR/02 Parasite Eve.m4a
../../Bring Me The Horizon/Sempiternal (Deluxe)/09 Antivist.m4a
../../Bring Me The Horizon/That's the Spirit/05 Follow You.m4a
../../Bring Me The Horizon/LosT - Single/01 LosT.m4a
../../Bring Me The Horizon/Sempiternal (Deluxe)/01 Can You Feel My Heart.m4a
../../Bring Me The Horizon/That's the Spirit/01 Doomed.m4a
../../Bring Me The Horizon/That's the Spirit/09 Drown (New).m4a
../../Bring Me The Horizon/That's the Spirit/03 Throne.m4a
MSOB7YY commented 1 month ago

@ahmadnbl i see, i will test ur m3u and improve parsing. apparently i didnt give much attention for relative paths

MSOB7YY commented 1 month ago

@ahmadnbl should be fixed in 156742a75f8b39b870b34c5180631a907430900b (beta v4.4.6 https://github.com/namidaco/namida-snapshots/releases/), can you check?

ahmadnbl commented 1 month ago

@MSOB7YY I'm sorry last week I'm on vacation so I just read your reply :D

I tried using latest beta 4.5.2 and it still not showing the metadata

https://github.com/user-attachments/assets/24e6c0bc-531f-4795-af80-e589dca798a6

If I compare the song properties that came from "Track Tab" and "Playlist Tab", here's the result

Track Playlist
Nadim147c commented 1 month ago

Hey @MSOB7YY, playlist metadata isn't working after upgrading to 4.4.6-beta or later (Haven't tested 4.4.4). The last working playlist metadata was 4.3.0-beta.

MSOB7YY commented 4 weeks ago

@ahmadnbl damn its bcz one path starts with / and the other doesnt. u can fix by adding / in all paths in the m3u file or wait till i do smth about it ig

MSOB7YY commented 4 weeks ago

@Nadim147c u got the same issue as above? pls explain

Nadim147c commented 3 weeks ago
Sorry, I forgot to attach screenshots. v4.4.4-beta Latest snapshot
Screenshot_2024-10-15-16-30-48-81_efbfb0790a8187cbd43560835da1b509 Screenshot_2024-10-15-16-37-21-89_76169158703de17dd8d9d0f5c2b96fc9

You fixed that issue but the issue on this comment/commit

i did a fix in a0fc75e, pls try out the beta v4.3.0 from https://github.com/namidaco/namida-snapshots/releases/