Merge pull request #1379 from jooola/feat/rename_airtime_mvc_to_legacy

Rename airtime_mvc to legacy
This commit is contained in:
Kyle Robbertze 2021-10-11 12:36:45 +00:00 committed by GitHub
commit 3f2c6d871a
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1361 changed files with 184600 additions and 184597 deletions

2
.github/RELEASE.md vendored
View File

@ -107,7 +107,7 @@ The UI works best if you don't use it in an opinionated fashion and change just
If you want a secure environment you should work through the preparing the server docs (up until the dragons) and be prepared to fix some of the issues the installer gets wrong manually by hacking the config file after the fact.
If you want to skip the installer GUI completely you can configure LibreTime using airtime_mvc/build/airtime.example.conf as an template. Due to some python/PHP differences you must remove all comments from the example to use it 😞. You'll also have to create some folder structures manually and check if the music dir got properly created directly in the database. Referencing a second `install -fiap` install on a non productive system for reference can help with this type of bootstrap.
If you want to skip the installer GUI completely you can configure LibreTime using legacy/build/airtime.example.conf as an template. Due to some python/PHP differences you must remove all comments from the example to use it 😞. You'll also have to create some folder structures manually and check if the music dir got properly created directly in the database. Referencing a second `install -fiap` install on a non productive system for reference can help with this type of bootstrap.
### Media-Monitor config needs manual removing

View File

@ -28,7 +28,7 @@ echo -n "${suffix}" > ./VERSION
echo " Done"
echo -n "Running composer install..."
pushd airtime_mvc || (echo "could not cd in airtime_mvc!" && exit 1)
pushd legacy || (echo "could not cd in legacy!" && exit 1)
composer install --quiet --no-dev --ignore-platform-reqs
popd || exit
echo " Done"
@ -36,8 +36,8 @@ echo " Done"
# Adding back; may be useful later...
#echo "Minimizing LibreTime Javascript files..."
#cd $dir
#find $target/airtime_mvc/public/js/airtime/ -iname "*.js" -exec bash -c 'echo {}; jsmin/jsmin < {} > {}.min' \;
#find $target/airtime_mvc/public/js/airtime/ -iname "*.js" -exec mv {}.min {} \;
#find $target/legacy/public/js/airtime/ -iname "*.js" -exec bash -c 'echo {}; jsmin/jsmin < {} > {}.min' \;
#find $target/legacy/public/js/airtime/ -iname "*.js" -exec mv {}.min {} \;
#echo "Done"
cd ..
@ -52,7 +52,7 @@ tar -czf "libretime-${suffix}.tar.gz" \
--exclude .travis.yml \
--exclude travis \
--exclude dev_tools \
--exclude airtime_mvc/vendor/phing \
--exclude airtime_mvc/vendor/simplepie/simplepie/tests \
--exclude legacy/vendor/phing \
--exclude legacy/vendor/simplepie/simplepie/tests \
libretime
echo " Done"

View File

@ -89,7 +89,7 @@ jobs:
sudo mkdir -p "$LIBRETIME_LOG_DIR"
sudo chown runner:runner "$LIBRETIME_LOG_DIR"
make test
working-directory: airtime_mvc
working-directory: legacy
# Start lint the code without failing the entire workflow, should be merged
# into 'test' when the entire matrix succeeds.

View File

@ -1,7 +1,7 @@
---
# See https://pre-commit.com for more information
# See https://pre-commit.com/hooks.html for more hooks
exclude: ^(airtime_mvc.*)$
exclude: ^(legacy.*)$
repos:
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v4.0.1

View File

@ -115,9 +115,9 @@ API uses Django to interact with the same database.
If you are a developer seeking to add new columns to the database here are the steps.
1. Modify `airtime_mvc/build/schema.xml` with any changes.
1. Modify `legacy/build/schema.xml` with any changes.
2. Run `dev_tools/propel_generate.sh`
3. Update the upgrade.sql under `airtime_mvc/application/controllers/upgrade_sql/VERSION` for example
3. Update the upgrade.sql under `legacy/application/controllers/upgrade_sql/VERSION` for example
`ALTER TABLE imported_podcast ADD COLUMN album_override boolean default 'f' NOT NULL;`
4. Update the models under `api/libretimeapi/models/` to reflect the new
changes.

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

View File

@ -1,7 +1,7 @@
# LibreTime API
This API provides access to LibreTime's database via a Django application. This
API supersedes the [PHP API](../airtime_mvc/application/controllers/ApiController.php).
API supersedes the [PHP API](../legacy/application/controllers/ApiController.php).
## Deploying

