$mp3 » History » Version 9
Per Amundsen, 02/23/2023 05:04 PM
1 | 1 | Per Amundsen | _Added in 1.9.0_ |
---|---|---|---|
2 | |||
3 | *$mp3(filename)* |
||
4 | |||
5 | 2 | Per Amundsen | Returns "ID3 tag":https://en.wikipedia.org/wiki/ID3 information about a file/song. |
6 | 1 | Per Amundsen | |
7 | 8 | Per Amundsen | _If file is not found, the default sound folder associated with the file extension is returned._ |
8 | 1 | Per Amundsen | |
9 | 4 | Per Amundsen | _Same as [[$sound]]._ |
10 | |||
11 | 1 | Per Amundsen | *Parameters* |
12 | |||
13 | 9 | Per Amundsen | table(ktable). |
14 | |*Parameter*|*Description*| |
||
15 | | filename | Filename to check. | |
||
16 | 1 | Per Amundsen | |
17 | *Properties* |
||
18 | |||
19 | 9 | Per Amundsen | table(ktable). |
20 | |*Property*|*Description*| |
||
21 | | .album | Album name. | |
||
22 | | .title | Song title. | |
||
23 | | .artist | Song artist. | |
||
24 | | .year | Album/song year. | |
||
25 | | .comment | Comments field. | |
||
26 | | .genre | Song genre. | |
||
27 | | .track | Album track, | |
||
28 | | .length | Song length. | |
||
29 | | .bitrate | Song bitrate. | |
||
30 | | .version | "MPEG":https://en.wikipedia.org/wiki/Moving_Picture_Experts_Group version. | |
||
31 | | .variable | [[$true]] if the song is "variable bitrate":https://en.wikipedia.org/wiki/Variable_bitrate, otherwise [[$false]]. | |
||
32 | | .sample | "MPEG":https://en.wikipedia.org/wiki/Moving_Picture_Experts_Group frequency rate. | |
||
33 | | .mode | "MPEG":https://en.wikipedia.org/wiki/Moving_Picture_Experts_Group mode. | |
||
34 | | .layer | "MPEG":https://en.wikipedia.org/wiki/Moving_Picture_Experts_Group layer. | |
||
35 | | .copyright | [[$true]] if copyright field is enabled, otherwise [[$false]]. | |
||
36 | | .private | [[$true]] if private field is enabled, otherwise [[$false]]. | |
||
37 | | .vbr | [[$true]] if the song bitrate is variable, otherwise [[$false]]. | |
||
38 | | .id3 | Returns the "id3":https://en.wikipedia.org/wiki/ID3 tag version. | |
||
39 | | .tag | Returns the number of "id3v2":https://en.wikipedia.org/wiki/ID3 tags found. | |
||
40 | | .tags | Returns the "id3v3":https://en.wikipedia.org/wiki/ID3 tags found. | |
||
41 | | .crc | Returns [[$true]] if the file is "CRC protected":https://en.wikipedia.org/wiki/Cyclic_redundancy_check, otherwise [[$false]]. | |
||
42 | 1 | Per Amundsen | |
43 | *Example* |
||
44 | |||
45 | <pre> |
||
46 | ; Print artist - title - album for 'song.mp3' |
||
47 | //echo -ag $mp3(song.mp3).artist- $mp3(song.mp3).title - $mp3(song.mp3).album |
||
48 | </pre> |