-
Notifications
You must be signed in to change notification settings - Fork 127
/
Copy pathrec-dir.html
98 lines (98 loc) · 6.8 KB
/
rec-dir.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml" lang="en" xml:lang="en">
<head>
<meta charset="utf-8" />
<meta name="generator" content="pandoc" />
<meta name="viewport" content="width=device-width, initial-scale=1.0, user-scalable=yes" />
<title>PyRadio Recordings Directory</title>
<style>
body {padding: 2em;}
@media screen and (max-width: 770px) {
body {padding: 10px;}
}
body {max-width: 750px; margin: auto;}
h2 {margin-top: 2.5em; border-bottom:1px solid SaddleBrown; color: SaddleBrown;}
h3 {margin-top: 2em; color: SaddleBrown; text-decoration: underline SaddleBrown}
h4 {margin: 2em 0 1em 0; color: SaddleBrown; font-size: 1em;}
h4:before {content: "# "; font-weight: bold; vertical-align: middle;}
h5 {margin: 2em 0 1em 0; color: SaddleBrown; font-size: 1em;;}
h5:before {content: "## "; font-weight: bold; vertical-align: middle;}
p, table, ol, ul {margin-left: .8em;}
STRONG {color: SaddleBrown;}
dl {margin: 2em;}
dd {margin: 1em;}
dt {font-weight: bold;}
TABLE {border: 1px solid SaddleBrown; border-collapse: collapse; margin-left: auto; margin-right: auto; border-radius: 5px; -moz-border-radius: 5px; border-collapse:separate; box-shadow: 5px 5px 15px #888888;}
TH {text-align: left; vertical-align: top; padding: 5px;color: SaddleBrown;border: 1px solid SaddleBrown; background-color: SaddleBrown; color: white;}
TD {text-align: left; vertical-align: top; padding: 5px 10px;border: 1px solid SaddleBrown;}
pre { background-color: rgba(245, 245, 245, 1); color: #474747; padding: 1.5em; border: 1px solid #C7C7C7; border-radius: 5px; -moz-border-radius: 5px; -webkit-border-radius: 5px; overflow: auto; box-shadow: 5px 5px 15px #C7C7C7;}
.task-list {list-style-type: none; padding: 0; margin: 0 0 0 1em ;}
img{display: block; margin-left: auto; margin-right: auto; max-width: 750px; width: 100%; background:transparent; padding:3px; border:1px solid #999999; border-radius: 5px; -moz-border-radius: 5px; -webkit-border-radius: 5px; box-shadow:5px 5px 15px #888888;}
.indented {text-indent: -1.5em; padding-left: 1.5em; margin-left: 1em;}
a{ color: SaddleBrown;}
a:visited{color: SaddleBrown;}
</style>
</head>
<body>
<header id="title-block-header">
</header>
<h1 style="color: SaddleBrown" id="pyradio-recordings-directory">PyRadio Recordings Directory</h1>
<p><strong>PyRadio</strong> will record stations to files (when <a href="recording.html">recording</a> is enabled) and save the resulting files in a dedicated directory.</p>
<p>This directory used to be inside the “<strong>configuration directory</strong>”, but since <strong>v. 0.9.2.26</strong> it will be located in the user’s home directory and will be named “<strong>pyradio-recordings</strong>”, by default.</p>
<p>Also, since <strong>v. 0.9.3</strong>, the directory is user selectable, providing this way maximum flexibility.</p>
<p>When the new directory is selected (actually typed or pasted in the relevant dialog), and saved, <strong>PyRadio</strong> will try to <strong>move</strong> the existing directory to the new location.</p>
<p>This is a case table of how this will work.</p>
<table>
<colgroup>
<col style="width: 1%" />
<col style="width: 27%" />
<col style="width: 71%" />
</colgroup>
<thead>
<tr>
<th></th>
<th>If the new directory</th>
<th>PyRadio will</th>
</tr>
</thead>
<tbody>
<tr>
<td>1.</td>
<td>does not exist</td>
<td>move the original directory to the new location and optionally rename it</td>
</tr>
<tr>
<td>2.</td>
<td>already exists and it is <strong>empty</strong></td>
<td>delete the new directory and move the original directory to the new location and optionally rename it</td>
</tr>
<tr>
<td>3.</td>
<td>already exists and it is <strong>not empty</strong></td>
<td>move the original directory <strong>inside</strong> the new directory and optionally rename it</td>
</tr>
</tbody>
</table>
<h3 id="new-directory-does-not-exist">1. New directory does not exist</h3>
<p>There’s nothing more to say about this case; the old directory will be moved/renamed and will be available to the program immediately.</p>
<h3 id="new-directory-exists-and-it-is-empty">2. New directory exists and it is empty</h3>
<p>The user experience will be the same as the previous case, though the directory will actually be removed before moving/renaming the old directory.</p>
<p>Please make sure you do not specify a commonly OS used folder here, such as “<em>Downloads</em>”, “<em>Documents</em>” or “<em>Pictures</em>”, as it may be <strong>overwritten</strong>.</p>
<h3 id="new-directory-exists-but-it-is-not-empty">3. New directory exists but it is not empty</h3>
<p>This is when it gets tricky; the original directory will be renamed to “<strong>pyradio-recordings</strong>” and will be moved inside the user specified folder. <strong>PyRadio</strong> will use this moved directory to save recorded files instead of the one specified by the user (which will actually be the parent directory of the “<em>pyradio-recordings</em>” directory.)</p>
<h2 id="pre-0.9.3-installation-behavior">Pre 0.9.3 installation behavior <span style="padding-left: 10px;"><sup style="font-size: 50%"><a href="#" title="Go to top of the page">Top</a></sup></span></h2>
<p>Pre 0.9.3 installations will use ~/.config/pyradio/data/recordings as the recording directory, by default.</p>
<p>After updating to v. 0.9.3 (and newer), <strong>PyRadio</strong> will move this directory to the user’s home folder and rename it to “<strong>pyradio-recordings</strong>”.</p>
<p>Then the user can change the folder’s location from <em>Config / General options / Recording dir</em>.</p>
<h2 id="post-0.9.3.10-behavior">Post 0.9.3.10 behavior <span style="padding-left: 10px;"><sup style="font-size: 50%"><a href="#" title="Go to top of the page">Top</a></sup></span></h2>
<p>Up until <strong>v. 0.9.3.10, PyRadio</strong> would create the “<em>recording directory</em>” upon startup, no matter where it would be located, making it available for the recording and titles’ log function.</p>
<p>This eventually creates the following problem:</p>
<p>A user who never wants to use the recording or the titles’ log function, ends up with an empty directory in his home folder, which will be recreated every time <strong>PyRadio</strong> is executed (even if deleted before that), as described in <a target="_blank" href="https://github.com/coderholic/pyradio/issues/253">issue No. 253</a>.</p>
<p>The solution is that <strong>PyRadio</strong> will remove the “<em>recording directory</em>” upon execution, if</p>
<ol type="1">
<li>the default location is used</li>
<li>the directory is empty</li>
</ol>
<p>As a consequence, both the recording and the titles’ log function will make sure the directory actually exists (and create it if it does not), before trying to save any data to it.</p>
</body>
</html>