File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -959,10 +959,16 @@ pub fn parse_playlist_file(
959959 entries. extend ( parse_directory ( item. path , progress. clone ( ) ) ) ;
960960 } else {
961961 count += 1 ;
962- // Fast path: if the M3U has cached metadata (from a
963- // Phosphor session save), create the entry directly
964- // without reading the SID file from disk.
965- let has_cache = item. title . is_some ( ) ;
962+ // Fast path: if the M3U has Phosphor cache metadata
963+ // (specifically the md5 from a `#PHOSPHOR:` line), create
964+ // the entry directly without reading the SID from disk.
965+ //
966+ // A bare `#EXTINF:…,Title` from a third-party M3U is NOT
967+ // enough — without md5 we can't query the Songlength DB,
968+ // so playlist rows would show "--" durations forever.
969+ // Falling through to `from_path` reads the SID and
970+ // computes the md5; EXTINF duration is preserved below.
971+ let has_cache = item. md5 . is_some ( ) ;
966972 if count % 50 == 0 || count == 1 {
967973 if let Ok ( mut pg) = progress. lock ( ) {
968974 let mode = if has_cache { "cached" } else { "reading SID" } ;
You can’t perform that action at this time.
0 commit comments