{"id":16065174,"url":"https://github.com/lacymorrow/xspf-playlist","last_synced_at":"2025-03-18T05:30:53.356Z","repository":{"id":57156619,"uuid":"116744456","full_name":"lacymorrow/xspf-playlist","owner":"lacymorrow","description":"💿  Magically created XSPF Playlists","archived":true,"fork":false,"pushed_at":"2023-10-25T02:13:27.000Z","size":11496,"stargazers_count":7,"open_issues_count":0,"forks_count":2,"subscribers_count":3,"default_branch":"master","last_synced_at":"2024-10-29T09:52:48.084Z","etag":null,"topics":["audio","javascript","node","playlist","playlist-generator","stream","utility","xml","xspf","xspf-playlist"],"latest_commit_sha":null,"homepage":"https://www.npmjs.com/package/xspf-playlist","language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/lacymorrow.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null},"funding":{"github":"lacymorrow","patreon":"lacymorrow","open_collective":null,"ko_fi":null,"tidelift":null,"community_bridge":null,"liberapay":null,"issuehunt":null,"otechie":null,"custom":"https://www.buymeacoffee.com/lm"}},"created_at":"2018-01-09T00:27:58.000Z","updated_at":"2024-08-20T15:24:16.000Z","dependencies_parsed_at":"2023-11-09T16:02:30.125Z","dependency_job_id":"3496b426-afec-46e1-b2a8-a477017a53c0","html_url":"https://github.com/lacymorrow/xspf-playlist","commit_stats":{"total_commits":54,"total_committers":2,"mean_commits":27.0,"dds":0.03703703703703709,"last_synced_commit":"19dbd710b7e5c05f109759ef34b933a531431bc9"},"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lacymorrow%2Fxspf-playlist","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lacymorrow%2Fxspf-playlist/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lacymorrow%2Fxspf-playlist/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lacymorrow%2Fxspf-playlist/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/lacymorrow","download_url":"https://codeload.github.com/lacymorrow/xspf-playlist/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":244130307,"owners_count":20402760,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["audio","javascript","node","playlist","playlist-generator","stream","utility","xml","xspf","xspf-playlist"],"created_at":"2024-10-09T05:11:46.408Z","updated_at":"2025-03-18T05:30:53.307Z","avatar_url":"https://github.com/lacymorrow.png","language":"JavaScript","funding_links":["https://github.com/sponsors/lacymorrow","https://patreon.com/lacymorrow","https://www.buymeacoffee.com/lm"],"categories":[],"sub_categories":[],"readme":"\u003e [!WARNING]\n\u003e This project has deprecated dependencies and will receive no new updates.\n\n# XSPF Playlist \n\n[![npm version](https://badge.fury.io/js/xspf-playlist.svg)](https://badge.fury.io/js/xspf-playlist)\n\n\u003e *Automagic XSPF Playlists*\n\nGenerate an XSPF playlist file for audio and video files and autofill track details from ID3 tags.\n\n## Usage\n\n```bash\n  $ npm install -g xspf-playlist\n  \n  $ xspf-playlist 'path/to/media' '{\"id3\": false}' \u003e playlist.xspf\n```\n\nPlace media files into a directory (often named `media`) and pass it to [xspf-playlist](https://github.com/lacymorrow/xspf-playlist). Your media directory will be scanned and exported into an XSPF playlist file automatically. That's it!\n\nNested directories can be treated as the `\u003cartist\u003e` and `\u003calbum\u003e` fields with a hierarchy like `media/artist/album/track.xxx`\n\n\n### xspfPlaylist( media, [, { options }] [, stream] [, callback( err, res ) ])\n\nAccepts either a directory path as a string or an array of track objects as media input. Outputs an XSPF playlist as a sting. \n\nStream and Callback APIs are provided if `true` or a `function` are passed as the last parameter, respectively. \n\nReturns a Promise which resolves to a string by default.\n\n```javascript\nconst xspfPlaylist = require('xspf-playlist')\n\n// Scanning a directory\nxspfPlaylist('/media')\n\t.then(console.log)\n```\n\n###### Or, with a stream\n```javascript\nxspfPlaylist('/media', true)\n    .pipe(process.stdout)\n```\n\n###### Or, with a callback\n```javascript\nxspfPlaylist('/media', function (error, response) {\n\tconsole.log(response)\n})\n```\n\n###### Using options\n```javascript\nconst xspfPlaylist = require('xspf-playlist')\n\n// Scanning a directory\nxspfPlaylist('/media', {'id3': true, 'depth': 0})\n\t.then(console.log)\n```\n\n###### Passing an object\n```javascript\nxspfPlaylist([\n\t{\n\t\ttitle: 'file1',\n\t\tlocation: 'file1.mp3'\n\t},\n\t...\n]).then(console.log)\n```\n\nTracks will be titled by their filename, sans-extension. Additional creator and album information can be provided by organizing your files into a `media/creator/album/title.xxx` hierarchy. \n\nAn image may be associated with a track by giving it the same filename. To associate one image with an entire folder of tracks, give it the filename `artwork`. `artwork` images associate themselves to every sibling and child directory and may be placed anywhere in your media directory hierarchy, so an `artwork.jpg` in the `media` directory will act as a global image, filling in for every track that did not already have one provided.\n\n#### ID3\n\nBy default, supported files will be scanned for ID3 tag info which will automatically fill the following track information if present:\n\n* `title`\n* `artist`\n* `album`\n* `year`\n* `comment`\n* `track`\n* `genre`\n* `picture`\n* `lyrics`\n\n\n###### Tag readers\n\n* ID3v1\n* ID3v2 (with unsynchronisation support!)\n* MP4\n* FLAC\n\n\n#### File Types\n\nSupports `mp3`, `wav`, and `ogg` audio and `mp4`, `webm`, and `ogv` video formats. \n\n\n## API\n\n#### `options`\n\n`options` is a valid JSON object.\n\n##### `id3`\n_boolean_\n\nBy default, the [jsmediatags](https://github.com/aadsm/jsmediatags) library is used to scan `mp3` files and will automatically use the meta information associated with a track, rather than the menu directory hierarchy. This feature can be disabled by passing `id3: false` in the `options` parameter.\n\n##### `depth`\n_integer_\n\nBy default, this tool will scan two directories deep (in order to accomodate `media/creator/album/title.ext` formats). You can manually set the search depth by passing an integer to the `depth` option. `0` means no recursion, will only search the supplied directory.\n\n##### Default options\n\n`{\"id3\": true, \"depth\": 2}`\n\n\n#### `stream`\n_boolean_\n\nIf `true` returns a Stream. if `false` returns a Promise.\nDefault: `false`. \n\n\n#### `callback( error, response )`\n_function_\n\nFunction to callback when playlist generation is complete. Called with `error` and `response` parameters, `response` is a string.\n\n\n\n## Related \n\n* Used by: [lacymorrow/xspf-jukebox](https://github.com/lacymorrow/xspf-jukebox)\n\n* [lacymorrow/xspf-playlister-php](https://github.com/lacymorrow/xspf-playlister-php)\n\n* [lacymorrow/xspf-playlister-py](https://github.com/lacymorrow/xspf-playlister-py)\n\n\n## License\n\n[MIT](http://opensource.org/licenses/MIT) © [Lacy Morrow](http://lacymorrow.com)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flacymorrow%2Fxspf-playlist","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Flacymorrow%2Fxspf-playlist","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flacymorrow%2Fxspf-playlist/lists"}