View File

@ -7,7 +7,7 @@ SCRIPT=$(readlink -f "$0")
# Absolute directory this script is in
SCRIPTPATH=$(dirname "$SCRIPT")
cd "$SCRIPTPATH/../airtime_mvc/" || (echo "could not cd in $SCRIPTPATH/../airtime_mvc/" && exit 1)
cd "$SCRIPTPATH/../legacy/" || (echo "could not cd in $SCRIPTPATH/../legacy/" && exit 1)
path=$(pwd)
cd build
sed -i "s|\"project\.home =.*$\"|\"project.home = $path\"|g" build.properties

View File

@ -4,16 +4,16 @@ cd ..
#generate a new .po file
#this will generate a file called messages.po
find airtime_mvc -print0 -iname "*.phtml" -o -name "*.php" | xargs xgettext -L php --from-code=UTF-8
find airtime_mvc -print0 -iname "*.phtml" -o -name "*.php" | xargs xgettext -L php --from-code=UTF-8 -k --keyword=_pro:1 -d pro --force-po
find legacy -print0 -iname "*.phtml" -o -name "*.php" | xargs xgettext -L php --from-code=UTF-8
find legacy -print0 -iname "*.phtml" -o -name "*.php" | xargs xgettext -L php --from-code=UTF-8 -k --keyword=_pro:1 -d pro --force-po
#merge the new messages from messages.po into each existing .po file
#this will generate new .po files
find ./airtime_mvc/locale/ -name "airtime.po" -exec msgmerge -N -U --no-wrap "{}" messages.po \;
find ./airtime_mvc/locale/ -name "pro.po" -exec msgmerge -N -U --no-wrap "{}" pro.po \;
find ./legacy/locale/ -name "airtime.po" -exec msgmerge -N -U --no-wrap "{}" messages.po \;
find ./legacy/locale/ -name "pro.po" -exec msgmerge -N -U --no-wrap "{}" pro.po \;
#delete the old .po files
find ./airtime_mvc/locale/ -name "*.po~" -delete
find ./legacy/locale/ -name "*.po~" -delete
#delete the temporary po files we create in the root directory
rm ./*.po

View File

@ -12,7 +12,7 @@ First, you should check if a localization is already under way for your locale o
GNU **gettext** means using a .po file for each language or dialect, a specially formatted plain text file with groups of three or more lines, like this example from LibreTime's Korean localization:
#: airtime_mvc/application/configs/navigation.php:57
#: legacy/application/configs/navigation.php:57
msgid "Media Folders"
msgstr "미디어 폴더"
@ -32,17 +32,17 @@ After forking the LibreTime git repository, make sure you're in the **master** b
devel
* master
Create a new locale directory (e.g. _airtime_mvc/locale/de_CH/LC_MESSAGES/_ for German as spoken in Switzerland):
Create a new locale directory (e.g. _legacy/locale/de_CH/LC_MESSAGES/_ for German as spoken in Switzerland):
mkdir -p airtime_mvc/locale/de_CH/LC_MESSAGES/
mkdir -p legacy/locale/de_CH/LC_MESSAGES/
Copy the template _airtime.po_ file into the directory you just created:
cp airtime_mvc_locale/template/airtime.po airtime_mvc/locale/de_CH/LC_MESSAGES
cp legacy_locale/template/airtime.po legacy/locale/de_CH/LC_MESSAGES
and update the header information in the new copy of the _airtime.po_ file using the **nano** editor:
nano airtime_mvc/locale/de_CH/LC_MESSAGES/airtime.po
nano legacy/locale/de_CH/LC_MESSAGES/airtime.po
For the example of Swiss German, the header of the file should now look like this:

View File

@ -12,7 +12,7 @@ podcast tabs, and a live feed of your station with information on the the curren
## Modifying the LibreTime Radio Page
The background of the mini-site that appears when you visit the server's domain in your web browser can be changed by modifying the page's CSS file, located at _/usr/share/airtime/php/airtime_mvc/public/css/radio-page/radio-page.css_.
The background of the mini-site that appears when you visit the server's domain in your web browser can be changed by modifying the page's CSS file, located at _/usr/share/airtime/php/legacy/public/css/radio-page/radio-page.css_.
```
html {
@ -25,4 +25,4 @@ html {
}
```
Place the new background image in the `/usr/share/airtime/php/airtime_mvc/public/css/radio-page/img/` folder and change the `background:` entry's URL to point to the new image. The new image should be at least 1280 x 720 in pixel size to avoid being blurry.
Place the new background image in the `/usr/share/airtime/php/legacy/public/css/radio-page/img/` folder and change the `background:` entry's URL to point to the new image. The new image should be at least 1280 x 720 in pixel size to avoid being blurry.

View File

@ -88,10 +88,10 @@ On port 80, Apache's _alias_ module is used to set a _Redirect permanent_ for th
ServerAdmin admin@example.com
DocumentRoot /usr/share/airtime/php/airtime_mvc/public
DocumentRoot /usr/share/airtime/php/legacy/public
DirectoryIndex index.php
<Directory /usr/share/airtime/php/airtime_mvc/public>
<Directory /usr/share/airtime/php/legacy/public>
Options -Indexes FollowSymLinks MultiViews
AllowOverride all
Order allow,deny
@ -104,12 +104,12 @@ On port 80, Apache's _alias_ module is used to set a _Redirect permanent_ for th
ServerAdmin admin@example.com
DocumentRoot /usr/share/airtime/php/airtime_mvc/public
DocumentRoot /usr/share/airtime/php/legacy/public
Redirect permanent /login https://airtime.example.com/login
SetEnv APPLICATION_ENV "production"
<Directory /usr/share/airtime/php/airtime_mvc/public>
<Directory /usr/share/airtime/php/legacy/public>
Options -Indexes FollowSymLinks MultiViews
AllowOverride All
Order allow,deny

16
install
View File

@ -757,7 +757,7 @@ if [ "$ignore_dependencies" = "f" ]; then
packages_files=(
"${SCRIPT_DIR}/"
"${SCRIPT_DIR}/airtime_mvc"
"${SCRIPT_DIR}/legacy"
"${SCRIPT_DIR}/api"
"${SCRIPT_DIR}/python_apps/airtime_analyzer"
"${SCRIPT_DIR}/python_apps/pypo"
@ -799,7 +799,7 @@ if [[ ! ${commandFound} -eq 0 ]]; then
fi
make VERSION # Create a VERSION file
make -C airtime_mvc build # Install php dependencies with composer
make -C legacy build # Install php dependencies with composer
if [ -f /etc/airtime/airtime.conf ]; then
# TODO use VERSION or some other way to check for updates and handle
@ -863,19 +863,19 @@ fi
if [ "$in_place" = "t" ]; then
verbose "\n * Setting current Airtime directory as web root..."
web_root=${AIRTIMEROOT}/airtime_mvc/public
web_root=${AIRTIMEROOT}/legacy/public
elif [ -n "$web_root" ]; then
verbose "\n * Creating Apache web root directory..."
cp -R ${AIRTIMEROOT}/airtime_mvc ${web_root}
cp -R ${AIRTIMEROOT}/legacy ${web_root}
cp ${AIRTIMEROOT}/VERSION ${web_root}
web_root=${web_root}/airtime_mvc/public/
web_root=${web_root}/legacy/public/
else
verbose "\n * Creating default Apache web root directory /usr/share/airtime/php..."
web_root="/usr/share/airtime/php"
mkdir -p ${web_root}
cp -R ${AIRTIMEROOT}/airtime_mvc ${web_root}
cp -R ${AIRTIMEROOT}/legacy ${web_root}
cp ${AIRTIMEROOT}/VERSION ${web_root}
web_root=${web_root}/airtime_mvc/public/
web_root=${web_root}/legacy/public/
fi
verbose "...Done"
@ -1014,7 +1014,7 @@ if [ ! -d /var/log/airtime ]; then
loudCmd "mkdir -p /var/log/airtime"
verbose "\n * Copying logrotate files..."
loudCmd "cp ${AIRTIMEROOT}/airtime_mvc/build/airtime-php.logrotate /etc/logrotate.d/airtime-php"
loudCmd "cp ${AIRTIMEROOT}/legacy/build/airtime-php.logrotate /etc/logrotate.d/airtime-php"
loudCmd "cp ${AIRTIMEROOT}/python_apps/pypo/liquidsoap/airtime-liquidsoap.logrotate /etc/logrotate.d/airtime-liquidsoap"
fi

View File

@ -1,6 +1,9 @@
## Custom .gitignore
################################################################################
# Revert global python gitignore
!build/
/tests/*.jar
/tests/results.html
/tests/test_results.xml

Some files were not shown because too many files have changed in this diff Show More