Giter Site home page Giter Site logo

m3u2volumio's Introduction

m3u2volumio

Translate Windows iTunes .m3u files into a Volumio conform playlist.

Version

0.4

Dependencies

  • python3 >= 3.1
  • paramiko

Usage

./m3u2volumio <filename.m3u>

-c, --changelog
-h, --help
-v, --version

Edit user environmental variables in m3u2volumio before running.

Custom playlists are located in:

  • /data/playlist/ (custom playlists)
  • /data/favourites/my-web-radio (My Web Radios)
  • /data/favourites/radio-favourites (Favorite Radios)

Assumptions

  • Assumes that ssh authorized keys is configured on Volumio system
  • Assuming proper formatting:
    • Weblinks contain http:// or https://
    • EXTINF is structured:
      • #EXTINF:length,Artist Name - Track Title or
      • #EXTINF:length,Title
  • Non-weblinks will be considered filelinks
  • In regular (non-EXT) m3u:
    • If the filename contains a single '-', it will be considered as artist - title formatting
    • Otherwise the extention will be removed and the filename taken as title
  • Existing playlists and radio-favourites files will overwritten *Comes from Windows filesystem and from iTunes m3u playlists only

Examples

Webradio

./m3u2volumio web-radio.m3u

#EXTM3U
#EXTINF:-1,RadioParadise -- 320k
http://stream-uk1.radioparadise.com/aac-320
#EXTINF:-1,OrganLive
http://play2.organlive.com:7000/320
#EXTINF:-1,KlassikRadio - Pure Bach
http://stream.klassikradio.de/purebach/mp3-192/stream.klassikradio.de/

Results in the following output being placed in /data/favourites/radio-favourites file.

[{"service":"webradio","name":"RadioParadise -- 320k","name":"RadioParadise -- 320k","uri":"http://stream-uk1.radioparadise.com/aac-320"},
{"service":"webradio","name":"OrganLive","name":"OrganLive","uri":"http://play2.organlive.com:7000/320"},
{"service":"webradio","name":"KlassikRadio - Pure Bach","name":"KlassikRadio - Pure Bach","uri":"http://stream.klassikradio.de/purebach/mp3-192/stream.klassikradio.de/"}]

Files

Example 1 - with EXT tags

./m3u2volumio example1.m3u

#EXTM3U
#EXTINF:123, Sample artist - Sample title
Sample.mp3
#EXTINF:321,Example Artist - Example title
Greatest Hits\Example.ogg

Results in the following output being placed in the /data/favourites/Example file.

[{"service":"mpd","title":"Sample title","artist":"Sample artist","uri":"mnt/NAS/Sample.mp3"},
{"service":"mpd","title":"Example title","artist":"Example Artist","uri":"mnt/NAS/path/Greatest Hits/Example.ogg"}]

Example 2 - without EXT tags

./m3u2volumio example1.m3u

Sample.mp3
Greatest Hits\Example.ogg

Results in the following output being placed in the /data/favourites/Example file.

[{"service":"mpd","title":"Sample title","artist":"Sample artist","uri":"mnt/NAS/Sample.mp3"},
{"service":"mpd","title":"Example title","artist":"Example Artist","uri":"mnt/NAS/path/Greatest Hits/Example.ogg"}]

m3u2volumio's People

Contributors

pasque avatar xullex avatar

Stargazers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.