{"id":13586402,"url":"https://github.com/NISH1001/playx","last_synced_at":"2025-04-07T15:31:46.299Z","repository":{"id":87814365,"uuid":"88330570","full_name":"NISH1001/playx","owner":"NISH1001","description":"Search and play any song from terminal","archived":true,"fork":false,"pushed_at":"2020-10-25T03:40:57.000Z","size":1120,"stargazers_count":202,"open_issues_count":3,"forks_count":18,"subscribers_count":7,"default_branch":"develop","last_synced_at":"2025-04-01T13:51:37.262Z","etag":null,"topics":["audio","linux","music","youtube-search"],"latest_commit_sha":null,"homepage":null,"language":"Python","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/NISH1001.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2017-04-15T07:07:23.000Z","updated_at":"2024-08-22T07:30:02.000Z","dependencies_parsed_at":"2024-06-20T11:15:53.439Z","dependency_job_id":"050fe886-4b5c-4ce9-adfe-ed8fb639dd2a","html_url":"https://github.com/NISH1001/playx","commit_stats":null,"previous_names":[],"tags_count":1,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/NISH1001%2Fplayx","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/NISH1001%2Fplayx/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/NISH1001%2Fplayx/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/NISH1001%2Fplayx/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/NISH1001","download_url":"https://codeload.github.com/NISH1001/playx/tar.gz/refs/heads/develop","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247679535,"owners_count":20978069,"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","linux","music","youtube-search"],"created_at":"2024-08-01T15:05:32.978Z","updated_at":"2025-04-07T15:31:45.940Z","avatar_url":"https://github.com/NISH1001.png","language":"Python","readme":"\u003ch1 align=center\u003e\n\u003cimg src=\"logo/1024 bg.svg\" width=80%\u003e\n\u003c/h1\u003e\n\n\u003cdiv align=\"center\"\u003e\n\u003ch1\u003eSearch and play any song from terminal.\u003c/h1\u003e\n\u003c/div\u003e\n\n\u003cdiv align=\"center\"\u003e\n\u003ch4\u003e\n\u003ca href=\"#philosophy\"\u003ePhilosophy\u003c/a\u003e\u0026nbsp;\u0026nbsp;\u0026nbsp;|\u0026nbsp;\u0026nbsp;\u0026nbsp;\u003ca href=\"#requirements\"\u003eRequirements\u003c/a\u003e\u0026nbsp;\u0026nbsp;\u0026nbsp;|\u0026nbsp;\u0026nbsp;\u0026nbsp;\u003ca href=\"#installation\"\u003eInstallation\u003c/a\u003e\u0026nbsp;\u0026nbsp;\u0026nbsp;|\u0026nbsp;\u0026nbsp;\u0026nbsp;\u003ca href=\"#features\"\u003eFeatures\u003c/a\u003e\u0026nbsp;\u0026nbsp;\u0026nbsp;|\u0026nbsp;\u0026nbsp;\u0026nbsp;\u003ca href=\"#usage\"\u003eUsage\u003c/a\u003e\u0026nbsp;\u0026nbsp;\u0026nbsp;|\u0026nbsp;\u0026nbsp;\u0026nbsp;\u003ca href=\"#example\"\u003eExample\u003c/a\u003e\u0026nbsp;\u0026nbsp;\u0026nbsp;|\u0026nbsp;\u0026nbsp;\u0026nbsp;\u003ca href=\"#contributions\"\u003eContribution\u003c/a\u003e\u0026nbsp;\u0026nbsp;\u0026nbsp;|\u0026nbsp;\u0026nbsp;\u0026nbsp;\u003ca href=\"#to-do\"\u003eTo-DO\u003c/a\u003e\u0026nbsp;\u0026nbsp;\u0026nbsp;|\u0026nbsp;\u0026nbsp;\u0026nbsp;\u003ca href=\"#acknowledgements\"\u003eAcknowledgements\u003c/a\u003e\n\u003c/h4\u003e\n\u003c/div\u003e\n\n# playx in action\n\n\u003cp align=\"center\"\u003e\n\u003cimg src=\"playx.gif\"\u003e\n\u003c/a\u003e\n\u003c/p\u003e\n\n# Philosophy\n\nPlay any songs that come in your mind.\n\u003e Hoping to make it an awesome music assistant\n\n---------\n\n## Installation\n\n- For Arch Linux users, it is available in AUR with the name [playx](https://aur.archlinux.org/packages/playx/).\n\n- For others, it can be installed manually.\n\n  __Make sure all the [dependencies](#Requirements/Dependencies) are installed.__\n\n  Run the following command in the root directory to install playx.\n\n  ```\n  pip install -e .\n  ```\n\n  Or install using setup.py as:\n\n  ```bash\n  python setup.py install\n  ```\n\n  This method is the recommended one.\n\n------------\n\n## Requirements/Dependencies\n\n1. Python3.x\n\n2. pip3\n\n3. MPV\n\n * Get \u003ca href = https://mpv.io/\u003eMPV (website)\u003c/a\u003e from here.\n\n * Get \u003ca href = https://github.com/mpv-player/mpv\u003eMPV (github)\u003c/a\u003e from here.\n\n4. [Chromium](https://download-chromium.appspot.com/)\n\n\u003e **Note**: These dependencies in linux can be installed in other variants.  \n\u003e For *arch linux*, you can use **pacman** package manager accordingly.\n\u003e Numpy is used for Markov-Chain based playlist.\n\n\n------------\n\n## Releases\nThese releases are almost stable.\n\n- [v1.5.2-approximate-void](https://github.com/NISH1001/playx/releases/tag/v1.5.2-approximate-void)\n\n------------\n\n## Features\n\n- play by query\n- play by youtube url\n- play a youtube playlist\n- play a billboard chart\n- play a spotify playlist\n- play from soundcloud playlist\n- play from JioSaavn playlist\n- play from gaana playlist.\n- play from local playlist\n- play from Youtube Music playlist\n- cache support\n- CLI using `mpv`\n- auto generate playlist\n------------\n\n## Usage\nFor now, the application is in development phase.  \n\n```console\nusage: playx [-h] [-rsearch [RSEARCH [RSEARCH ...]]] [-p] [-n] [-a] [-d] [-r] [-k] [-c] [--sync-pl PLAYLIST] [-l] [--shuffle] [--repeat [NUMBER]] [--pl-start START] [--pl-end END]\n             [--level LEVEL] [--disable-file] [--list-level]\n             [song [song ...]]\n\nplayx - Search and play any song that comes to your mind. If you have any issues, raise an issue in the github (https://github.com/NISH1001/playx) page\n\npositional arguments:\n  song                  Name or youtube link of song to download\n\noptional arguments:\n  -h, --help            show this help message and exit\n  -rsearch [RSEARCH [RSEARCH ...]], --rsearch [RSEARCH [RSEARCH ...]]\n                        Play based on terms provided\n  -p, --play-cache      Play all songs from the cache. The cache is located at [~/.playx/songs/] by default\n  -n, --no-cache        Don't download the song for later use.\n  -a, --auto            Auto generate playlist\n  -d, --skip-cached     Don't search the song in the cache.\n  -r, --no-related      Disable playing related songs extracted from YouTube\n  -k, --disable-kw      Disable addition of keywords while searching the song on YouTube.\n  -c, --clean           Clean(fix) broken references\n  --sync-pl PLAYLIST    Sync the playlists. Pass the name as argument. If all the playlists are to be synced, just pass [All].\n  -l, --lyrics          Show lyircs of the song.\n  --shuffle             Shuffle the playlist in case it is one, else the option will have no effect.\n  --repeat [NUMBER]     Put the passed entity on repeat , be it a playlist or a song. If an arg is not passed, infinite loop is considered. (default = Infinite)\n  --pl-start START      Start position in case a playlist is passed. If passed without a playlist it has no effect.\n  --pl-end END          End position in case a playlist is passed. If passed without a playlist it has no effect.\n\nLogger:\n  --level LEVEL         The level of the logger that will be used while verbosing. Use `--list-level` to check available options.\n  --disable-file        Disable logging to files\n  --list-level          List all the available logger levels.\n```\n\n------------\n\n### Example\n**Play by song name**\n```bash\nplayx \u003csong name\u003e\n```\n  \n**Play by youtube link**  \n```bash\nplayx \u003cYT url\u003e\n```\n\n**Play by soundcloud links**\n```sh\nplayx https://api.soundcloud.com/tracks/232673157\n```\nThis plays soundcloud [track](https://api.soundcloud.com/tracks/232673157)\n  \n**Play from youtube playlist**  \n```bash\nplayx \u003cYT playlist URL\u003e\n```\n\n**Play from a Billboard Chart**\n```sh\nplayx hot-100\n```\n\n**Play from spotify playlist**\n```sh\nplayx https://open.spotify.com/playlist/37i9dQZF1DX5Ozry5U6G0d\n```\nThis plays the songs from Spotify [Summer Party](https://open.spotify.com/playlist/37i9dQZF1DX5Ozry5U6G0d) playlist.\n\n**Play from soundcloud playlist**\n```sh\nplayx https://soundcloud.com/devintracy/sets/goodafternoon\n```\nThis plays the songs from SoundCloud [playlist](https://soundcloud.com/devintracy/sets/goodafternoon)\n\n**Play from JioSaavn playlist**\n```sh\nplayx https://www.jiosaavn.com/featured/magical-amit-trivedi/IGYxX3V4T7w_\n```\nThis plays songs from the JioSaavn [playlist](https://www.jiosaavn.com/featured/magical-amit-trivedi/IGYxX3V4T7w_)\n\n**Play from YouTube Music Playlist**\n```sh\nplayx \u003cYT Music playlist url\u003e\n```\n\n**Play from local playlist**\n\nThe local playlist should have an extension ```.playx``` in order for us to recognize it as a playlist.\n```sh\nplayx example.playx\n```\nThis plays a playlist named example.playx\n\nFor a playlist every line is considered an entry. Refer to [example.playx](https://github.com/NISH1001/playx/blob/develop/example.playx).  \n  \n**Auto-Generate Playlist**\n```bash\nplayx --auto\n```\nThis will automatically generate a playlist by using the frequency of songs played that has been logged in the log file.  \n\n\n**Term-Based Search**\n```bash\nplayx --rsearch \u003csearch terms\u003e\n```\nThis will automatically generate a playlist of cached songs containing the provided terms.\n  \n------------\n\n## Cache Directory Structure\nBy default, `playx` creates a directory in the home as `~/.playx` (which is a hidden folder). \nStructure is like:  \n```bash\n.playx\n    |- songs/\n    |- logs/\n    |- playlist/\n    |- playxlist/\n```\n\n*songs*: This stores all the songs\n*logs*: This stores the log for user activities of songs that are searched and played with creation date. This will be used for recommendation of songs in future version\n*playlist*: This stores all the cached playlists files.\n*playxlist*: Stores all the playxlist files.\n\n------------\n\n## Having Issues? (We're not perfect!)\n\n### First update youtube-dl\n[youtube-dl](https://github.com/ytdl-org/youtube-dl) is the core through which we fetch stream urls for any song or any YT playlist.  \nSo, update it first\n\n```bash\npip install -U youtube-dl\n```\n\nyoutube-dl keeps on rolling out updates actively because the YouTube keeps on updating its internals for html. So, the parser/crawler should be updated periodically.\n\n### Second try cleaning the broken cache as\n```bash\nplayx --clean\n```\nChances are you have a url in the `urls.json` but the local mp3 might not exist in `~/.playx/songs/`.\nSo, cleaning and running the playx might mitigate that.\n\n### See The Partial Log \nLog is found at `logs/partial_log`\n\n### See Playlist File\nFiles can be found inside `playlist/`. Chances are there might be empty links or names.\n\n### Selenium Web Driver Issue\nMaybe you don't have the chromedriver that's required to crawl.  \nOne example of how we use chromedriver is [here](https://github.com/NISH1001/playx/blob/develop/playx/playlist/ytrelated.py#L126).\n\nNot having proper setup of the driver may result in empty playlists, especially related playlist one.\n\n### Please Create An Issue In GitHub here\n\n\n------------\n\n## Contributions\nContributions are warmly welcome. Please do go through [CONTRIBUTING](https://github.com/NISH1001/playx/blob/develop/CONTRIBUTING.md).\n\n------------\n\n## Module-level Dependency Graph\nThis is generated using [pydeps](https://github.com/thebjorn/pydeps). The codebase is kinda messy, isn't it? :D\n\n\n\u003ch1 align=center\u003e\n\u003cimg src=\"playx.svg\" width=100%\u003e\n\u003c/h1\u003e\n\n------------\n\n## TO-DO\n- ~~caching of downloaded songs (if the song exists locally, play it right away else play from youtube)~~\n- ~~speed up the whole **search-\u003edownload-\u003econvert-\u003eplay** process~~\n- ~~stream/play while downloading the song~~\n- ~~play all the songs from the cache~~\n- ~~search lyrics~~\n- ~~play from youtube playlist~~\n- ~~play from local playlist (may be a list of song names)~~\n- ~~play from other playlist (spotify, billboard, etc.)~~\n- ~~log activity~~\n- ~~auto generate playlist~~\n- ~~use Markov Chains to improve auto-playlist~~\n- ~~local search based on term matching~~\n- use Factorization Machines to improve auto-playlist\n- use logs to create simple recommendations\n- Add 3rd-party integration like Spotify (using authentication mechanism). [Priority - Low]\n\n\n## Acknowledgements\n- Thanks to [Deepjyoti Barman](https://github.com/deepjyoti30) for doing all the major contributions (parallelizing streaming + downloads\n, playlist, logger)\n- Thanks to [Mirza Zulfan](https://github.com/mirzazulfan) for logo for `playx`. It's neat (and cool)\n- Thanks to [Mattwmaster58](https://github.com/Mattwmaster58) for creating packaging structure with setup file\n- A good blog by Deepjyoti about copyright infringement and licensing issues we encountered for playx can be found [here](https://deepjyoti30.github.io/blog/github-and-people-who-steal).\n","funding_links":[],"categories":["Python"],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FNISH1001%2Fplayx","html_url":"https://awesome.ecosyste.ms/projects/github.com%2FNISH1001%2Fplayx","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FNISH1001%2Fplayx/lists"}