forked from coissac/moOdeCDPlayer
-
Notifications
You must be signed in to change notification settings - Fork 0
/
queue.php.patch
42 lines (40 loc) · 2 KB
/
queue.php.patch
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
*** queue.php-orginal 2022-07-08 13:32:41.000000000 +0200
--- queue.php 2022-09-20 14:36:25.400203089 +0200
***************
*** 174,184 ****
if ($element == 'file') {
$idx++;
! $queue[$idx]['file'] = $value;
! $level = stripos(dirname($value), '.cue', -4) === false ? 1 : 2;
! $queue[$idx]['cover_hash'] = substr($value, 0, 4) == 'http' ? '' : md5(dirname($value, $level));
$queue[$idx]['fileext'] = getFileExt($value);
$queue[$idx]['TimeMMSS'] = formatSongTime($queue[$idx]['Time']);
} else {
if ($element == 'Genre' || $element == 'Artist' || $element == 'AlbumArtist' || $element == 'Conductor' || $element == 'Performer') {
// Return only the first of multiple occurrences of the following tags
--- 174,199 ----
if ($element == 'file') {
$idx++;
!
! // Here is the modification for moOdeCDPlayer
! // Orginal line: $queue[$idx]['file'] = $value;
! // Orginal line: $queue[$idx]['cover_hash'] = substr($value, 0, 4) == 'http' ? '' : md5(dirname($value, $level));
! // CD Audio
! if (substr($value, 0, 7) == 'cdda://') {
! $track=basename($value);
! $queue[$idx]['file'] = "Track " . $track;
! $queue[$idx]['cover_hash'] = htmlentities("../current_cd/default_cd");
! $queue[$idx]['Artist'] = "Unknown Artist";
! } else {
! $queue[$idx]['file'] = $value;
! $queue[$idx]['cover_hash'] = substr($value, 0, 4) == 'http' ? '' : md5(dirname($value, $level));
! }
!
!
! $level = stripos(dirname($value), '.cue', -4) === false ? 1 : 2;
$queue[$idx]['fileext'] = getFileExt($value);
$queue[$idx]['TimeMMSS'] = formatSongTime($queue[$idx]['Time']);
+ // END of the changes
} else {
if ($element == 'Genre' || $element == 'Artist' || $element == 'AlbumArtist' || $element == 'Conductor' || $element == 'Performer') {
// Return only the first of multiple occurrences of the following tags