我最近从Windows切换到linux,并且在Windows中使用的播放器将flac文件的等级存储在id3v2文件中,而我的首选Linux媒体播放器clementine无法读取该文件。我想以以下一种格式创建一个大型播放列表:m3u,xspf,pls,asx,asx / ini,提示,我可以导入并手动设置评分(批量)。我拥有的文件是在grep在文件内找到“ rating = x”或“ Rating.x”的音乐文件上找到的结果。
预计到达时间:输入文本文件如下所示:
./The Future Sound of London/The Isness/11 - Meadows.flac
./The Velvet Underground/The Velvet Underground/04 - Pale Blue Eyes.flac
./The Velvet Underground/The Velvet Underground/09 - The Murder Mystery.flac
./The Velvet Underground/The Velvet Underground/10 - After Hours.flac
./Sheryl Crow/C'mon, C'mon/02 - Soak Up The Sun.flac
./Sheryl Crow/Tuesday Night Music Club/11 - I Shall Believe.flac
./Sheryl Crow/Tuesday Night Music Club/07 - No One Said It Would Be Easy.flac
您只需将以下行添加到文件顶部(并给它一个.m3u扩展名),就可以将这种相对路径转换为m3u播放列表。
#EXTM3U
作为参考,这是新文件的前几行。
#EXTM3U
./Plain White T's/Every Second Counts/13 - Hey There Delilah.flac
./The Police/Every Breath You Take- The Singles/07 - Every Little Thing She Does Is Magic.flac
./The Police/Every Breath You Take- The Singles/10 - Every Breath You Take.flac
./The Police/Every Breath You Take- The Singles/11 - King Of Pain.flac
./Roger Waters/Amused to Death/11 - Watching TV.flac
为了将来参考,您可以从命令行运行以下内容来生成带有标签的播放列表,这些标签看起来像“ rating = 1”或类似内容。
for i in {1..5}; do printf "#EXTM3U\n" > ${i}star.m3u; find . -type f -exec grep -i -l --text "rating.$i" '{}' \; >> ${i}star.m3u; done
本文收集自互联网,转载请注明来源。
如有侵权,请联系 [email protected] 删除。
我来说两句