You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+57-28Lines changed: 57 additions & 28 deletions
Original file line number
Diff line number
Diff line change
@@ -1,24 +1,29 @@
1
+

2
+
1
3
# Onthespot
4
+
2
5
qt based music downloader written in python.
6
+
3
7

4
8
5
9
### Discord for discussions: [Discord Invite](https://discord.gg/hz4mAwSujH)
6
10
If you have an idea for an improvement or feature, create a issue or join the discord server to discuss!
7
11
8
12
# 1. Installing/launching application:
9
-
## 1.1. From source
13
+
## 1.1. Launch without installing - from source
10
14
Make sure [python3](https://www.python.org/downloads) and [Git](https://git-scm.com/downloads) are installed on your system, if you are on windows you also need to install Microsoft C++ build tools from [HERE](https://visualstudio.microsoft.com/visual-cpp-build-tools/) and restart your computer before starting build process.
11
15
- Download or Clone the repo ```git clone https://github.com/casualsnek/onthespot```
12
16
- Navigate to the onthespot directory ```cd onthespot```
13
17
- Install the dependencies with ```pip install -r requirements.txt```
14
-
- Launch the application with ```python3 __init__.py```
18
+
- Navigate to source directory ```cd src```
19
+
- Launch the application with ```python3 -m onthespot```
15
20
16
21
*Windows users should also follow these extra steps before running:*```python3 onthespot.py```
17
22
```
18
23
pip install winsdk
19
24
```
20
25
21
-
## 1.2. Using prebuilt binaries
26
+
## 1.2. Using portable prebuilt binaries
22
27
### On Linux
23
28
#### Arch Linux
24
29
`onthespot` is available for arch linux and arch linux based distributions in arch user repository (aur) as [onthespot-git](https://aur.archlinux.org/packages/onthespot-git).
@@ -37,24 +42,25 @@ Download Latest 'onthespot_linux' from the release section and execute with
37
42
./onethespot_linux
38
43
```
39
44
### On Windows
40
-
Download Latest 'onthespot_win_ffm.exe' or 'onthespot_win.exe' from the Release section and execute by doubleclicking the downloaded file.
45
+
Download Latest 'onthespot_win_ffm.exe' or 'onthespot_win.exe' from the Release section and execute by double-clicking the downloaded file.
41
46
42
47
The binaries with filename ending with '_ffm' have ffmpeg bundled and should not require manual installation.
43
48
44
49
If you are using binaries that does not bundle ffmpeg and downloads gets stuck at 99% with ```Converting``` on progress text, you are missing ffmpeg ! Please install it by following the instructions below
45
50
46
51
#### Installing ffmpeg in windows
47
52
- Open Windows Explorer and Navigate to ```C:\``` Drive and make a folder name ```ffmpeg``` there
48
-
- Download ffmpef zip from [https://www.gyan.dev/ffmpeg/builds/ffmpeg-release-full.7z](https://www.gyan.dev/ffmpeg/builds/ffmpeg-release-full.7z) then copy the ``bin`` folder from zip to ```C:\ffmpeg```
53
+
- Download ffmpeg zip from [https://www.gyan.dev/ffmpeg/builds/ffmpeg-release-full.7z](https://www.gyan.dev/ffmpeg/builds/ffmpeg-release-full.7z) then copy the ``bin`` folder from zip to ```C:\ffmpeg```
49
54
- Open CMD as administrator and run the command: ```setx /m PATH "C:\ffmpeg\bin;%PATH%"```
50
55
51
56
Now the application should work as expected.
52
57
53
58
54
-
# 2. Building manually
55
-
Building on any OS requires Git, Python3 and Pip installed. Make sure you have them installed !
59
+
# 2. Building/packaging manually
60
+
Building or packaging on any OS requires Git, Python3 and Pip installed. Make sure you have them installed !
56
61
57
-
## 2.1. On Linux/nix
62
+
## 2.1. Building portable binaries
63
+
### 2.1.1 On Linux/nix
58
64
Open terminal emulator and run the following command to clone the repository and build.
59
65
```bash
60
66
git clone https://github.com/casualsnek/onthespot
@@ -67,8 +73,7 @@ bash ./build_linux.sh
67
73
```
68
74
After the command completes, you should have a 'dist' directory in repository root containing built 'onthespot_linux' binary.
69
75
70
-
## 2.2. On Windows
71
-
Download Microsoft C++ build tools from [Here](https://visualstudio.microsoft.com/visual-cpp-build-tools/). Setup/Install it and reboot your computer. ( Required for building simpleaudio python module)
76
+
### 2.1.2. On Windows
72
77
73
78
Open cmd and run the following command to clone the repository and build.
74
79
```cmd
@@ -84,20 +89,36 @@ build_winC2.bat
84
89
```
85
90
After the command completes, you should have a 'dist' directory in repository root containing built 'onthespot_win.exe' binary.
86
91
92
+
## 2.2. Building wheel for installing with pip
93
+
You can also build onthespot as wheel and install it as python module via pip in your system. It provides better integration with system, like using your system's Qt style and themes as well as you can use provided icon and .desktop file for better integration under linux systems.
94
+
95
+
Make sure you have set up tools installed !
96
+
97
+
Open terminal emulator and run the following command to clone the repository and build.
98
+
```bash
99
+
git clone https://github.com/casualsnek/onthespot
100
+
cd onthespot
101
+
python -m build
102
+
```
103
+
This will create a dist directory containing .whl file that can now be installed with pip, the application can be launched with the command ```onthespot_gui``` or ```python3 -m onthespot``` after installing !
104
+
105
+
**NOTE :** If you are packaging onthespot for distribution, copy ```src/onthespot/resources/icon.svg``` to either ```/usr/share/icons/hicolor/scalable/apps/casual_onthespot.svg``` or ```$HOME/.local/share/icons/hicolor/scalable/apps/casual_onthespot.svg```, and ``` src/onthespot/resources/org.eu.casualsnek.onthespot.desktop``` to either ```/usr/share/applications/org.eu.casualsnek.onthespot.desktop``` or ```$HOME/.local/share/applications/org.eu.casualsnek.onthespot.desktop```. This allows application to be better integrated to desktop environments !
87
106
88
-
If you have ideas for improvement/features create a issue or join discord server for discussion !
107
+
<br>
108
+
If you have ideas for improvement/features create an issue or join discord server for discussion !
89
109
90
110
# 3. Basic Usage
91
111
## Getting started
92
112
On your first launch of application you will get a warning that no spotify accounts are added, click ok and add your account(s) at the bottom of the application. After adding your accounts, close and restart the application. Having multiple accounts will let you download multiple songs at a time.
93
113
94
114
## Searching/Downloading via query
95
-
Click on 'Search' tab then enter your query and cick search to search for songs/artists/albums/playlists and click download.
115
+
Click on 'Search' tab then enter your query and click search to search for songs/artists/albums/playlists and click download.
96
116
You can download any media like 'Albums', 'Tracks', etc., that appear on the results table all at once by using the download buttons below the results table.
97
117
*Note that Media Type other than 'Tracks' can take a little longer to parse and download. The application may appear to be frozen in this state !*
98
118
99
119
## Downloading by URL
100
-
Enter the url in the url field then click download.
120
+
Enter the url in the search field then click download.
121
+
You can also enter path of text file containing URL, and it will queue all url(s) in it !
101
122
*Note that Media Type other than 'Tracks' can take a little longer to parse and download. Application may appear to be frozen in this state !*
102
123
103
124
## Download status
@@ -123,12 +144,20 @@ Default track names are ```AlbumFormatter/TrackName```
123
144
-**Track name formatter**:
124
145
This option allows you to set the naming scheme of downloaded tracks.
125
146
Variables can be used by enclosing them between `{}`. A few variables are available to use in the naming scheme:
126
-
- artist : name of artist of track
127
-
- album : name of album the track is in *
128
-
- name : name of track
129
-
- rel_year : release year of track
130
-
- disc_number : disk number in which track lies *
131
-
- track_number : serial Number of track in album *
147
+
- artist : Name of artist of track
148
+
- album : Name of album the track is in *
149
+
- name : Name of track
150
+
- rel_year : Release year of track
151
+
- disc_number : Disk number in which track lies *
152
+
- track_number : Serial Number of track in album *
153
+
- playlist_name : Name of playlist if the track is being downloaded as part of playlist *
154
+
- playlist_owner : Name of playlist if the track is being downloaded as part of playlist *
155
+
- playlist_desc : Description of playlist if the track is being downloaded as part of playlist *
156
+
- genre : Genre of song *
157
+
- label : Name of record label
158
+
- explicit : 'Explicit' if the song is marked explicit else it will be blank
159
+
- trackcount : Total number of tracks on the album this track is in
160
+
- disccount : Total number of discs on the album this track is in
132
161
- spotid : Spotify ID
133
162
- Example: ```Song: {name} of album: {album} Released in {rel_year}```.
134
163
The value of variables with their description ending in * maybe empty in some cases. This can also be a path.
@@ -139,8 +168,13 @@ Variables can be used by enclosing them between `{}`. A few variables are availa
139
168
- artist : name of the main artist of the album
140
169
- rel_year: the release year of the album *
141
170
- album: name of the album
171
+
- playlist_name : Name of playlist if the track is being downloaded as part of playlist *
172
+
- playlist_owner : Name of playlist if the track is being downloaded as part of playlist *
173
+
- playlist_desc : Description of playlist if the track is being downloaded as part of playlist *
174
+
- genre : Genre of song *
175
+
- label : Name of record label
142
176
- Example: ```{artist}/{rel_year}/{album}```.
143
-
The value of variables with their description ending in * maybe empty in some cases. This can be a path too.
177
+
The value of variables with their description ending in * maybe empty in some cases. This can be a path too.
144
178
145
179
-**Download chunk size**:
146
180
Size of chunks (bytes) used for downloading.
@@ -153,25 +187,20 @@ Time to wait before attempting another download after failed attempt.
153
187
154
188
-**Skip bytes at the end (download end skip bytes)**:
155
189
Sometimes the last few bytes of a track can't be downloaded which causes 'PD Error' to show up which causes downloads to fail constantly, this sets the number of bytes to skip downloading if this happens.
156
-
The value might change but the current working vaue is '167' bytes. If you get 'decode errors' or incomplete song downloads try setting it to 0.
190
+
The value might change but the current working value is '167' bytes. If you get 'decode errors' or incomplete song downloads try setting it to 0.
157
191
158
192
-**Force Artist/Album dir for track/playlist items**:
159
193
If this is disabled the tracks downloaded will be placed in the root of download directory instead of artist/album directories.
160
-
Enabling this might cause slower download parsing but makes orgainsing music easier.
194
+
Enabling this might cause slower download parsing but makes organising music easier.
161
195
162
196
-**Media Format**:
163
197
Format of media you want your final music download to be in.
164
198
Do not include '.' in it. This setting will be ignored while using the raw media download option.
165
199
166
200
# 5. Issues
167
201
Decode error: If you are receiving this error, your account might have got restricted. Wait some time or try a different account. The application may crash frequently as there is no proper exception handling yet. You can help by opening a new issue with the error message displayed in your console window after the application misbehaves.
168
-
169
-
# 6. TODOS
170
-
-~~Synced lyrics downloads~~
171
-
- Improve UI/UX ( Suggestions needed by users )
172
-
- Refactor code
173
202
174
-
# 7. Contributing/Supporting
203
+
# 6. Contributing/Supporting
175
204
You can write code to include additional feature or bug fixes or make a issue regarding bugs and features or just spread the work about the application :)
176
205
If you want to support financially, you can visit [Here](https://github.com/casualsnek/casualsnek) and support through open collective or BTC
177
206
If you like the project, show your support by giving it a star :) !
0 commit comments