feat: rename default stream mount point to main
This will not change the default mount point if you are upgrading. BREAKING: The default stream mount point changed from `airtime_128` to `main`. Be sure to updates your clients accordingly.
This commit is contained in:
parent
f936ba39ed
commit
71cfab79ef
|
@ -0,0 +1,25 @@
|
||||||
|
from django.db import migrations
|
||||||
|
|
||||||
|
from ._migrations import legacy_migration_factory
|
||||||
|
|
||||||
|
UP = """
|
||||||
|
INSERT INTO "cc_pref" ("keystr", "valstr") VALUES ('default_stream_mount_point', 'airtime_128');
|
||||||
|
"""
|
||||||
|
|
||||||
|
DOWN = """
|
||||||
|
DELETE FROM "cc_pref" WHERE "keystr" = 'default_stream_mount_point';
|
||||||
|
"""
|
||||||
|
|
||||||
|
|
||||||
|
class Migration(migrations.Migration):
|
||||||
|
dependencies = [
|
||||||
|
("legacy", "0030_3_0_0_alpha_13_4"),
|
||||||
|
]
|
||||||
|
operations = [
|
||||||
|
migrations.RunPython(
|
||||||
|
code=legacy_migration_factory(
|
||||||
|
target="3.0.0-alpha.13.5",
|
||||||
|
sql=UP,
|
||||||
|
)
|
||||||
|
)
|
||||||
|
]
|
|
@ -1 +1 @@
|
||||||
LEGACY_SCHEMA_VERSION = "3.0.0-alpha.13.4"
|
LEGACY_SCHEMA_VERSION = "3.0.0-alpha.13.5"
|
||||||
|
|
|
@ -31,7 +31,7 @@ INSERT INTO cc_stream_setting ("keyname", "value", "type") VALUES ('s1_user', ''
|
||||||
INSERT INTO cc_stream_setting ("keyname", "value", "type") VALUES ('s1_pass', 'hackme', 'string');
|
INSERT INTO cc_stream_setting ("keyname", "value", "type") VALUES ('s1_pass', 'hackme', 'string');
|
||||||
INSERT INTO cc_stream_setting ("keyname", "value", "type") VALUES ('s1_admin_user', 'admin', 'string');
|
INSERT INTO cc_stream_setting ("keyname", "value", "type") VALUES ('s1_admin_user', 'admin', 'string');
|
||||||
INSERT INTO cc_stream_setting ("keyname", "value", "type") VALUES ('s1_admin_pass', '', 'string');
|
INSERT INTO cc_stream_setting ("keyname", "value", "type") VALUES ('s1_admin_pass', '', 'string');
|
||||||
INSERT INTO cc_stream_setting ("keyname", "value", "type") VALUES ('s1_mount', 'airtime_128', 'string');
|
INSERT INTO cc_stream_setting ("keyname", "value", "type") VALUES ('s1_mount', 'main', 'string');
|
||||||
INSERT INTO cc_stream_setting ("keyname", "value", "type") VALUES ('s1_url', 'https://libretime.org', 'string');
|
INSERT INTO cc_stream_setting ("keyname", "value", "type") VALUES ('s1_url', 'https://libretime.org', 'string');
|
||||||
INSERT INTO cc_stream_setting ("keyname", "value", "type") VALUES ('s1_description', 'LibreTime Radio! Stream #1', 'string');
|
INSERT INTO cc_stream_setting ("keyname", "value", "type") VALUES ('s1_description', 'LibreTime Radio! Stream #1', 'string');
|
||||||
INSERT INTO cc_stream_setting ("keyname", "value", "type") VALUES ('s1_genre', 'genre', 'string');
|
INSERT INTO cc_stream_setting ("keyname", "value", "type") VALUES ('s1_genre', 'genre', 'string');
|
||||||
|
@ -370,3 +370,5 @@ INSERT INTO cc_pref("keystr", "valstr") VALUES('whats_new_dialog_viewed', 1);
|
||||||
INSERT INTO cc_pref("keystr", "valstr") VALUES('podcast_album_override', 1);
|
INSERT INTO cc_pref("keystr", "valstr") VALUES('podcast_album_override', 1);
|
||||||
INSERT INTO cc_pref("keystr", "valstr") VALUES('podcast_auto_smartblock', 0);
|
INSERT INTO cc_pref("keystr", "valstr") VALUES('podcast_auto_smartblock', 0);
|
||||||
-- end
|
-- end
|
||||||
|
|
||||||
|
INSERT INTO cc_pref("keystr", "valstr") VALUES('default_stream_mount_point', 'main');
|
||||||
|
|
|
@ -46,17 +46,17 @@ The Icecast server has a _fallback-mount_ feature which can be used to move clie
|
||||||
|
|
||||||
To enable fallback mounts, edit the main Icecast configuration file (`/etc/icecast2/icecast.xml`) to define the mount points you will use, and the relationship between them.
|
To enable fallback mounts, edit the main Icecast configuration file (`/etc/icecast2/icecast.xml`) to define the mount points you will use, and the relationship between them.
|
||||||
|
|
||||||
The example mount section provided in the `icecast.xml` file is commented out by default. Before or after the commented section, add three mount point definitions. The default mount point used by LibreTime is `/airtime_128` which is shown in the `/etc/libretime/liquidsoap.cfg` file. You must also define a mount point for the live source (ex. `/live.ogg`) and a mount point for the public to connect to (ex. `/stream.ogg`).
|
The example mount section provided in the `icecast.xml` file is commented out by default. Before or after the commented section, add three mount point definitions. The default mount point used by LibreTime is `/main` which is shown in the `/etc/libretime/liquidsoap.cfg` file. You must also define a mount point for the live source (ex. `/live.ogg`) and a mount point for the public to connect to (ex. `/stream.ogg`).
|
||||||
|
|
||||||
```xml title="/etc/icecast2/icecast.xml"
|
```xml title="/etc/icecast2/icecast.xml"
|
||||||
<mount>
|
<mount>
|
||||||
<mount-name>/airtime_128</mount-name>
|
<mount-name>/main</mount-name>
|
||||||
<hidden>0</hidden>
|
<hidden>0</hidden>
|
||||||
</mount>
|
</mount>
|
||||||
|
|
||||||
<mount>
|
<mount>
|
||||||
<mount-name>/live.ogg</mount-name>
|
<mount-name>/live.ogg</mount-name>
|
||||||
<fallback-mount>/airtime_128</fallback-mount>
|
<fallback-mount>/main</fallback-mount>
|
||||||
<fallback-override>1</fallback-override>
|
<fallback-override>1</fallback-override>
|
||||||
<hidden>0</hidden>
|
<hidden>0</hidden>
|
||||||
</mount>
|
</mount>
|
||||||
|
@ -69,9 +69,9 @@ The example mount section provided in the `icecast.xml` file is commented out by
|
||||||
</mount>
|
</mount>
|
||||||
```
|
```
|
||||||
|
|
||||||
These mount point definitions mean that a client connecting to a URL such as *http://icecast.example.com:8000/stream.ogg* will first fall back to the `/live.ogg` mount point if it is available. If not, the client will fall back in turn to the `/airtime_128` mount point for LibreTime playout.
|
These mount point definitions mean that a client connecting to a URL such as *http://icecast.example.com:8000/stream.ogg* will first fall back to the `/live.ogg` mount point if it is available. If not, the client will fall back in turn to the `/main` mount point for LibreTime playout.
|
||||||
|
|
||||||
Setting the value of _fallback-override_ to 1 (enabled) means that when the `/live.ogg` mount point becomes available again, the client will be re-connected to it. If you wish to hide the `/airtime_128` and `/live.ogg` mount points from the public Icecast web interface, set the value of _hidden_ in each of these definitions to 1.
|
Setting the value of _fallback-override_ to 1 (enabled) means that when the `/live.ogg` mount point becomes available again, the client will be re-connected to it. If you wish to hide the `/main` and `/live.ogg` mount points from the public Icecast web interface, set the value of _hidden_ in each of these definitions to 1.
|
||||||
|
|
||||||
## Source configuration
|
## Source configuration
|
||||||
|
|
||||||
|
|
|
@ -36,7 +36,7 @@ For example, using the action _get-stream-setting_ returns the following output
|
||||||
|
|
||||||
{"keyname":"s1_port","value":"8000","type":"integer"},
|
{"keyname":"s1_port","value":"8000","type":"integer"},
|
||||||
|
|
||||||
{"keyname":"s1_mount","value":"airtime_128","type":"string"},
|
{"keyname":"s1_mount","value":"main","type":"string"},
|
||||||
|
|
||||||
{"keyname":"s1_url","value":"http:\/\/airtime.sourcefabric.org","type":"string"},
|
{"keyname":"s1_url","value":"http:\/\/airtime.sourcefabric.org","type":"string"},
|
||||||
|
|
||||||
|
|
|
@ -1452,6 +1452,16 @@ class Application_Model_Preference
|
||||||
self::setValue('default_icecast_password', $value);
|
self::setValue('default_icecast_password', $value);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public static function getDefaultStreamMountPoint()
|
||||||
|
{
|
||||||
|
return self::getValue('default_stream_mount_point');
|
||||||
|
}
|
||||||
|
|
||||||
|
public static function setDefaultStreamMountPoint($value)
|
||||||
|
{
|
||||||
|
self::setValue('default_stream_mount_point', $value);
|
||||||
|
}
|
||||||
|
|
||||||
public static function getRadioPageDisplayLoginButton()
|
public static function getRadioPageDisplayLoginButton()
|
||||||
{
|
{
|
||||||
return self::getValue('radio_page_display_login_button');
|
return self::getValue('radio_page_display_login_button');
|
||||||
|
|
|
@ -289,7 +289,7 @@ class Application_Model_StreamSetting
|
||||||
'user' => $config['stationId'],
|
'user' => $config['stationId'],
|
||||||
'pass' => Application_Model_Preference::getDefaultIcecastPassword(),
|
'pass' => Application_Model_Preference::getDefaultIcecastPassword(),
|
||||||
// Manually setting default mountpoint
|
// Manually setting default mountpoint
|
||||||
'mount' => 'airtime_128',
|
'mount' => Application_Model_Preference::getDefaultStreamMountpoint(),
|
||||||
];
|
];
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue