Compare commits

..

No commits in common. "main" and "4.2.0" have entirely different histories.
main ... 4.2.0

124 changed files with 7305 additions and 13554 deletions

View File

@ -77,7 +77,7 @@ jobs:
working-directory: ${{ inputs.context }}
- name: Report coverage
uses: codecov/codecov-action@v5
uses: codecov/codecov-action@v4
with:
files: ${{ inputs.context }}/coverage.xml
flags: ${{ inputs.context }}

View File

@ -42,7 +42,7 @@ jobs:
- name: Get pull request commit range
if: github.event_name == 'pull_request'
run: echo "COMMIT_RANGE=${{ github.sha }}~1...${{ github.sha }}" >> $GITHUB_ENV
run: echo "COMMIT_RANGE=origin/${{ github.base_ref }}..${{ github.sha }}" >> $GITHUB_ENV
- name: Get push commit range
if: github.event_name == 'push'

View File

@ -76,7 +76,7 @@ jobs:
working-directory: api
- name: Report coverage
uses: codecov/codecov-action@v5
uses: codecov/codecov-action@v4
with:
files: api/coverage.xml
flags: api

View File

@ -48,7 +48,7 @@ jobs:
- name: Check Links
id: lychee
uses: lycheeverse/lychee-action@v2.1.0
uses: lycheeverse/lychee-action@v1.10.0
with:
args: >-
'**/*.md'
@ -62,8 +62,6 @@ jobs:
--exclude 'https://www.ascap.com'
--exclude 'https://www.youtube-nocookie.com'
--exclude 'github\.com/libretime/libretime/(issues|pulls)'
--exclude 'https://packages.ubuntu.com/bionic/php7.2'
--exclude 'https://packages.ubuntu.com/bionic/python3'
--cache
--max-cache-age 2d
fail: true

View File

@ -62,7 +62,6 @@ jobs:
sudo -u postgres psql -c 'CREATE DATABASE libretime;'
sudo -u postgres psql -c "CREATE USER libretime WITH PASSWORD 'libretime';"
sudo -u postgres psql -c 'GRANT CONNECT ON DATABASE libretime TO libretime;'
sudo -u postgres psql -c 'ALTER DATABASE libretime OWNER TO libretime;'
sudo -u postgres psql -c 'ALTER USER libretime CREATEDB;'
- name: Setup PHP

View File

@ -12,7 +12,7 @@ jobs:
name: Validate PR title
runs-on: ubuntu-latest
steps:
- uses: amannn/action-semantic-pull-request@v5.5.3
- uses: amannn/action-semantic-pull-request@v5.5.2
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:

View File

@ -3,7 +3,7 @@
# See https://pre-commit.com/hooks.html for more hooks
repos:
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v5.0.0
rev: v4.6.0
hooks:
- id: check-added-large-files
- id: check-case-conflict
@ -36,13 +36,13 @@ repos:
exclude: ^(legacy/public(?!/js/airtime)|CHANGELOG.md$|.github/release-please-manifest.json)
- repo: https://github.com/asottile/pyupgrade
rev: v3.19.0
rev: v3.16.0
hooks:
- id: pyupgrade
args: [--py38-plus]
- repo: https://github.com/adamchainz/django-upgrade
rev: 1.22.2
rev: 1.18.0
hooks:
- id: django-upgrade
args: [--target-version, "4.2"]
@ -54,7 +54,7 @@ repos:
args: [--resolve-all-configs]
- repo: https://github.com/psf/black-pre-commit-mirror
rev: 24.10.0
rev: 24.4.2
hooks:
- id: black
@ -110,11 +110,3 @@ repos:
pass_filenames: false
language: script
files: ^legacy
- id: api-schema-update
name: api-schema-update
description: Ensure API schema is up to date
entry: make -C api schema
pass_filenames: false
language: system
files: ^api

View File

@ -2,7 +2,7 @@ ARG LIBRETIME_VERSION
#======================================================================================#
# Python Builder #
#======================================================================================#
FROM python:3.10-slim-bullseye AS python-builder
FROM python:3.10-slim-bullseye as python-builder
WORKDIR /build
@ -18,7 +18,7 @@ RUN pip wheel --wheel-dir . --no-deps .
#======================================================================================#
# Python base #
#======================================================================================#
FROM python:3.10-slim-bullseye AS python-base
FROM python:3.10-slim-bullseye as python-base
ENV PYTHONDONTWRITEBYTECODE=1
ENV PYTHONUNBUFFERED=1
@ -48,7 +48,7 @@ RUN set -eux \
#======================================================================================#
# Python base with ffmpeg #
#======================================================================================#
FROM python-base AS python-base-ffmpeg
FROM python-base as python-base-ffmpeg
RUN set -eux \
&& DEBIAN_FRONTEND=noninteractive apt-get update \
@ -59,7 +59,7 @@ RUN set -eux \
#======================================================================================#
# Analyzer #
#======================================================================================#
FROM python-base-ffmpeg AS libretime-analyzer
FROM python-base-ffmpeg as libretime-analyzer
COPY tools/packages.py /tmp/packages.py
COPY analyzer/packages.ini /tmp/packages.ini
@ -97,7 +97,7 @@ ENV LIBRETIME_VERSION=$LIBRETIME_VERSION
#======================================================================================#
# Playout #
#======================================================================================#
FROM python-base-ffmpeg AS libretime-playout
FROM python-base-ffmpeg as libretime-playout
COPY tools/packages.py /tmp/packages.py
COPY playout/packages.ini /tmp/packages.ini
@ -136,7 +136,7 @@ ENV LIBRETIME_VERSION=$LIBRETIME_VERSION
#======================================================================================#
# API #
#======================================================================================#
FROM python-base AS libretime-api
FROM python-base as libretime-api
RUN set -eux \
&& DEBIAN_FRONTEND=noninteractive apt-get update \
@ -180,7 +180,7 @@ HEALTHCHECK CMD ["curl", "--fail", "http://localhost:9001/api/v2/version"]
#======================================================================================#
# Worker #
#======================================================================================#
FROM python-base AS libretime-worker
FROM python-base as libretime-worker
WORKDIR /src
@ -208,7 +208,7 @@ ENV LIBRETIME_VERSION=$LIBRETIME_VERSION
#======================================================================================#
# Legacy #
#======================================================================================#
FROM php:7.4-fpm AS libretime-legacy
FROM php:7.4-fpm as libretime-legacy
ENV LIBRETIME_CONFIG_FILEPATH=/etc/libretime/config.yml
ENV LIBRETIME_LOG_FILEPATH=php://stderr

View File

@ -22,10 +22,10 @@ dev-certs:
cat dev/certs/fake.{key,crt} > dev/certs/fake.pem
dev: .env dev-certs
DOCKER_BUILDKIT=1 docker compose build
docker compose run --rm legacy make build
docker compose run --rm api libretime-api migrate
docker compose up -d
DOCKER_BUILDKIT=1 docker-compose build
docker-compose run --rm legacy make build
docker-compose run --rm api libretime-api migrate
docker-compose up -d
.PHONY: VERSION
VERSION:

View File

@ -75,7 +75,8 @@ def compute_silences(filepath: Path) -> List[Tuple[float, float]]:
cmd = _ffmpeg(
*("-i", filepath),
"-vn",
*("-filter", "highpass=frequency=80,silencedetect=noise=-60dB:duration=0.9"),
*("-filter", "highpass=frequency=1000"),
*("-filter", "silencedetect=noise=0.15:duration=1"),
)
starts, ends = [], []

View File

@ -5,24 +5,10 @@ from typing import Any, Dict
import mutagen
from libretime_shared.files import compute_md5
from mutagen.easyid3 import EasyID3
logger = logging.getLogger(__name__)
def flatten(xss):
return [x for xs in xss for x in xs]
def comment_get(id3, _):
comments = [v.text for k, v in id3.items() if "COMM" in k or "comment" in k]
return flatten(comments)
EasyID3.RegisterKey("comment", comment_get)
def analyze_metadata(filepath_: str, metadata: Dict[str, Any]):
"""
Extract audio metadata from tags embedded in the file using mutagen.
@ -85,36 +71,34 @@ def analyze_metadata(filepath_: str, metadata: Dict[str, Any]):
except (AttributeError, KeyError, IndexError):
pass
extracted_tags_mapping = [
("title", "track_title"),
("artist", "artist_name"),
("album", "album_title"),
("bpm", "bpm"),
("composer", "composer"),
("conductor", "conductor"),
("copyright", "copyright"),
("comment", "comment"),
("comment", "comments"),
("comment", "description"),
("encoded_by", "encoder"),
("genre", "genre"),
("isrc", "isrc"),
("label", "label"),
("organization", "label"),
# ("length", "length"),
("language", "language"),
("last_modified", "last_modified"),
("mood", "mood"),
("bit_rate", "bit_rate"),
("replay_gain", "replaygain"),
# ("tracknumber", "track_number"),
# ("track_total", "track_total"),
("website", "website"),
("date", "year"),
# ("mime_type", "mime"),
]
extracted_tags_mapping = {
"title": "track_title",
"artist": "artist_name",
"album": "album_title",
"bpm": "bpm",
"composer": "composer",
"conductor": "conductor",
"copyright": "copyright",
"comment": "comment",
"encoded_by": "encoder",
"genre": "genre",
"isrc": "isrc",
"label": "label",
"organization": "label",
# "length": "length",
"language": "language",
"last_modified": "last_modified",
"mood": "mood",
"bit_rate": "bit_rate",
"replay_gain": "replaygain",
# "tracknumber": "track_number",
# "track_total": "track_total",
"website": "website",
"date": "year",
# "mime_type": "mime",
}
for extracted_key, metadata_key in extracted_tags_mapping:
for extracted_key, metadata_key in extracted_tags_mapping.items():
try:
metadata[metadata_key] = extracted[extracted_key]
if isinstance(metadata[metadata_key], list):

View File

@ -23,28 +23,28 @@ FILES = [
# 8s -> 9s: silence
# 9s -> 12s: musik
# 12s -> 15s: pink noise fade out
Fixture(here / "s1-jointstereo.mp3", 15.0, 1.4, 15.0, -5.9 ),
Fixture(here / "s1-mono.mp3", 15.0, 1.5, 15.0, -2.0 ),
Fixture(here / "s1-stereo.mp3", 15.0, 1.4, 15.0, -5.9 ),
Fixture(here / "s1-mono-12.mp3", 15.0, 1.2, 15.0, +7.0 ),
Fixture(here / "s1-stereo-12.mp3", 15.0, 1.2, 15.0, +6.1 ),
Fixture(here / "s1-mono+12.mp3", 15.0, 1.2, 15.0, -17.0 ),
Fixture(here / "s1-stereo+12.mp3", 15.0, 1.2, 15.0, -17.8 ),
Fixture(here / "s1-mono.flac", 15.0, 1.4, 15.0, -2.3 ),
Fixture(here / "s1-stereo.flac", 15.0, 1.4, 15.0, -6.0 ),
Fixture(here / "s1-mono-12.flac", 15.0, 2.0, 15.0, +10.0 ),
Fixture(here / "s1-stereo-12.flac", 15.0, 1.8, 15.0, +5.9 ),
Fixture(here / "s1-mono+12.flac", 15.0, 0.0, 15.0, -12.0 ),
Fixture(here / "s1-stereo+12.flac", 15.0, 0.0, 15.0, -14.9 ),
Fixture(here / "s1-mono.m4a", 15.0, 1.4, 15.0, -4.5 ),
Fixture(here / "s1-stereo.m4a", 15.0, 1.4, 15.0, -5.8 ),
Fixture(here / "s1-mono.ogg", 15.0, 1.4, 15.0, -4.9 ),
Fixture(here / "s1-stereo.ogg", 15.0, 1.4, 15.0, -5.7 ),
Fixture(here / "s1-stereo", 15.0, 1.4, 15.0, -5.7 ),
Fixture(here / "s1-mono.wav", 15.0, 1.5, 15.0, -2.3 ),
Fixture(here / "s1-stereo.wav", 15.0, 1.4, 15.0, -6.0 ),
Fixture(here / "s1-jointstereo.mp3", 15.0, 6.0, 13.0, -5.9 ),
Fixture(here / "s1-mono.mp3", 15.0, 6.0, 13.0, -2.0 ),
Fixture(here / "s1-stereo.mp3", 15.0, 6.0, 13.0, -5.9 ),
Fixture(here / "s1-mono-12.mp3", 15.0, 9.0, 12.0, +7.0 ),
Fixture(here / "s1-stereo-12.mp3", 15.0, 9.0, 12.0, +6.1 ),
Fixture(here / "s1-mono+12.mp3", 15.0, 3.5, 13.0, -17.0 ),
Fixture(here / "s1-stereo+12.mp3", 15.0, 3.5, 13.0, -17.8 ),
Fixture(here / "s1-mono.flac", 15.0, 6.0, 13.0, -2.3 ),
Fixture(here / "s1-stereo.flac", 15.0, 6.0, 13.0, -6.0 ),
Fixture(here / "s1-mono-12.flac", 15.0, 9.0, 12.0, +10.0 ),
Fixture(here / "s1-stereo-12.flac", 15.0, 9.0, 12.0, +5.9 ),
Fixture(here / "s1-mono+12.flac", 15.0, 3.5, 13.0, -12.0 ),
Fixture(here / "s1-stereo+12.flac", 15.0, 3.5, 13.0, -14.9 ),
Fixture(here / "s1-mono.m4a", 15.0, 6.0, 13.0, -4.5 ),
Fixture(here / "s1-stereo.m4a", 15.0, 6.0, 13.0, -5.8 ),
Fixture(here / "s1-mono.ogg", 15.0, 6.0, 13.0, -4.9 ),
Fixture(here / "s1-stereo.ogg", 15.0, 6.0, 13.0, -5.7 ),
Fixture(here / "s1-stereo", 15.0, 6.0, 13.0, -5.7 ),
Fixture(here / "s1-mono.wav", 15.0, 6.0, 13.0, -2.3 ),
Fixture(here / "s1-stereo.wav", 15.0, 6.0, 13.0, -6.0 ),
# sample 1 large (looped for 2 hours)
Fixture(here / "s1-large.flac", 7200, 1.4, 7200, -6.0 ),
Fixture(here / "s1-large.flac", 7200, 6.0, 7198, -6.0 ),
# sample 2
# 0s -> 1.8s: silence
# 1.8s : noise
@ -96,18 +96,12 @@ tags = {
"comment": "Test Comment",
}
mp3Tags = {
**tags,
"comments": tags["comment"],
"description": tags["comment"],
}
FILES_TAGGED = [
FixtureMeta(
here / "s1-jointstereo-tagged.mp3",
{
**meta,
**mp3Tags,
**tags,
"bit_rate": approx(128000, abs=1e2),
"channels": 2,
"mime": "audio/mp3",
@ -117,7 +111,7 @@ FILES_TAGGED = [
here / "s1-mono-tagged.mp3",
{
**meta,
**mp3Tags,
**tags,
"bit_rate": approx(64000, abs=1e2),
"channels": 1,
"mime": "audio/mp3",
@ -127,7 +121,7 @@ FILES_TAGGED = [
here / "s1-stereo-tagged.mp3",
{
**meta,
**mp3Tags,
**tags,
"bit_rate": approx(128000, abs=1e2),
"channels": 2,
"mime": "audio/mp3",
@ -157,7 +151,7 @@ FILES_TAGGED = [
here / "s1-mono-tagged.m4a",
{
**meta,
**mp3Tags,
**tags,
"bit_rate": approx(65000, abs=5e4),
"channels": 2, # Weird
"mime": "audio/mp4",
@ -167,7 +161,7 @@ FILES_TAGGED = [
here / "s1-stereo-tagged.m4a",
{
**meta,
**mp3Tags,
**tags,
"bit_rate": approx(128000, abs=1e5),
"channels": 2,
"mime": "audio/mp4",
@ -234,18 +228,12 @@ tags = {
"comment": "Ł Ą Ż Ę Ć Ń Ś Ź",
}
mp3Tags = {
**tags,
"comments": tags["comment"],
"description": tags["comment"],
}
FILES_TAGGED += [
FixtureMeta(
here / "s1-jointstereo-tagged-utf8.mp3",
{
**meta,
**mp3Tags,
**tags,
"bit_rate": approx(128000, abs=1e2),
"channels": 2,
"mime": "audio/mp3",
@ -255,7 +243,7 @@ FILES_TAGGED += [
here / "s1-mono-tagged-utf8.mp3",
{
**meta,
**mp3Tags,
**tags,
"bit_rate": approx(64000, abs=1e2),
"channels": 1,
"mime": "audio/mp3",
@ -265,7 +253,7 @@ FILES_TAGGED += [
here / "s1-stereo-tagged-utf8.mp3",
{
**meta,
**mp3Tags,
**tags,
"bit_rate": approx(128000, abs=1e2),
"channels": 2,
"mime": "audio/mp3",
@ -295,7 +283,7 @@ FILES_TAGGED += [
here / "s1-mono-tagged-utf8.m4a",
{
**meta,
**mp3Tags,
**tags,
"bit_rate": approx(65000, abs=5e4),
"channels": 2, # Weird
"mime": "audio/mp4",
@ -305,7 +293,7 @@ FILES_TAGGED += [
here / "s1-stereo-tagged-utf8.m4a",
{
**meta,
**mp3Tags,
**tags,
"bit_rate": approx(128000, abs=1e5),
"channels": 2,
"mime": "audio/mp4",

View File

@ -27,8 +27,8 @@ def test_analyze_metadata(filepath: Path, metadata: dict):
del metadata["length"]
del found["length"]
# ogg,flac files does not support comments yet
if not filepath.suffix == ".m4a" and not filepath.suffix == ".mp3":
# mp3,ogg,flac files does not support comments yet
if not filepath.suffix == ".m4a":
if "comment" in metadata:
del metadata["comment"]

View File

@ -8,7 +8,6 @@ from .role import Role
class UserManager(BaseUserManager):
# pylint: disable=too-many-positional-arguments
def create_user(self, role, username, password, email, first_name, last_name):
user = self.model(
role=role,
@ -21,7 +20,6 @@ class UserManager(BaseUserManager):
user.save(using=self._db)
return user
# pylint: disable=too-many-positional-arguments
def create_superuser(self, username, password, email, first_name, last_name):
return self.create_user(
Role.ADMIN,

View File

@ -8,6 +8,8 @@ UP = """
-- DELETE FROM cc_pref WHERE keystr = 'system_version';
-- INSERT INTO cc_pref (keystr, valstr) VALUES ('system_version', '2.5.5');
ALTER TABLE cc_show ADD COLUMN image_path varchar(255) DEFAULT '';
ALTER TABLE cc_show_instances ADD COLUMN description varchar(255) DEFAULT '';
"""
DOWN = None

View File

@ -5,7 +5,7 @@ from django.db import migrations
from ._migrations import legacy_migration_factory
UP = """
ALTER TABLE cc_files ADD COLUMN artwork VARCHAR(255);
ALTER TABLE cc_files ADD COLUMN artwork TYPE character varying(255);
"""
DOWN = None

View File

@ -4,18 +4,12 @@ from django.db import migrations
from ._migrations import legacy_migration_factory
# This migration is currently a placeholder for 3.0.0-alpha.9.1.
# Please do not remove it. There are currently no actions, but it
# needs to remain intact so it does not fail when called from the
# migrations script. Any future migrations that may apply to
# 3.0.0-alpha.9.1 will be added to this file.
UP = """
ALTER TABLE cc_files ADD COLUMN artwork VARCHAR(4096);
"""
DOWN = """
ALTER TABLE cc_files DROP COLUMN IF EXISTS artwork;
"""

View File

@ -1,37 +0,0 @@
# pylint: disable=invalid-name
from django.db import migrations
from ._migrations import legacy_migration_factory
UP = """
ALTER TABLE cc_show ADD COLUMN override_intro_playlist boolean default 'f' NOT NULL;
ALTER TABLE cc_show ADD COLUMN intro_playlist_id integer DEFAULT NULL;
ALTER TABLE cc_show ADD CONSTRAINT cc_playlist_intro_playlist_fkey FOREIGN KEY (intro_playlist_id) REFERENCES cc_playlist (id) ON DELETE SET NULL;
ALTER TABLE cc_show ADD COLUMN override_outro_playlist boolean default 'f' NOT NULL;
ALTER TABLE cc_show ADD COLUMN outro_playlist_id integer DEFAULT NULL;
ALTER TABLE cc_show ADD CONSTRAINT cc_playlist_outro_playlist_fkey FOREIGN KEY (outro_playlist_id) REFERENCES cc_playlist (id) ON DELETE SET NULL;
"""
DOWN = """
ALTER TABLE cc_show DROP COLUMN IF EXISTS override_intro_playlist;
ALTER TABLE cc_show DROP COLUMN IF EXISTS intro_playlist_id;
ALTER TABLE cc_show DROP CONSTRAINT IF EXISTS cc_playlist_intro_playlist_fkey;
ALTER TABLE cc_show DROP COLUMN IF EXISTS override_outro_playlist;
ALTER TABLE cc_show DROP COLUMN IF EXISTS outro_playlist_id;
ALTER TABLE cc_show DROP CONSTRAINT IF EXISTS cc_playlist_outro_playlist_fkey;
"""
class Migration(migrations.Migration):
dependencies = [
("legacy", "0045_add_sessions_table"),
]
operations = [
migrations.RunPython(
code=legacy_migration_factory(
target="46",
sql=UP,
)
)
]

View File

@ -1,2 +1,2 @@
# The schema version is defined using the migration file prefix number
LEGACY_SCHEMA_VERSION = "46"
LEGACY_SCHEMA_VERSION = "45"

View File

@ -11,28 +11,15 @@ def get_schema_version():
Don't use django models as they might break in the future. Our concern is to upgrade
the legacy database schema to the point where django is in charge of the migrations.
An airtime 2.5.1 migration will not have schema_version, in that case, we look for
system_version to have a value of 2.5.1 and return that as the schema version value
(really just needs to be anything besides None, so that the next migration doesn't overwrite
the database)
"""
if "cc_pref" not in connection.introspection.table_names():
return None
with connection.cursor() as cursor:
cursor.execute(
"""
SELECT valstr AS version
FROM cc_pref
WHERE (keystr = 'schema_version') OR (keystr = 'system_version' AND valstr = '2.5.1')
"""
)
cursor.execute("SELECT valstr FROM cc_pref WHERE keystr = 'schema_version'")
row = cursor.fetchone()
if row and row[0]:
return row[0]
return None
return row[0] if row else None
def set_schema_version(cursor, version: str):

View File

@ -126,10 +126,6 @@ CREATE TABLE "cc_show"
"has_autoplaylist" BOOLEAN DEFAULT 'f' NOT NULL,
"autoplaylist_id" INTEGER,
"autoplaylist_repeat" BOOLEAN DEFAULT 'f' NOT NULL,
"override_intro_playlist" BOOLEAN DEFAULT 'f' NOT NULL,
"intro_playlist_id" INTEGER,
"override_outro_playlist" BOOLEAN DEFAULT 'f' NOT NULL,
"outro_playlist_id" INTEGER,
PRIMARY KEY ("id")
);
@ -722,16 +718,6 @@ ALTER TABLE "cc_show" ADD CONSTRAINT "cc_playlist_autoplaylist_fkey"
REFERENCES "cc_playlist" ("id")
ON DELETE SET NULL;
ALTER TABLE "cc_show" ADD CONSTRAINT "cc_playlist_intro_playlist_fkey"
FOREIGN KEY ("intro_playlist_id")
REFERENCES "cc_playlist" ("id")
ON DELETE SET NULL;
ALTER TABLE "cc_show" ADD CONSTRAINT "cc_playlist_outro_playlist_fkey"
FOREIGN KEY ("outro_playlist_id")
REFERENCES "cc_playlist" ("id")
ON DELETE SET NULL;
ALTER TABLE "cc_show_instances" ADD CONSTRAINT "cc_show_fkey"
FOREIGN KEY ("show_id")
REFERENCES "cc_show" ("id")

View File

@ -1 +0,0 @@
from .readwriteserializer import ReadWriteSerializerMixin

View File

@ -1,33 +0,0 @@
from rest_framework.serializers import Serializer
class ReadWriteSerializerMixin:
"""
Overrides get_serializer_class to choose the read serializer
for GET requests and the write serializer for POST requests.
Set read_serializer_class and write_serializer_class attributes on a
viewset.
"""
read_serializer_class = Serializer
write_serializer_class = Serializer
def get_serializer_class(self):
if self.action in ["create"]:
return self.get_write_serializer_class()
return self.get_read_serializer_class()
def get_read_serializer_class(self):
assert self.read_serializer_class is not None, (
f"'{self.__class__.__name__}' should either include a `read_serializer_class`"
"attribute, or override the `get_read_serializer_class()` method."
)
return self.read_serializer_class
def get_write_serializer_class(self):
assert self.write_serializer_class is not None, (
f"'{self.__class__.__name__}' should either include a `write_serializer_class`"
"attribute, or override the `get_write_serializer_class()` method."
)
return self.write_serializer_class

View File

@ -69,28 +69,6 @@ class Show(models.Model):
auto_playlist_enabled = models.BooleanField(db_column="has_autoplaylist")
auto_playlist_repeat = models.BooleanField(db_column="autoplaylist_repeat")
intro_playlist = models.ForeignKey(
"schedule.Playlist",
on_delete=models.DO_NOTHING,
blank=True,
null=True,
db_column="intro_playlist_id",
related_name="intro_playlist",
)
override_intro_playlist = models.BooleanField(db_column="override_intro_playlist")
outro_playlist = models.ForeignKey(
"schedule.Playlist",
on_delete=models.DO_NOTHING,
blank=True,
null=True,
db_column="outro_playlist_id",
related_name="outro_playlist",
)
override_outro_playlist = models.BooleanField(db_column="override_outro_playlist")
hosts = models.ManyToManyField( # type: ignore[var-annotated]
"core.User",
through="ShowHost",

View File

@ -1,5 +1,5 @@
from .playlist import PlaylistContentSerializer, PlaylistSerializer
from .schedule import ReadScheduleSerializer, WriteScheduleSerializer
from .schedule import ScheduleSerializer
from .show import (
ShowDaysSerializer,
ShowHostSerializer,

View File

@ -3,17 +3,10 @@ from rest_framework import serializers
from ..models import Schedule
class ReadScheduleSerializer(serializers.ModelSerializer):
class ScheduleSerializer(serializers.ModelSerializer):
cue_out = serializers.DurationField(source="get_cue_out", read_only=True)
ends_at = serializers.DateTimeField(source="get_ends_at", read_only=True)
class Meta:
model = Schedule
fields = "__all__"
class WriteScheduleSerializer(serializers.ModelSerializer):
class Meta:
model = Schedule
fields = "__all__"

View File

@ -21,10 +21,6 @@ class ShowSerializer(serializers.ModelSerializer):
"auto_playlist",
"auto_playlist_enabled",
"auto_playlist_repeat",
"intro_playlist",
"override_intro_playlist",
"outro_playlist",
"override_outro_playlist",
]

View File

@ -2,9 +2,8 @@ from django.db import models
from django_filters import rest_framework as filters
from rest_framework import viewsets
from ...mixins import ReadWriteSerializerMixin
from ..models import Schedule
from ..serializers import ReadScheduleSerializer, WriteScheduleSerializer
from ..serializers import ScheduleSerializer
class ScheduleFilter(filters.FilterSet):
@ -27,9 +26,8 @@ class ScheduleFilter(filters.FilterSet):
fields = [] # type: ignore
class ScheduleViewSet(ReadWriteSerializerMixin, viewsets.ModelViewSet):
class ScheduleViewSet(viewsets.ModelViewSet):
queryset = Schedule.objects.all()
read_serializer_class = ReadScheduleSerializer
write_serializer_class = WriteScheduleSerializer
serializer_class = ScheduleSerializer
filterset_class = ScheduleFilter
model_permission_name = "schedule"

View File

@ -61,36 +61,3 @@ class TestFileViewSet(APITestCase):
file_id = "1"
response = self.client.delete(f"/api/v2/files/{file_id}")
self.assertEqual(response.status_code, 404)
def test_filters(self):
file = baker.make(
"storage.File",
mime="audio/mp3",
filepath=AUDIO_FILENAME,
genre="Soul",
md5="5a11ffe0e6c6d70fcdbad1b734be6482",
)
baker.make(
"storage.File",
mime="audio/mp3",
filepath=AUDIO_FILENAME,
genre="R&B",
md5="5a11ffe0e6c6d70fcdbad1b734be6483",
)
self.client.credentials(HTTP_AUTHORIZATION=f"Api-Key {self.token}")
path = "/api/v2/files"
results = self.client.get(path).json()
self.assertEqual(len(results), 2)
path = f"/api/v2/files?md5={file.md5}"
results = self.client.get(path).json()
self.assertEqual(len(results), 1)
path = "/api/v2/files?genre=Soul"
results = self.client.get(path).json()
self.assertEqual(len(results), 1)
path = "/api/v2/files?genre=R%26B"
results = self.client.get(path).json()
self.assertEqual(len(results), 1)

View File

@ -5,7 +5,6 @@ from os import remove
from django.conf import settings
from django.http import HttpResponse
from django.utils.encoding import filepath_to_uri
from django_filters import rest_framework as filters
from rest_framework import status, viewsets
from rest_framework.decorators import action
from rest_framework.exceptions import APIException
@ -27,8 +26,6 @@ class FileViewSet(viewsets.ModelViewSet):
queryset = File.objects.all()
serializer_class = FileSerializer
model_permission_name = "file"
filter_backends = (filters.DjangoFilterBackend,)
filterset_fields = ("md5", "genre")
# pylint: disable=invalid-name,unused-argument
@action(detail=True, methods=["GET"])

View File

@ -1,11 +1,11 @@
# Please do not edit this file, edit the setup.py file!
# This file is auto-generated by tools/extract_requirements.py.
django-cors-headers>=3.14.0,<4.5
django-filter>=2.4.0,<24.4
django-filter>=2.4.0,<24.3
django>=4.2.0,<4.3
djangorestframework>=3.14.0,<3.16
drf-spectacular>=0.22.1,<0.29
gunicorn>=22.0.0,<23.1
drf-spectacular>=0.22.1,<0.28
gunicorn>=22.0.0,<22.1
psycopg[c]>=3.1.8,<3.2
requests>=2.32.2,<2.33
uvicorn[standard]>=0.17.6,<0.33.0
uvicorn[standard]>=0.17.6,<0.31.0

View File

@ -154,15 +154,6 @@ paths:
/api/v2/files:
get:
operationId: files_list
parameters:
- in: query
name: genre
schema:
type: string
- in: query
name: md5
schema:
type: string
tags:
- files
security:
@ -2561,12 +2552,6 @@ paths:
/api/v2/schedule:
get:
operationId: schedule_list
description: |-
Overrides get_serializer_class to choose the read serializer
for GET requests and the write serializer for POST requests.
Set read_serializer_class and write_serializer_class attributes on a
viewset.
parameters:
- in: query
name: broadcasted
@ -2612,29 +2597,23 @@ paths:
schema:
type: array
items:
$ref: "#/components/schemas/ReadSchedule"
$ref: "#/components/schemas/Schedule"
description: ""
post:
operationId: schedule_create
description: |-
Overrides get_serializer_class to choose the read serializer
for GET requests and the write serializer for POST requests.
Set read_serializer_class and write_serializer_class attributes on a
viewset.
tags:
- schedule
requestBody:
content:
application/json:
schema:
$ref: "#/components/schemas/WriteSchedule"
$ref: "#/components/schemas/Schedule"
application/x-www-form-urlencoded:
schema:
$ref: "#/components/schemas/WriteSchedule"
$ref: "#/components/schemas/Schedule"
multipart/form-data:
schema:
$ref: "#/components/schemas/WriteSchedule"
$ref: "#/components/schemas/Schedule"
required: true
security:
- cookieAuth: []
@ -2644,17 +2623,11 @@ paths:
content:
application/json:
schema:
$ref: "#/components/schemas/WriteSchedule"
$ref: "#/components/schemas/Schedule"
description: ""
/api/v2/schedule/{id}:
get:
operationId: schedule_retrieve
description: |-
Overrides get_serializer_class to choose the read serializer
for GET requests and the write serializer for POST requests.
Set read_serializer_class and write_serializer_class attributes on a
viewset.
parameters:
- in: path
name: id
@ -2672,16 +2645,10 @@ paths:
content:
application/json:
schema:
$ref: "#/components/schemas/ReadSchedule"
$ref: "#/components/schemas/Schedule"
description: ""
put:
operationId: schedule_update
description: |-
Overrides get_serializer_class to choose the read serializer
for GET requests and the write serializer for POST requests.
Set read_serializer_class and write_serializer_class attributes on a
viewset.
parameters:
- in: path
name: id
@ -2695,13 +2662,13 @@ paths:
content:
application/json:
schema:
$ref: "#/components/schemas/ReadSchedule"
$ref: "#/components/schemas/Schedule"
application/x-www-form-urlencoded:
schema:
$ref: "#/components/schemas/ReadSchedule"
$ref: "#/components/schemas/Schedule"
multipart/form-data:
schema:
$ref: "#/components/schemas/ReadSchedule"
$ref: "#/components/schemas/Schedule"
required: true
security:
- cookieAuth: []
@ -2711,16 +2678,10 @@ paths:
content:
application/json:
schema:
$ref: "#/components/schemas/ReadSchedule"
$ref: "#/components/schemas/Schedule"
description: ""
patch:
operationId: schedule_partial_update
description: |-
Overrides get_serializer_class to choose the read serializer
for GET requests and the write serializer for POST requests.
Set read_serializer_class and write_serializer_class attributes on a
viewset.
parameters:
- in: path
name: id
@ -2734,13 +2695,13 @@ paths:
content:
application/json:
schema:
$ref: "#/components/schemas/PatchedReadSchedule"
$ref: "#/components/schemas/PatchedSchedule"
application/x-www-form-urlencoded:
schema:
$ref: "#/components/schemas/PatchedReadSchedule"
$ref: "#/components/schemas/PatchedSchedule"
multipart/form-data:
schema:
$ref: "#/components/schemas/PatchedReadSchedule"
$ref: "#/components/schemas/PatchedSchedule"
security:
- cookieAuth: []
- basicAuth: []
@ -2749,16 +2710,10 @@ paths:
content:
application/json:
schema:
$ref: "#/components/schemas/ReadSchedule"
$ref: "#/components/schemas/Schedule"
description: ""
delete:
operationId: schedule_destroy
description: |-
Overrides get_serializer_class to choose the read serializer
for GET requests and the write serializer for POST requests.
Set read_serializer_class and write_serializer_class attributes on a
viewset.
parameters:
- in: path
name: id
@ -6345,7 +6300,7 @@ components:
user:
type: integer
nullable: true
PatchedReadSchedule:
PatchedSchedule:
type: object
properties:
id:
@ -6454,16 +6409,6 @@ components:
type: boolean
auto_playlist_repeat:
type: boolean
intro_playlist:
type: integer
nullable: true
override_intro_playlist:
type: boolean
outro_playlist:
type: integer
nullable: true
override_outro_playlist:
type: boolean
PatchedShowDays:
type: object
properties:
@ -7141,7 +7086,41 @@ components:
- id
- key
- user
ReadSchedule:
RecordEnabledEnum:
enum:
- 0
- 1
type: integer
description: |-
* `0` - No
* `1` - Yes
RepeatKindEnum:
enum:
- 0
- 1
- 4
- 5
- 2
type: integer
description: |-
* `0` - Every week
* `1` - Every 2 weeks
* `4` - Every 3 weeks
* `5` - Every 4 weeks
* `2` - Every month
RoleEnum:
enum:
- G
- H
- P
- A
type: string
description: |-
* `G` - Guest
* `H` - Host
* `P` - Manager
* `A` - Admin
Schedule:
type: object
properties:
id:
@ -7203,40 +7182,6 @@ components:
- instance
- position
- starts_at
RecordEnabledEnum:
enum:
- 0
- 1
type: integer
description: |-
* `0` - No
* `1` - Yes
RepeatKindEnum:
enum:
- 0
- 1
- 4
- 5
- 2
type: integer
description: |-
* `0` - Every week
* `1` - Every 2 weeks
* `4` - Every 3 weeks
* `5` - Every 4 weeks
* `2` - Every month
RoleEnum:
enum:
- G
- H
- P
- A
type: string
description: |-
* `G` - Guest
* `H` - Host
* `P` - Manager
* `A` - Admin
ServiceRegister:
type: object
properties:
@ -7296,16 +7241,6 @@ components:
type: boolean
auto_playlist_repeat:
type: boolean
intro_playlist:
type: integer
nullable: true
override_intro_playlist:
type: boolean
outro_playlist:
type: integer
nullable: true
override_outro_playlist:
type: boolean
required:
- auto_playlist_enabled
- auto_playlist_repeat
@ -7314,8 +7249,6 @@ components:
- linked
- live_enabled
- name
- override_intro_playlist
- override_outro_playlist
ShowDays:
type: object
properties:
@ -7840,66 +7773,6 @@ components:
* `4` - Friday
* `5` - Saturday
* `6` - Sunday
WriteSchedule:
type: object
properties:
id:
type: integer
readOnly: true
starts_at:
type: string
format: date-time
ends_at:
type: string
format: date-time
length:
type: string
nullable: true
fade_in:
type: string
format: time
nullable: true
fade_out:
type: string
format: time
nullable: true
cue_in:
type: string
cue_out:
type: string
position:
type: integer
maximum: 2147483647
minimum: -2147483648
position_status:
allOf:
- $ref: "#/components/schemas/PositionStatusEnum"
minimum: -32768
maximum: 32767
broadcasted:
type: integer
maximum: 32767
minimum: -32768
played:
type: boolean
nullable: true
instance:
type: integer
file:
type: integer
nullable: true
stream:
type: integer
nullable: true
required:
- broadcasted
- cue_in
- cue_out
- ends_at
- id
- instance
- position
- starts_at
securitySchemes:
basicAuth:
type: http

View File

@ -27,21 +27,21 @@ setup(
},
install_requires=[
"django-cors-headers>=3.14.0,<4.5",
"django-filter>=2.4.0,<24.4",
"django-filter>=2.4.0,<24.3",
"django>=4.2.0,<4.3",
"djangorestframework>=3.14.0,<3.16",
"drf-spectacular>=0.22.1,<0.29",
"drf-spectacular>=0.22.1,<0.28",
"requests>=2.32.2,<2.33",
],
extras_require={
"prod": [
"gunicorn>=22.0.0,<23.1",
"gunicorn>=22.0.0,<22.1",
"psycopg[c]>=3.1.8,<3.2",
"uvicorn[standard]>=0.17.6,<0.33.0",
"uvicorn[standard]>=0.17.6,<0.31.0",
],
"dev": [
"django-coverage-plugin>=3.0.0,<4",
"django-stubs>=5.1.0,<6",
"django-stubs>=1.14.0,<6",
"djangorestframework-stubs>=1.8.0,<4",
"model_bakery>=1.10.1,<2",
"psycopg[binary]>=3.1.8,<4",

View File

@ -113,68 +113,3 @@ general:
```
You should now be able to use your FreeIPA credentials to log in to LibreTime.
## Setup Header Authentication
If you have an SSO system that supports trusted SSO header authentication such as [Authelia](https://www.authelia.com/),
you can configure LibreTime to login users based on those trusted headers.
This allows users to only need to log in once on the SSO system and not need to log in again. It also allows LibreTime
to indirectly support other authentication mechanisms such as OAuth2.
This ONLY affects Legacy/Legacy API auth and does NOT affect API V2 auth.
### Configure Headers
LibreTime needs to know what headers are sent, and what information is available to it. You can also
setup a predefined group mapping so users are automatically granted the desired permissions.
This configuration is in `/etc/libretime/config.yml`. The following is an example configuration for an SSO service
that does the following:
- Sends the username in the `Remote-User` HTTP header.
- Sends the email in the `Remote-Email` HTTP header.
- Sends the name in the `Remote-Name` HTTP header. Example `John Doe`
- Sends the comma delimited groups in the `Remote-Groups` HTTP header. Example `group 1,lt-admin,group2`
- Has an IP of `10.0.0.34` (not required). When not provided it is not checked.
- Users with the `lt-host` group should get host privileges.
- Users with the `lt-admin` group should get admin privileges.
- Users with the `lt-pm` group should get program manager privileges.
- Users with the `lt-superadmin` group should get super admin privileges.
- All other users should get guest privileges.
```yml
header_auth:
user_header: Remote-User # This is the default and could be omitted
groups_header: Remote-Groups # This is the default and could be omitted
email_header: Remote-Email # This is the default and could be omitted
name_header: Remote-Name # This is the default and could be omitted
proxy_ip: 10.0.0.34
group_map:
host: lt-host
program_manager: lt-pm
admin: lt-admin
superadmin: lt-superadmin
```
If the `user_header` is not found in the request, users will be kicked to the login page
with a message that their username/password is invalid and will not be able to log in. When `proxy_ip` is provided
it will check that the request is coming from the correct proxy before doing the login. This prevents users who have
internal network access from being able to login as whoever they want in LibreTime.
::: warning
If `proxy_ip` is not provided any user on the internal network can log in as any user in LibreTime.
:::
### Enable Header authentication
After everything is set up properly you can enable header auth in `config.yml`:
```yml
general:
auth: LibreTime_Auth_Adaptor_Header
```
You should now be automatically logged into LibreTime when you click the `Login` button.

View File

@ -22,7 +22,7 @@ First, set the version you want to install:
echo LIBRETIME_VERSION="{vars.version}" > .env
</CodeBlock>
Download the docker compose files from the repository:
Download the docker-compose files from the repository:
```bash
# Load LIBRETIME_VERSION variable
@ -106,16 +106,16 @@ You can find more details in the `docker-compose.yml` file or on the external se
Next, run the following commands to setup the database:
```bash
docker compose run --rm api libretime-api migrate
docker-compose run --rm api libretime-api migrate
```
Finally, start the services, and check that they're running using the following commands:
```bash
docker compose up -d
docker-compose up -d
docker compose ps
docker compose logs -f
docker-compose ps
docker-compose logs -f
```
## Securing LibreTime

View File

@ -54,7 +54,7 @@ liable to legal action.
If you want to go down the commercial music route, check out the
https://www.prsformusic.com and https://www.ppluk.com websites for UK licence
details. In the USA, the https://www.soundexchange.com website currently quotes
a 1000 (per Jan. 2024) dollar minimum annual fee for non-commercial webcasters, plus a usage fee
a 500 dollar minimum annual fee for non-commercial webcasters, plus a usage fee
above a certain number of listener hours, for the right to stream music
recordings to listeners. See the websites of [ASCAP](https://www.ascap.com),
[BMI](https://www.bmi.com) and [SESAC](https://www.sesac.com) for details of music

View File

@ -14,16 +14,16 @@ To setup a docker-compose development environment, run the following commands:
# Clean and build
make clean
cp .env.dev .env
DOCKER_BUILDKIT=1 docker compose build
DOCKER_BUILDKIT=1 docker-compose build
# Setup
make dev-certs
docker compose run --rm legacy make build
docker compose run --rm api libretime-api migrate
docker-compose run --rm legacy make build
docker-compose run --rm api libretime-api migrate
# Run
docker compose up -d
docker compose logs -f
docker-compose up -d
docker-compose logs -f
```
:::info
@ -33,7 +33,7 @@ You may also use the following `make clean dev` shortcut:
```bash
make clean dev
docker compose logs -f
docker-compose logs -f
```
:::

View File

@ -1,25 +0,0 @@
---
title: LibreTime 4.2.0
---
import ReleaseHead from './\_release-head.md';
<ReleaseHead date='2024-06-22' version='4.2.0'/>
## :sparkling_heart: Contributors
The LibreTime project wants to thank the following contributors for authoring PRs to this release:
- @conet
- @dakriy
- @jooola
- @paddatrapper
- @rjhelms
## :rocket: Features
Please see the [changelog](https://github.com/libretime/libretime/blob/main/CHANGELOG.md#420-2024-06-22).
## :bug: Bug fixes
Please see the [changelog](https://github.com/libretime/libretime/blob/main/CHANGELOG.md#420-2024-06-22).

View File

@ -79,8 +79,6 @@ indicator.
| Add Autoloading Playlist? | If checked, allows for the following options |
| Select Playlist | Select the playlist the show will autofill from (shows autofill exactly one hour before air). If you wish to use a smartblock you must add it to a playlist and then select that playlist. This can be used to auto schedule new podcast episodes to air. |
| Repeat Playlist Until Show Is Full | If checked, the playlist will be added to the show multiple times until the slot is full. Useful for applying a one-hour music playlist made up of smartblocks to a two-hour show. |
| Select Intro Playlist | Select the playlist to replace the global intro playlist from settings. If you wish to use a smartblock you must add it to a playlist and then select that playlist. |
| Select Outro Playlist | Select the playlist to replace the global outro playlist from settings. If you wish to use a smartblock you must add it to a playlist and then select that playlist. |
| _Live Stream Input_ | |
| Use LibreTime/Custom Authentication | |
| Show Source | |

View File

@ -49,7 +49,7 @@
"css/users.css": "94c94817a8505ff4dfcd090987859a7e",
"css/waveform.css": "4ce429708933e6da1a2f3bdb2a01db52",
"js/airtime/airtime_bootstrap.js": "9575982385f6c74e2b4ec61e30214a7c",
"js/airtime/audiopreview/preview_jplayer.js": "d3402345279a9f4b86b381bae87d6de8",
"js/airtime/audiopreview/preview_jplayer.js": "133b4b9a3436716a8367d353f1658da3",
"js/airtime/buttons/buttons.js": "1a984b1e01262816c899c5fa3f12e3cd",
"js/airtime/common/audioplaytest.js": "93737dabc4cce4fcdcc6d54acf86d16d",
"js/airtime/common/common.js": "8c0675f5a1c8d95323b2f3983c658f62",
@ -59,7 +59,7 @@
"js/airtime/dashboard/versiontooltip.js": "53ed1c2f7dd9527cba80bbcdb239ac88",
"js/airtime/library/events/library_playlistbuilder.js": "7191ee58ad07b8f652be02bb131eb5e6",
"js/airtime/library/events/library_showbuilder.js": "f3d3f65fe1e7a80cd17c228889c6a1ae",
"js/airtime/library/library.js": "869b3117dc2c119fac61775d78f63fa9",
"js/airtime/library/library.js": "bf61a213cf38521d1892034628faf17c",
"js/airtime/library/plupload.js": "0f6be5b133650828b9ffc74e7852dc89",
"js/airtime/library/podcast.js": "4dedd84cb571cdba2401bfb8ba621e69",
"js/airtime/library/publish.js": "ab3a1452dd332cdb0773241a1c17b7e0",
@ -122,7 +122,7 @@
"js/jplayer/skin/jplayer.airtime.audio.preview.css": "c721fe0587569391dcfa7d0f7b440d2b",
"js/jplayer/skin/jplayer.audio-preview.blue.monday.css": "8565bf8e077eeb5bbba3c88bed42a590",
"js/jplayer/skin/jplayer.blue.monday.css": "491c7a82ae4571ae4a73645bf9755eaf",
"js/libs/CSVexport.js": "42c1fcfff5c717482f21bff1a9002295",
"js/libs/CSVexport.js": "07a91f824f41d2d0d1884b5dd10f63e4",
"js/libs/angular.min.js": "26680517e1024ca2c4f9ed4e0aa1619e",
"js/libs/dayjs.min.js": "bea3f1180a3e2e45eccf9d76f990f3b4",
"js/libs/dropzone.min.js": "f59ac59a89d9c569a27ca7ead38d2396",
@ -150,7 +150,6 @@
"js/plupload/i18n/it_IT.js": "d54d63ce65b652322b9411d545223a20",
"js/plupload/i18n/ja_JP.js": "35ffcfa1681e2ffef02fe085ea041436",
"js/plupload/i18n/ko_KR.js": "16f238d8f3bc779345f5e9d16a3471a2",
"js/plupload/i18n/nb_NO.js": "c23d8392d1f570b24a2bfe713e52d8b0",
"js/plupload/i18n/pl_PL.js": "5a32f95c5a79b846d3fc0388469beb40",
"js/plupload/i18n/pt_BR.js": "049e0eade66ed92564e1468051e70167",
"js/plupload/i18n/ru_RU.js": "a4ede8ec9bd8f1d703d55bc135453042",

View File

@ -1,148 +0,0 @@
<?php
/**
* Auth adaptor for basic header authentication.
*/
class LibreTime_Auth_Adaptor_Header implements Zend_Auth_Adapter_Interface
{
/**
* @throws Exception
*/
public function authenticate(): Zend_Auth_Result
{
$trustedIp = Config::get('header_auth.proxy_ip');
if ($trustedIp != null && $_SERVER['REMOTE_ADDR'] != trim($trustedIp)) {
return new Zend_Auth_Result(Zend_Auth_Result::FAILURE, null);
}
$userHeader = Config::get('header_auth.user_header');
$groupsHeader = Config::get('header_auth.groups_header');
$emailHeader = Config::get('header_auth.email_header');
$nameHeader = Config::get('header_auth.name_header');
$userLogin = $this->getHeaderValueOf($userHeader);
if ($userLogin == null) {
return new Zend_Auth_Result(Zend_Auth_Result::FAILURE, null);
}
$subj = CcSubjsQuery::create()->findOneByDbLogin($userLogin);
if ($subj == null) {
$user = new Application_Model_User('');
$user->setPassword('');
$user->setLogin($userLogin);
} else {
$user = new Application_Model_User($subj->getDbId());
}
$name = $this->getHeaderValueOf($nameHeader);
$user->setEmail($this->getHeaderValueOf($emailHeader));
$user->setFirstName($this->getFirstName($name) ?? '');
$user->setLastName($this->getLastName($name) ?? '');
$user->setType($this->getUserType($this->getHeaderValueOf($groupsHeader)));
$user->save();
$this->user = $user;
return new Zend_Auth_Result(Zend_Auth_Result::SUCCESS, $user);
}
private function getUserType(?string $groups): string
{
if ($groups == null) {
return UTYPE_GUEST;
}
$groups = array_map(fn ($group) => trim($group), explode(',', $groups));
$superAdminGroup = Config::get('header_auth.group_map.superadmin');
if (in_array($superAdminGroup, $groups)) {
return UTYPE_SUPERADMIN;
}
$adminGroup = Config::get('header_auth.group_map.admin');
if (in_array($adminGroup, $groups)) {
return UTYPE_ADMIN;
}
$programManagerGroup = Config::get('header_auth.group_map.program_manager');
if (in_array($programManagerGroup, $groups)) {
return UTYPE_PROGRAM_MANAGER;
}
$hostGroup = Config::get('header_auth.group_map.host');
if (in_array($hostGroup, $groups)) {
return UTYPE_HOST;
}
return UTYPE_GUEST;
}
private function getFirstName(?string $name): ?string
{
if ($name == null) {
return null;
}
$result = explode(' ', $name, 2);
return $result[0];
}
private function getLastName(?string $name): ?string
{
if ($name == null) {
return null;
}
$result = explode(' ', $name, 2);
return end($result);
}
private function getHeaderValueOf(string $httpHeader): ?string
{
// Normalize the header name to match server's format
$normalizedHeader = 'HTTP_' . strtoupper(str_replace('-', '_', $httpHeader));
return $_SERVER[$normalizedHeader] ?? null;
}
// Needed for zend auth adapter
private Application_Model_User $user;
public function setIdentity($username)
{
return $this;
}
public function setCredential($password)
{
return $this;
}
/**
* return dummy object for internal auth handling.
*
* we need to build a dummpy object since the auth layer knows nothing about the db
*
* @param null $returnColumns
* @param null $omitColumns
*
* @return stdClass
*/
public function getResultRowObject($returnColumns = null, $omitColumns = null)
{
$o = new stdClass();
$o->id = $this->user->getId();
$o->username = $this->user->getLogin();
$o->password = $this->user->getPassword();
$o->real_name = implode(' ', [$this->user->getFirstName(), $this->user->getLastName()]);
$o->type = $this->user->getType();
$o->login = $this->user->getLogin();
return $o;
}
}

View File

@ -33,17 +33,8 @@ class AutoPlaylistManager
// call the addPlaylist to show function and don't check for user permission to avoid call to non-existant user object
$sid = $si->getShowId();
$playlistrepeat = new Application_Model_Show($sid);
if ($playlistrepeat->getHasOverrideIntroPlaylist()) {
$introplaylistid = $playlistrepeat->getIntroPlaylistId();
} else {
$introplaylistid = Application_Model_Preference::GetIntroPlaylist();
}
if ($playlistrepeat->getHasOverrideOutroPlaylist()) {
$outroplaylistid = $playlistrepeat->getOutroPlaylistId();
} else {
$outroplaylistid = Application_Model_Preference::GetOutroPlaylist();
}
$introplaylistid = Application_Model_Preference::GetIntroPlaylist();
$outroplaylistid = Application_Model_Preference::GetOutroPlaylist();
// we want to check and see if we need to repeat this process until the show is 100% scheduled
// so we create a while loop and break it immediately if repeat until full isn't enabled

View File

@ -98,7 +98,6 @@ class Application_Common_LocaleHelper
'mt' => _('Maltese'),
'my' => _('Burmese'),
'na' => _('Nauru'),
'nb' => _('Norwegian Bokmål'),
'ne' => _('Nepali'),
'nl' => _('Dutch'),
'no' => _('Norwegian'),

View File

@ -99,22 +99,6 @@ class Schema implements ConfigurationInterface
/**/->scalarNode('filter_field')->end()
->end()->end()
// Header Auth Schema
->arrayNode('header_auth')->children()
/**/->scalarNode('user_header')->defaultValue('Remote-User')->end()
/**/->scalarNode('groups_header')->defaultValue('Remote-Groups')->end()
/**/->scalarNode('email_header')->defaultValue('Remote-Email')->end()
/**/->scalarNode('name_header')->defaultValue('Remote-Name')->end()
/**/->scalarNode('proxy_ip')->end()
/**/->scalarNode('locale')->defaultValue('en-US')->end()
/**/->arrayNode('group_map')->children()
/* */->scalarNode('host')->end()
/* */->scalarNode('program_manager')->end()
/* */->scalarNode('admin')->end()
/* */->scalarNode('superadmin')->end()
/**/->end()->end()
->end()->end()
// Playout schema
->arrayNode('playout')
/**/->ignoreExtraKeys()

View File

@ -398,6 +398,7 @@ class LibraryController extends Zend_Controller_Action
$this->view->id = $file_id;
$this->view->title = $file->getPropelOrm()->getDbTrackTitle();
$this->view->artist_name = $file->getPropelOrm()->getDbArtistName();
$this->view->filePath = $file->getPropelOrm()->getDbFilepath();
$this->view->artwork = $file->getPropelOrm()->getDbArtwork();
$this->view->replay_gain = $file->getPropelOrm()->getDbReplayGain();
$this->view->cuein = $file->getPropelOrm()->getDbCuein();
@ -405,28 +406,6 @@ class LibraryController extends Zend_Controller_Action
$this->view->format = $file->getPropelOrm()->getDbFormat();
$this->view->bit_rate = $file->getPropelOrm()->getDbBitRate();
$this->view->sample_rate = $file->getPropelOrm()->getDbSampleRate();
$filePath = $file->getPropelOrm()->getDbFilepath();
if ($isAdmin) {
$this->view->file_name = $filePath;
} else {
$fileParts = explode(DIRECTORY_SEPARATOR, $filePath);
$filename = end($fileParts);
$this->view->file_name = $filename;
}
// 1000 B in KB and 1000 KB in MB and 1000 MB in GB
$size = $file->getPropelOrm()->getFileSize();
if ($size < 1000) {
// Use B up to 1 KB
$this->view->file_size = $size . ' B';
} elseif ($size < (500 * 1000)) {
// Use KB up to 500 KB
$this->view->file_size = round($size / 1000, 1) . ' KB';
} elseif ($size < (1 * 1000 * 1000 * 1000)) {
// Use MB up to 1 GB
$this->view->file_size = round($size / 1000 / 1000, 1) . ' MB';
} else {
$this->view->file_size = round($size / 1000 / 1000 / 1000, 1) . ' GB';
}
$this->view->html = $this->view->render('library/edit-file-md.phtml');
}

View File

@ -44,37 +44,44 @@ class LoginController extends Zend_Controller_Action
$form = new Application_Form_Login();
$authAdapter = Application_Model_Auth::getAuthAdapter();
$message = _('Please enter your username and password.');
if ($authAdapter instanceof LibreTime_Auth_Adaptor_Header || ($request->isPost() && $form->isValid($request->getPost()))) {
// get the username and password from the form
$username = $form->getValue('username');
$password = $form->getValue('password');
$locale = $form->getValue('locale');
if ($request->isPost()) {
// Open the session for writing, because we close it for writing by default in Bootstrap.php as an optimization.
// session_start();
// pass to the adapter the submitted username and password
$authAdapter->setIdentity($username)
->setCredential($password);
if ($form->isValid($request->getPost())) {
// get the username and password from the form
$username = $form->getValue('username');
$password = $form->getValue('password');
$locale = $form->getValue('locale');
$result = $auth->authenticate($authAdapter);
if ($result->isValid()) {
Zend_Session::regenerateId();
// all info about this user from the login table omit only the password
$userInfo = $authAdapter->getResultRowObject(null, 'password');
$authAdapter = Application_Model_Auth::getAuthAdapter();
// the default storage is a session with namespace Zend_Auth
$authStorage = $auth->getStorage();
$authStorage->write($userInfo);
// pass to the adapter the submitted username and password
$authAdapter->setIdentity($username)
->setCredential($password);
Application_Model_LoginAttempts::resetAttempts($_SERVER['REMOTE_ADDR']);
Application_Model_Subjects::resetLoginAttempts($username);
$result = $auth->authenticate($authAdapter);
if ($result->isValid()) {
Zend_Session::regenerateId();
// all info about this user from the login table omit only the password
$userInfo = $authAdapter->getResultRowObject(null, 'password');
// set the user locale in case user changed it in when logging in
Application_Model_Preference::SetUserLocale($locale);
// the default storage is a session with namespace Zend_Auth
$authStorage = $auth->getStorage();
$authStorage->write($userInfo);
$this->_redirect('showbuilder');
} else {
$form = $this->loginError($username);
Application_Model_LoginAttempts::resetAttempts($_SERVER['REMOTE_ADDR']);
Application_Model_Subjects::resetLoginAttempts($username);
// set the user locale in case user changed it in when logging in
Application_Model_Preference::SetUserLocale($locale);
$this->_redirect('showbuilder');
} else {
$form = $this->loginError($username);
}
}
}

View File

@ -13,8 +13,6 @@ class Application_Form_AddShowAutoPlaylist extends Zend_Form_SubForm
// and store to assoc array
$maxLens = Application_Model_Show::getMaxLengths();
$playlistNames = Application_Model_Library::getPlaylistNames(true);
// Add autoplaylist checkbox element
$this->addElement('checkbox', 'add_show_has_autoplaylist', [
'label' => _('Add Autoloading Playlist ?'),
@ -25,11 +23,10 @@ class Application_Form_AddShowAutoPlaylist extends Zend_Form_SubForm
$autoPlaylistSelect = new Zend_Form_Element_Select('add_show_autoplaylist_id');
$autoPlaylistSelect->setLabel(_('Select Playlist'));
$autoPlaylistSelect->setMultiOptions($playlistNames);
$autoPlaylistSelect->setMultiOptions(Application_Model_Library::getPlaylistNames(true));
$autoPlaylistSelect->setValue(null);
$autoPlaylistSelect->setDecorators(['ViewHelper']);
$this->addElement($autoPlaylistSelect);
// Add autoplaylist checkbox element
$this->addElement('checkbox', 'add_show_autoplaylist_repeat', [
'label' => _('Repeat Playlist Until Show is Full ?'),
@ -37,23 +34,6 @@ class Application_Form_AddShowAutoPlaylist extends Zend_Form_SubForm
'class' => 'input_text',
'decorators' => ['ViewHelper'],
]);
// Append 'Default' to 'None' option
$playlistNames[null] = _('None') . '/' . _('Default');
$introPlaylistSelect = new Zend_Form_Element_Select('add_show_intro_playlist_id');
$introPlaylistSelect->setLabel(_('Select Intro Playlist'));
$introPlaylistSelect->setMultiOptions($playlistNames);
$introPlaylistSelect->setValue(null);
$introPlaylistSelect->setDecorators(['ViewHelper']);
$this->addElement($introPlaylistSelect);
$outroPlaylistSelect = new Zend_Form_Element_Select('add_show_outro_playlist_id');
$outroPlaylistSelect->setLabel(_('Select Outro Playlist'));
$outroPlaylistSelect->setMultiOptions($playlistNames);
$outroPlaylistSelect->setValue(null);
$outroPlaylistSelect->setDecorators(['ViewHelper']);
$this->addElement($outroPlaylistSelect);
}
public function disable()

View File

@ -105,18 +105,16 @@ class Application_Form_GeneralPreferences extends Zend_Form_SubForm
$tracktypeDefault->setValue(Application_Model_Preference::GetTrackTypeDefault());
$this->addElement($tracktypeDefault);
$playlistNames = Application_Model_Library::getPlaylistNames(true);
// add intro playlist select here
$introPlaylistSelect = new Zend_Form_Element_Select('introPlaylistSelect');
$introPlaylistSelect->setLabel(_('Intro Autoloading Playlist'));
$introPlaylistSelect->setMultiOptions($playlistNames);
$introPlaylistSelect->setMultiOptions(Application_Model_Library::getPlaylistNames(true));
$introPlaylistSelect->setValue(Application_Model_Preference::GetIntroPlaylist());
$this->addElement($introPlaylistSelect);
$outroPlaylistSelect = new Zend_Form_Element_Select('outroPlaylistSelect');
$outroPlaylistSelect->setLabel(_('Outro Autoloading Playlist'));
$outroPlaylistSelect->setMultiOptions($playlistNames);
$outroPlaylistSelect->setMultiOptions(Application_Model_Library::getPlaylistNames(true));
$outroPlaylistSelect->setValue(Application_Model_Preference::GetOutroPlaylist());
$this->addElement($outroPlaylistSelect);

View File

@ -1300,87 +1300,89 @@ SQL;
$info = $this->getListofFilesMeetCriteria($show);
$files = $info['files'];
$limit = $info['limit'];
$repeat = $info['repeat_tracks'] == 1;
$overflow = $info['overflow_tracks'] == 1;
$isRandomSort = $info['sort_type'] == 'random';
$blockTime = $limit['time'];
$blockItems = $limit['items'];
$repeat = $info['repeat_tracks'];
$overflow = $info['overflow_tracks'];
$insertList = [];
$totalTime = 0;
$totalItems = 0;
if ($files->isEmpty()) {
return [];
return $insertList;
}
// this moves the pointer to the first element in the collection
$files->getFirst();
$iterator = $files->getIterator();
/**
* @var Track[] $tracks
*/
$tracks = [];
$maxItems = 500;
while ($iterator->valid() && count($tracks) < $maxItems) {
$isBlockFull = false;
while ($iterator->valid()) {
$id = $iterator->current()->getDbId();
$fileLength = $iterator->current()->getCueLength();
$length = Application_Common_DateHelper::calculateLengthInSeconds($fileLength);
// if the block is setup to allow the overflow of tracks this will add the next track even if it becomes
// longer than the time limit
if ($overflow == 1) {
$insertList[] = ['id' => $id, 'length' => $length];
$totalTime += $length;
++$totalItems;
}
// otherwise we need to check to determine if the track will make the playlist exceed the totalTime before
// adding it this could loop through a lot of tracks so I used the totalItems limit to prevent
// the algorithm from parsing too many items.
$tracks[] = new Track($id, $length);
else {
$projectedTime = $totalTime + $length;
if ($projectedTime > $limit['time']) {
++$totalItems;
} else {
$insertList[] = ['id' => $id, 'length' => $length];
$totalTime += $length;
++$totalItems;
}
}
if ((!is_null($limit['items']) && $limit['items'] == count($insertList)) || $totalItems > 500 || $totalTime > $limit['time']) {
$isBlockFull = true;
break;
}
$iterator->next();
}
/**
* @var Track[] $insertList
*/
$insertList = [];
$totalTime = 0;
if ($isRandomSort && !$overflow && $blockItems === null) {
$minTrackLength = min(array_map(fn (Track $item) => $item->length, $tracks));
do {
$solution = SSPSolution::solve($tracks, $blockTime - $totalTime);
$insertList = array_merge($insertList, $solution->tracks);
$totalTime += $solution->sum;
} while ($repeat && ($blockTime - $totalTime) > $minTrackLength);
shuffle($insertList);
} else {
$isFull = function () use (&$blockItems, &$insertList, &$totalTime, &$blockTime) {
return $blockItems !== null && count($insertList) >= $blockItems || $totalTime > $blockTime;
};
$sizeOfInsert = count($insertList);
$addTrack = function (Track $track) use ($overflow, $blockTime, &$insertList, &$totalTime) {
if ($overflow) {
$insertList[] = $track;
$totalTime += $track->length;
// if block is not full and repeat_track is check, fill up more
// additionally still don't overflow the limit
while (!$isBlockFull && $repeat == 1 && $sizeOfInsert > 0) {
Logging::debug('adding repeated tracks.');
Logging::debug('total time = ' . $totalTime);
$randomEleKey = array_rand(array_slice($insertList, 0, $sizeOfInsert));
// this will also allow the overflow of tracks so that time limited smart blocks will schedule until they
// are longer than the time limit rather than never scheduling past the time limit
if ($overflow == 1) {
$insertList[] = $insertList[$randomEleKey];
$totalTime += $insertList[$randomEleKey]['length'];
++$totalItems;
} else {
$projectedTime = $totalTime + $insertList[$randomEleKey]['length'];
if ($projectedTime > $limit['time']) {
++$totalItems;
} else {
$projectedTime = $totalTime + $track->length;
if ($projectedTime <= $blockTime) {
$insertList[] = $track;
$totalTime += $track->length;
}
}
};
foreach ($tracks as $track) {
$addTrack($track);
if ($isFull()) {
break;
$insertList[] = $insertList[$randomEleKey];
$totalTime += $insertList[$randomEleKey]['length'];
++$totalItems;
}
}
$sizeOfInsert = count($insertList);
while (!$isFull() && $repeat && $sizeOfInsert > 0) {
Logging::debug('adding repeated tracks.');
Logging::debug('total time = ' . $totalTime);
$track = $insertList[array_rand(array_slice($insertList, 0, $sizeOfInsert))];
$addTrack($track);
if ((!is_null($limit['items']) && $limit['items'] == count($insertList)) || $totalItems > 500 || $totalTime > $limit['time']) {
break;
}
}
return array_map(fn (Track $track) => ['id' => $track->id, 'length' => $track->length], $insertList);
return $insertList;
}
/**
@ -1562,24 +1564,24 @@ SQL;
$spCriteriaValue = $this->resolveDate($spCriteriaValue);
if ($spCriteriaModifier == CriteriaModifier::STARTS_WITH) {
if ($spCriteriaModifier == 'starts with') {
$spCriteriaValue = "{$spCriteriaValue}%";
} elseif ($spCriteriaModifier == CriteriaModifier::ENDS_WITH) {
} elseif ($spCriteriaModifier == 'ends with') {
$spCriteriaValue = "%{$spCriteriaValue}";
} elseif ($spCriteriaModifier == CriteriaModifier::CONTAINS || $spCriteriaModifier == CriteriaModifier::DOES_NOT_CONTAIN) {
} elseif ($spCriteriaModifier == 'contains' || $spCriteriaModifier == 'does not contain') {
$spCriteriaValue = "%{$spCriteriaValue}%";
} elseif ($spCriteriaModifier == CriteriaModifier::IS_IN_THE_RANGE) {
} elseif ($spCriteriaModifier == 'is in the range') {
$spCriteriaValue = "{$spCriteria} >= '{$spCriteriaValue}' AND {$spCriteria} <= '{$spCriteriaExtra}'";
} elseif ($spCriteriaModifier == CriteriaModifier::BEFORE) {
} elseif ($spCriteriaModifier == 'before') {
// need to pull in the current time and subtract the value or figure out how to make it relative
$relativedate = new DateTime($spCriteriaValue);
$dt = $relativedate->format(DateTime::ISO8601);
$spCriteriaValue = "COALESCE({$spCriteria}, DATE '-infinity') <= '{$dt}'";
} elseif ($spCriteriaModifier == CriteriaModifier::AFTER) {
} elseif ($spCriteriaModifier == 'after') {
$relativedate = new DateTime($spCriteriaValue);
$dt = $relativedate->format(DateTime::ISO8601);
$spCriteriaValue = "COALESCE({$spCriteria}, DATE '-infinity') >= '{$dt}'";
} elseif ($spCriteriaModifier == CriteriaModifier::BETWEEN) {
} elseif ($spCriteriaModifier == 'between') {
$fromrelativedate = new DateTime($spCriteriaValue);
$fdt = $fromrelativedate->format(DateTime::ISO8601);
@ -1594,11 +1596,6 @@ SQL;
if ($spCriteria == 'owner_id') {
$spCriteria = 'subj.login';
}
if ($spCriteria == 'filepath') {
$spCriteria = "reverse(split_part(reverse(filepath), '/', 1))";
}
if ($i > 0 && $prevgroup == $group) {
$qry->addOr($spCriteria, $spCriteriaValue, $spCriteriaModifier);
} else {
@ -1631,10 +1628,12 @@ SQL;
$qry->addDescendingOrderByColumn('utime');
} elseif ($sortTracks == 'oldest') {
$qry->addAscendingOrderByColumn('utime');
} elseif ($sortTracks == 'mostrecentplay') {
$qry->addAscendingOrderByColumn('lptime DESC NULLS LAST, filepath');
}
// these sort additions are needed to override the default postgres NULL sort behavior
elseif ($sortTracks == 'mostrecentplay') {
$qry->addDescendingOrderByColumn('(lptime IS NULL), lptime');
} elseif ($sortTracks == 'leastrecentplay') {
$qry->addAscendingOrderByColumn('lptime ASC NULLS FIRST, filepath');
$qry->addAscendingOrderByColumn('(lptime IS NOT NULL), lptime');
} elseif ($sortTracks == 'random') {
$qry->addAscendingOrderByColumn('random()');
} else {
@ -1678,7 +1677,7 @@ SQL;
try {
$out = $qry->setFormatter(ModelCriteria::FORMAT_ON_DEMAND)->find();
return ['files' => $out, 'limit' => $limits, 'repeat_tracks' => $repeatTracks, 'overflow_tracks' => $overflowTracks, 'count' => $out->count(), 'sort_type' => $sortTracks];
return ['files' => $out, 'limit' => $limits, 'repeat_tracks' => $repeatTracks, 'overflow_tracks' => $overflowTracks, 'count' => $out->count()];
} catch (Exception $e) {
Logging::info($e);
}
@ -1746,140 +1745,6 @@ SQL;
// smart block functions end
}
class Track
{
public int $id;
public float $length;
public function __construct($id, $length)
{
$this->id = $id;
$this->length = $length;
}
public function __toString(): string
{
return (string) $this->id;
}
}
/**
* Using a randomized greedy with local improvement approximation solution for the Subset Sum Problem.
*
* https://web.stevens.edu/algebraic/Files/SubsetSum/przydatek99fast.pdf
*/
class SSPSolution
{
/**
* @var Track[]
*/
public array $tracks;
public float $sum = 0.0;
public function __construct($tracks = [], $sum = null)
{
$this->tracks = $tracks;
if ($sum !== null) {
$this->sum = $sum;
} else {
foreach ($this->tracks as $track) {
$this->sum += $track->length;
}
}
}
public function add(Track $track): SSPSolution
{
$new = $this->tracks;
$new[] = $track;
return new SSPSolution($new, $this->sum + $track->length);
}
public function replace(Track $old, Track $new): SSPSolution
{
return new SSPSolution(array_map(fn (Track $it) => $it === $old ? $new : $it, $this->tracks));
}
public static function isCloseEnough(float $delta): bool
{
return $delta < 0.25;
}
public static function maxByOrNull(array $array, callable $callback)
{
$max = null;
$v = null;
foreach ($array as $item) {
$value = $callback($item);
if ($max === null || $v < $value) {
$max = $item;
$v = $value;
}
}
return $max;
}
/**
* @param Track[] $tracks
*/
public static function solve(array $tracks, float $target, int $trials = 50): SSPSolution
{
$best = new SSPSolution();
for ($trial = 0; $trial < $trials; ++$trial) {
shuffle($tracks);
$initial = array_reduce($tracks, function (SSPSolution $solution, Track $track) use ($target) {
$new = $solution->add($track);
if ($new->sum <= $target) {
return $new;
}
return $solution;
}, new SSPSolution());
if (count($initial->tracks) == count($tracks)) {
return $initial;
}
$acceptedItems = $initial->tracks;
shuffle($acceptedItems);
$localImprovement = array_reduce($acceptedItems, function (SSPSolution $solution, Track $track) use ($target, $tracks) {
$delta = $target - $solution->sum;
if (self::isCloseEnough($delta)) {
return $solution;
}
$replacement = self::maxByOrNull(
array_filter(
array_diff($tracks, $solution->tracks),
fn (Track $it) => $it->length > $track->length && $it->length - $track->length <= $delta,
),
fn (Track $it) => $it->length,
);
if ($replacement === null) {
return $solution;
}
return $solution->replace($track, $replacement);
}, $initial);
if ($localImprovement->sum > $best->sum) {
$best = $localImprovement;
}
if ($best->sum === 0.0) {
return $best;
}
}
return $best;
}
}
class BlockNotFoundException extends Exception {}
class BlockNoPermissionException extends Exception {}
class BlockOutDatedException extends Exception {}

View File

@ -19,7 +19,6 @@ final class Application_Model_Locale
'it_IT' => 'Italiano',
'ja_JP' => '日本語',
'ko_KR' => '한국어',
'nb_NO' => 'Norwegian Bokmål (Norway)',
// 'nl_NL' => '',
'pl_PL' => 'Polski',
'pt_BR' => 'Português (Brasil)',

View File

@ -169,58 +169,6 @@ class Application_Model_Show
$show->setDbAutoPlaylistId($playlistid);
}
public function getHasOverrideIntroPlaylist()
{
$show = CcShowQuery::create()->findPK($this->_showId);
return $show->getDbOverrideIntroPlaylist();
}
public function getIntroPlaylistId()
{
$show = CcShowQuery::create()->findPK($this->_showId);
if ($show->getDbOverrideIntroPlaylist()) {
return $show->getDbIntroPlaylistId();
}
return 0;
}
public function setIntroPlaylistId($playlistid)
{
$show = CcShowQuery::create()->findPK($this->_showId);
$show->setDbOverrideIntroPlaylist($playlistid != 0);
$show->setDbIntroPlaylistId($playlistid);
}
public function getHasOverrideOutroPlaylist()
{
$show = CcShowQuery::create()->findPK($this->_showId);
return $show->getDbOverrideOutroPlaylist();
}
public function getOutroPlaylistId()
{
$show = CcShowQuery::create()->findPK($this->_showId);
if ($show->getDbOverrideOutroPlaylist()) {
return $show->getDbOutroPlaylistId();
}
return 0;
}
public function setOutroPlaylistId($playlistid)
{
$show = CcShowQuery::create()->findPK($this->_showId);
$show->setDbOverrideOutroPlaylist($playlistid != 0);
$show->setDbOutroPlaylistId($playlistid);
}
public function getHosts()
{
$sql = <<<'SQL'

View File

@ -750,7 +750,7 @@ SQL;
} elseif ($key === 'filepath') {
$plSelect[] = 'NULL::VARCHAR AS ' . $key;
$blSelect[] = 'NULL::VARCHAR AS ' . $key;
$fileSelect[] = "reverse(split_part(reverse({$key}), '/', 1)) as {$key}";
$fileSelect[] = $key;
$streamSelect[] = 'url AS ' . $key;
} elseif ($key == 'mime') {
$plSelect[] = 'NULL::VARCHAR AS ' . $key;

View File

@ -327,10 +327,6 @@ class CcShow extends BaseCcShow
$info['has_autoplaylist'] = $this->getDbHasAutoPlaylist();
$info['autoplaylist_id'] = $this->getDbAutoPlaylistId();
$info['autoplaylist_repeat'] = $this->getDbAutoPlaylistRepeat();
$info['override_intro_playlist'] = $this->getDbOverrideIntroPlaylist();
$info['intro_playlist_id'] = $this->getDbIntroPlaylistId();
$info['override_outro_playlist'] = $this->getDbOverrideOutroPlaylist();
$info['outro_playlist_id'] = $this->getDbOutroPlaylistId();
return $info;
}

View File

@ -55,9 +55,7 @@ class CcPlaylistTableMap extends TableMap
public function buildRelations()
{
$this->addRelation('CcSubjs', 'CcSubjs', RelationMap::MANY_TO_ONE, array('creator_id' => 'id', ), 'CASCADE', null);
$this->addRelation('CcShowRelatedByDbAutoPlaylistId', 'CcShow', RelationMap::ONE_TO_MANY, array('id' => 'autoplaylist_id', ), 'SET NULL', null, 'CcShowsRelatedByDbAutoPlaylistId');
$this->addRelation('CcShowRelatedByDbIntroPlaylistId', 'CcShow', RelationMap::ONE_TO_MANY, array('id' => 'intro_playlist_id', ), 'SET NULL', null, 'CcShowsRelatedByDbIntroPlaylistId');
$this->addRelation('CcShowRelatedByDbOutroPlaylistId', 'CcShow', RelationMap::ONE_TO_MANY, array('id' => 'outro_playlist_id', ), 'SET NULL', null, 'CcShowsRelatedByDbOutroPlaylistId');
$this->addRelation('CcShow', 'CcShow', RelationMap::ONE_TO_MANY, array('id' => 'autoplaylist_id', ), 'SET NULL', null, 'CcShows');
$this->addRelation('CcPlaylistcontents', 'CcPlaylistcontents', RelationMap::ONE_TO_MANY, array('id' => 'playlist_id', ), 'CASCADE', null, 'CcPlaylistcontentss');
} // buildRelations()

View File

@ -56,10 +56,6 @@ class CcShowTableMap extends TableMap
$this->addColumn('has_autoplaylist', 'DbHasAutoPlaylist', 'BOOLEAN', true, null, false);
$this->addForeignKey('autoplaylist_id', 'DbAutoPlaylistId', 'INTEGER', 'cc_playlist', 'id', false, null, null);
$this->addColumn('autoplaylist_repeat', 'DbAutoPlaylistRepeat', 'BOOLEAN', true, null, false);
$this->addColumn('override_intro_playlist', 'DbOverrideIntroPlaylist', 'BOOLEAN', true, null, false);
$this->addForeignKey('intro_playlist_id', 'DbIntroPlaylistId', 'INTEGER', 'cc_playlist', 'id', false, null, null);
$this->addColumn('override_outro_playlist', 'DbOverrideOutroPlaylist', 'BOOLEAN', true, null, false);
$this->addForeignKey('outro_playlist_id', 'DbOutroPlaylistId', 'INTEGER', 'cc_playlist', 'id', false, null, null);
// validators
} // initialize()
@ -68,9 +64,7 @@ class CcShowTableMap extends TableMap
*/
public function buildRelations()
{
$this->addRelation('CcPlaylistRelatedByDbAutoPlaylistId', 'CcPlaylist', RelationMap::MANY_TO_ONE, array('autoplaylist_id' => 'id', ), 'SET NULL', null);
$this->addRelation('CcPlaylistRelatedByDbIntroPlaylistId', 'CcPlaylist', RelationMap::MANY_TO_ONE, array('intro_playlist_id' => 'id', ), 'SET NULL', null);
$this->addRelation('CcPlaylistRelatedByDbOutroPlaylistId', 'CcPlaylist', RelationMap::MANY_TO_ONE, array('outro_playlist_id' => 'id', ), 'SET NULL', null);
$this->addRelation('CcPlaylist', 'CcPlaylist', RelationMap::MANY_TO_ONE, array('autoplaylist_id' => 'id', ), 'SET NULL', null);
$this->addRelation('CcShowInstances', 'CcShowInstances', RelationMap::ONE_TO_MANY, array('id' => 'show_id', ), 'CASCADE', null, 'CcShowInstancess');
$this->addRelation('CcShowDays', 'CcShowDays', RelationMap::ONE_TO_MANY, array('id' => 'show_id', ), 'CASCADE', null, 'CcShowDayss');
$this->addRelation('CcShowRebroadcast', 'CcShowRebroadcast', RelationMap::ONE_TO_MANY, array('id' => 'show_id', ), 'CASCADE', null, 'CcShowRebroadcasts');

View File

@ -81,20 +81,8 @@ abstract class BaseCcPlaylist extends BaseObject implements Persistent
/**
* @var PropelObjectCollection|CcShow[] Collection to store aggregation of CcShow objects.
*/
protected $collCcShowsRelatedByDbAutoPlaylistId;
protected $collCcShowsRelatedByDbAutoPlaylistIdPartial;
/**
* @var PropelObjectCollection|CcShow[] Collection to store aggregation of CcShow objects.
*/
protected $collCcShowsRelatedByDbIntroPlaylistId;
protected $collCcShowsRelatedByDbIntroPlaylistIdPartial;
/**
* @var PropelObjectCollection|CcShow[] Collection to store aggregation of CcShow objects.
*/
protected $collCcShowsRelatedByDbOutroPlaylistId;
protected $collCcShowsRelatedByDbOutroPlaylistIdPartial;
protected $collCcShows;
protected $collCcShowsPartial;
/**
* @var PropelObjectCollection|CcPlaylistcontents[] Collection to store aggregation of CcPlaylistcontents objects.
@ -126,19 +114,7 @@ abstract class BaseCcPlaylist extends BaseObject implements Persistent
* An array of objects scheduled for deletion.
* @var PropelObjectCollection
*/
protected $ccShowsRelatedByDbAutoPlaylistIdScheduledForDeletion = null;
/**
* An array of objects scheduled for deletion.
* @var PropelObjectCollection
*/
protected $ccShowsRelatedByDbIntroPlaylistIdScheduledForDeletion = null;
/**
* An array of objects scheduled for deletion.
* @var PropelObjectCollection
*/
protected $ccShowsRelatedByDbOutroPlaylistIdScheduledForDeletion = null;
protected $ccShowsScheduledForDeletion = null;
/**
* An array of objects scheduled for deletion.
@ -570,11 +546,7 @@ abstract class BaseCcPlaylist extends BaseObject implements Persistent
if ($deep) { // also de-associate any related objects?
$this->aCcSubjs = null;
$this->collCcShowsRelatedByDbAutoPlaylistId = null;
$this->collCcShowsRelatedByDbIntroPlaylistId = null;
$this->collCcShowsRelatedByDbOutroPlaylistId = null;
$this->collCcShows = null;
$this->collCcPlaylistcontentss = null;
@ -722,54 +694,18 @@ abstract class BaseCcPlaylist extends BaseObject implements Persistent
$this->resetModified();
}
if ($this->ccShowsRelatedByDbAutoPlaylistIdScheduledForDeletion !== null) {
if (!$this->ccShowsRelatedByDbAutoPlaylistIdScheduledForDeletion->isEmpty()) {
foreach ($this->ccShowsRelatedByDbAutoPlaylistIdScheduledForDeletion as $ccShowRelatedByDbAutoPlaylistId) {
if ($this->ccShowsScheduledForDeletion !== null) {
if (!$this->ccShowsScheduledForDeletion->isEmpty()) {
foreach ($this->ccShowsScheduledForDeletion as $ccShow) {
// need to save related object because we set the relation to null
$ccShowRelatedByDbAutoPlaylistId->save($con);
$ccShow->save($con);
}
$this->ccShowsRelatedByDbAutoPlaylistIdScheduledForDeletion = null;
$this->ccShowsScheduledForDeletion = null;
}
}
if ($this->collCcShowsRelatedByDbAutoPlaylistId !== null) {
foreach ($this->collCcShowsRelatedByDbAutoPlaylistId as $referrerFK) {
if (!$referrerFK->isDeleted() && ($referrerFK->isNew() || $referrerFK->isModified())) {
$affectedRows += $referrerFK->save($con);
}
}
}
if ($this->ccShowsRelatedByDbIntroPlaylistIdScheduledForDeletion !== null) {
if (!$this->ccShowsRelatedByDbIntroPlaylistIdScheduledForDeletion->isEmpty()) {
foreach ($this->ccShowsRelatedByDbIntroPlaylistIdScheduledForDeletion as $ccShowRelatedByDbIntroPlaylistId) {
// need to save related object because we set the relation to null
$ccShowRelatedByDbIntroPlaylistId->save($con);
}
$this->ccShowsRelatedByDbIntroPlaylistIdScheduledForDeletion = null;
}
}
if ($this->collCcShowsRelatedByDbIntroPlaylistId !== null) {
foreach ($this->collCcShowsRelatedByDbIntroPlaylistId as $referrerFK) {
if (!$referrerFK->isDeleted() && ($referrerFK->isNew() || $referrerFK->isModified())) {
$affectedRows += $referrerFK->save($con);
}
}
}
if ($this->ccShowsRelatedByDbOutroPlaylistIdScheduledForDeletion !== null) {
if (!$this->ccShowsRelatedByDbOutroPlaylistIdScheduledForDeletion->isEmpty()) {
foreach ($this->ccShowsRelatedByDbOutroPlaylistIdScheduledForDeletion as $ccShowRelatedByDbOutroPlaylistId) {
// need to save related object because we set the relation to null
$ccShowRelatedByDbOutroPlaylistId->save($con);
}
$this->ccShowsRelatedByDbOutroPlaylistIdScheduledForDeletion = null;
}
}
if ($this->collCcShowsRelatedByDbOutroPlaylistId !== null) {
foreach ($this->collCcShowsRelatedByDbOutroPlaylistId as $referrerFK) {
if ($this->collCcShows !== null) {
foreach ($this->collCcShows as $referrerFK) {
if (!$referrerFK->isDeleted() && ($referrerFK->isNew() || $referrerFK->isModified())) {
$affectedRows += $referrerFK->save($con);
}
@ -986,24 +922,8 @@ abstract class BaseCcPlaylist extends BaseObject implements Persistent
}
if ($this->collCcShowsRelatedByDbAutoPlaylistId !== null) {
foreach ($this->collCcShowsRelatedByDbAutoPlaylistId as $referrerFK) {
if (!$referrerFK->validate($columns)) {
$failureMap = array_merge($failureMap, $referrerFK->getValidationFailures());
}
}
}
if ($this->collCcShowsRelatedByDbIntroPlaylistId !== null) {
foreach ($this->collCcShowsRelatedByDbIntroPlaylistId as $referrerFK) {
if (!$referrerFK->validate($columns)) {
$failureMap = array_merge($failureMap, $referrerFK->getValidationFailures());
}
}
}
if ($this->collCcShowsRelatedByDbOutroPlaylistId !== null) {
foreach ($this->collCcShowsRelatedByDbOutroPlaylistId as $referrerFK) {
if ($this->collCcShows !== null) {
foreach ($this->collCcShows as $referrerFK) {
if (!$referrerFK->validate($columns)) {
$failureMap = array_merge($failureMap, $referrerFK->getValidationFailures());
}
@ -1120,14 +1040,8 @@ abstract class BaseCcPlaylist extends BaseObject implements Persistent
if (null !== $this->aCcSubjs) {
$result['CcSubjs'] = $this->aCcSubjs->toArray($keyType, $includeLazyLoadColumns, $alreadyDumpedObjects, true);
}
if (null !== $this->collCcShowsRelatedByDbAutoPlaylistId) {
$result['CcShowsRelatedByDbAutoPlaylistId'] = $this->collCcShowsRelatedByDbAutoPlaylistId->toArray(null, true, $keyType, $includeLazyLoadColumns, $alreadyDumpedObjects);
}
if (null !== $this->collCcShowsRelatedByDbIntroPlaylistId) {
$result['CcShowsRelatedByDbIntroPlaylistId'] = $this->collCcShowsRelatedByDbIntroPlaylistId->toArray(null, true, $keyType, $includeLazyLoadColumns, $alreadyDumpedObjects);
}
if (null !== $this->collCcShowsRelatedByDbOutroPlaylistId) {
$result['CcShowsRelatedByDbOutroPlaylistId'] = $this->collCcShowsRelatedByDbOutroPlaylistId->toArray(null, true, $keyType, $includeLazyLoadColumns, $alreadyDumpedObjects);
if (null !== $this->collCcShows) {
$result['CcShows'] = $this->collCcShows->toArray(null, true, $keyType, $includeLazyLoadColumns, $alreadyDumpedObjects);
}
if (null !== $this->collCcPlaylistcontentss) {
$result['CcPlaylistcontentss'] = $this->collCcPlaylistcontentss->toArray(null, true, $keyType, $includeLazyLoadColumns, $alreadyDumpedObjects);
@ -1313,21 +1227,9 @@ abstract class BaseCcPlaylist extends BaseObject implements Persistent
// store object hash to prevent cycle
$this->startCopy = true;
foreach ($this->getCcShowsRelatedByDbAutoPlaylistId() as $relObj) {
foreach ($this->getCcShows() as $relObj) {
if ($relObj !== $this) { // ensure that we don't try to copy a reference to ourselves
$copyObj->addCcShowRelatedByDbAutoPlaylistId($relObj->copy($deepCopy));
}
}
foreach ($this->getCcShowsRelatedByDbIntroPlaylistId() as $relObj) {
if ($relObj !== $this) { // ensure that we don't try to copy a reference to ourselves
$copyObj->addCcShowRelatedByDbIntroPlaylistId($relObj->copy($deepCopy));
}
}
foreach ($this->getCcShowsRelatedByDbOutroPlaylistId() as $relObj) {
if ($relObj !== $this) { // ensure that we don't try to copy a reference to ourselves
$copyObj->addCcShowRelatedByDbOutroPlaylistId($relObj->copy($deepCopy));
$copyObj->addCcShow($relObj->copy($deepCopy));
}
}
@ -1450,14 +1352,8 @@ abstract class BaseCcPlaylist extends BaseObject implements Persistent
*/
public function initRelation($relationName)
{
if ('CcShowRelatedByDbAutoPlaylistId' == $relationName) {
$this->initCcShowsRelatedByDbAutoPlaylistId();
}
if ('CcShowRelatedByDbIntroPlaylistId' == $relationName) {
$this->initCcShowsRelatedByDbIntroPlaylistId();
}
if ('CcShowRelatedByDbOutroPlaylistId' == $relationName) {
$this->initCcShowsRelatedByDbOutroPlaylistId();
if ('CcShow' == $relationName) {
$this->initCcShows();
}
if ('CcPlaylistcontents' == $relationName) {
$this->initCcPlaylistcontentss();
@ -1465,36 +1361,36 @@ abstract class BaseCcPlaylist extends BaseObject implements Persistent
}
/**
* Clears out the collCcShowsRelatedByDbAutoPlaylistId collection
* Clears out the collCcShows collection
*
* This does not modify the database; however, it will remove any associated objects, causing
* them to be refetched by subsequent calls to accessor method.
*
* @return CcPlaylist The current object (for fluent API support)
* @see addCcShowsRelatedByDbAutoPlaylistId()
* @see addCcShows()
*/
public function clearCcShowsRelatedByDbAutoPlaylistId()
public function clearCcShows()
{
$this->collCcShowsRelatedByDbAutoPlaylistId = null; // important to set this to null since that means it is uninitialized
$this->collCcShowsRelatedByDbAutoPlaylistIdPartial = null;
$this->collCcShows = null; // important to set this to null since that means it is uninitialized
$this->collCcShowsPartial = null;
return $this;
}
/**
* reset is the collCcShowsRelatedByDbAutoPlaylistId collection loaded partially
* reset is the collCcShows collection loaded partially
*
* @return void
*/
public function resetPartialCcShowsRelatedByDbAutoPlaylistId($v = true)
public function resetPartialCcShows($v = true)
{
$this->collCcShowsRelatedByDbAutoPlaylistIdPartial = $v;
$this->collCcShowsPartial = $v;
}
/**
* Initializes the collCcShowsRelatedByDbAutoPlaylistId collection.
* Initializes the collCcShows collection.
*
* By default this just sets the collCcShowsRelatedByDbAutoPlaylistId collection to an empty array (like clearcollCcShowsRelatedByDbAutoPlaylistId());
* By default this just sets the collCcShows collection to an empty array (like clearcollCcShows());
* however, you may wish to override this method in your stub class to provide setting appropriate
* to your application -- for example, setting the initial array to the values stored in database.
*
@ -1503,13 +1399,13 @@ abstract class BaseCcPlaylist extends BaseObject implements Persistent
*
* @return void
*/
public function initCcShowsRelatedByDbAutoPlaylistId($overrideExisting = true)
public function initCcShows($overrideExisting = true)
{
if (null !== $this->collCcShowsRelatedByDbAutoPlaylistId && !$overrideExisting) {
if (null !== $this->collCcShows && !$overrideExisting) {
return;
}
$this->collCcShowsRelatedByDbAutoPlaylistId = new PropelObjectCollection();
$this->collCcShowsRelatedByDbAutoPlaylistId->setModel('CcShow');
$this->collCcShows = new PropelObjectCollection();
$this->collCcShows->setModel('CcShow');
}
/**
@ -1526,79 +1422,79 @@ abstract class BaseCcPlaylist extends BaseObject implements Persistent
* @return PropelObjectCollection|CcShow[] List of CcShow objects
* @throws PropelException
*/
public function getCcShowsRelatedByDbAutoPlaylistId($criteria = null, PropelPDO $con = null)
public function getCcShows($criteria = null, PropelPDO $con = null)
{
$partial = $this->collCcShowsRelatedByDbAutoPlaylistIdPartial && !$this->isNew();
if (null === $this->collCcShowsRelatedByDbAutoPlaylistId || null !== $criteria || $partial) {
if ($this->isNew() && null === $this->collCcShowsRelatedByDbAutoPlaylistId) {
$partial = $this->collCcShowsPartial && !$this->isNew();
if (null === $this->collCcShows || null !== $criteria || $partial) {
if ($this->isNew() && null === $this->collCcShows) {
// return empty collection
$this->initCcShowsRelatedByDbAutoPlaylistId();
$this->initCcShows();
} else {
$collCcShowsRelatedByDbAutoPlaylistId = CcShowQuery::create(null, $criteria)
->filterByCcPlaylistRelatedByDbAutoPlaylistId($this)
$collCcShows = CcShowQuery::create(null, $criteria)
->filterByCcPlaylist($this)
->find($con);
if (null !== $criteria) {
if (false !== $this->collCcShowsRelatedByDbAutoPlaylistIdPartial && count($collCcShowsRelatedByDbAutoPlaylistId)) {
$this->initCcShowsRelatedByDbAutoPlaylistId(false);
if (false !== $this->collCcShowsPartial && count($collCcShows)) {
$this->initCcShows(false);
foreach ($collCcShowsRelatedByDbAutoPlaylistId as $obj) {
if (false == $this->collCcShowsRelatedByDbAutoPlaylistId->contains($obj)) {
$this->collCcShowsRelatedByDbAutoPlaylistId->append($obj);
foreach ($collCcShows as $obj) {
if (false == $this->collCcShows->contains($obj)) {
$this->collCcShows->append($obj);
}
}
$this->collCcShowsRelatedByDbAutoPlaylistIdPartial = true;
$this->collCcShowsPartial = true;
}
$collCcShowsRelatedByDbAutoPlaylistId->getInternalIterator()->rewind();
$collCcShows->getInternalIterator()->rewind();
return $collCcShowsRelatedByDbAutoPlaylistId;
return $collCcShows;
}
if ($partial && $this->collCcShowsRelatedByDbAutoPlaylistId) {
foreach ($this->collCcShowsRelatedByDbAutoPlaylistId as $obj) {
if ($partial && $this->collCcShows) {
foreach ($this->collCcShows as $obj) {
if ($obj->isNew()) {
$collCcShowsRelatedByDbAutoPlaylistId[] = $obj;
$collCcShows[] = $obj;
}
}
}
$this->collCcShowsRelatedByDbAutoPlaylistId = $collCcShowsRelatedByDbAutoPlaylistId;
$this->collCcShowsRelatedByDbAutoPlaylistIdPartial = false;
$this->collCcShows = $collCcShows;
$this->collCcShowsPartial = false;
}
}
return $this->collCcShowsRelatedByDbAutoPlaylistId;
return $this->collCcShows;
}
/**
* Sets a collection of CcShowRelatedByDbAutoPlaylistId objects related by a one-to-many relationship
* Sets a collection of CcShow objects related by a one-to-many relationship
* to the current object.
* It will also schedule objects for deletion based on a diff between old objects (aka persisted)
* and new objects from the given Propel collection.
*
* @param PropelCollection $ccShowsRelatedByDbAutoPlaylistId A Propel collection.
* @param PropelCollection $ccShows A Propel collection.
* @param PropelPDO $con Optional connection object
* @return CcPlaylist The current object (for fluent API support)
*/
public function setCcShowsRelatedByDbAutoPlaylistId(PropelCollection $ccShowsRelatedByDbAutoPlaylistId, PropelPDO $con = null)
public function setCcShows(PropelCollection $ccShows, PropelPDO $con = null)
{
$ccShowsRelatedByDbAutoPlaylistIdToDelete = $this->getCcShowsRelatedByDbAutoPlaylistId(new Criteria(), $con)->diff($ccShowsRelatedByDbAutoPlaylistId);
$ccShowsToDelete = $this->getCcShows(new Criteria(), $con)->diff($ccShows);
$this->ccShowsRelatedByDbAutoPlaylistIdScheduledForDeletion = $ccShowsRelatedByDbAutoPlaylistIdToDelete;
$this->ccShowsScheduledForDeletion = $ccShowsToDelete;
foreach ($ccShowsRelatedByDbAutoPlaylistIdToDelete as $ccShowRelatedByDbAutoPlaylistIdRemoved) {
$ccShowRelatedByDbAutoPlaylistIdRemoved->setCcPlaylistRelatedByDbAutoPlaylistId(null);
foreach ($ccShowsToDelete as $ccShowRemoved) {
$ccShowRemoved->setCcPlaylist(null);
}
$this->collCcShowsRelatedByDbAutoPlaylistId = null;
foreach ($ccShowsRelatedByDbAutoPlaylistId as $ccShowRelatedByDbAutoPlaylistId) {
$this->addCcShowRelatedByDbAutoPlaylistId($ccShowRelatedByDbAutoPlaylistId);
$this->collCcShows = null;
foreach ($ccShows as $ccShow) {
$this->addCcShow($ccShow);
}
$this->collCcShowsRelatedByDbAutoPlaylistId = $ccShowsRelatedByDbAutoPlaylistId;
$this->collCcShowsRelatedByDbAutoPlaylistIdPartial = false;
$this->collCcShows = $ccShows;
$this->collCcShowsPartial = false;
return $this;
}
@ -1612,16 +1508,16 @@ abstract class BaseCcPlaylist extends BaseObject implements Persistent
* @return int Count of related CcShow objects.
* @throws PropelException
*/
public function countCcShowsRelatedByDbAutoPlaylistId(Criteria $criteria = null, $distinct = false, PropelPDO $con = null)
public function countCcShows(Criteria $criteria = null, $distinct = false, PropelPDO $con = null)
{
$partial = $this->collCcShowsRelatedByDbAutoPlaylistIdPartial && !$this->isNew();
if (null === $this->collCcShowsRelatedByDbAutoPlaylistId || null !== $criteria || $partial) {
if ($this->isNew() && null === $this->collCcShowsRelatedByDbAutoPlaylistId) {
$partial = $this->collCcShowsPartial && !$this->isNew();
if (null === $this->collCcShows || null !== $criteria || $partial) {
if ($this->isNew() && null === $this->collCcShows) {
return 0;
}
if ($partial && !$criteria) {
return count($this->getCcShowsRelatedByDbAutoPlaylistId());
return count($this->getCcShows());
}
$query = CcShowQuery::create(null, $criteria);
if ($distinct) {
@ -1629,11 +1525,11 @@ abstract class BaseCcPlaylist extends BaseObject implements Persistent
}
return $query
->filterByCcPlaylistRelatedByDbAutoPlaylistId($this)
->filterByCcPlaylist($this)
->count($con);
}
return count($this->collCcShowsRelatedByDbAutoPlaylistId);
return count($this->collCcShows);
}
/**
@ -1643,18 +1539,18 @@ abstract class BaseCcPlaylist extends BaseObject implements Persistent
* @param CcShow $l CcShow
* @return CcPlaylist The current object (for fluent API support)
*/
public function addCcShowRelatedByDbAutoPlaylistId(CcShow $l)
public function addCcShow(CcShow $l)
{
if ($this->collCcShowsRelatedByDbAutoPlaylistId === null) {
$this->initCcShowsRelatedByDbAutoPlaylistId();
$this->collCcShowsRelatedByDbAutoPlaylistIdPartial = true;
if ($this->collCcShows === null) {
$this->initCcShows();
$this->collCcShowsPartial = true;
}
if (!in_array($l, $this->collCcShowsRelatedByDbAutoPlaylistId->getArrayCopy(), true)) { // only add it if the **same** object is not already associated
$this->doAddCcShowRelatedByDbAutoPlaylistId($l);
if (!in_array($l, $this->collCcShows->getArrayCopy(), true)) { // only add it if the **same** object is not already associated
$this->doAddCcShow($l);
if ($this->ccShowsRelatedByDbAutoPlaylistIdScheduledForDeletion and $this->ccShowsRelatedByDbAutoPlaylistIdScheduledForDeletion->contains($l)) {
$this->ccShowsRelatedByDbAutoPlaylistIdScheduledForDeletion->remove($this->ccShowsRelatedByDbAutoPlaylistIdScheduledForDeletion->search($l));
if ($this->ccShowsScheduledForDeletion and $this->ccShowsScheduledForDeletion->contains($l)) {
$this->ccShowsScheduledForDeletion->remove($this->ccShowsScheduledForDeletion->search($l));
}
}
@ -1662,478 +1558,28 @@ abstract class BaseCcPlaylist extends BaseObject implements Persistent
}
/**
* @param CcShowRelatedByDbAutoPlaylistId $ccShowRelatedByDbAutoPlaylistId The ccShowRelatedByDbAutoPlaylistId object to add.
* @param CcShow $ccShow The ccShow object to add.
*/
protected function doAddCcShowRelatedByDbAutoPlaylistId($ccShowRelatedByDbAutoPlaylistId)
protected function doAddCcShow($ccShow)
{
$this->collCcShowsRelatedByDbAutoPlaylistId[]= $ccShowRelatedByDbAutoPlaylistId;
$ccShowRelatedByDbAutoPlaylistId->setCcPlaylistRelatedByDbAutoPlaylistId($this);
$this->collCcShows[]= $ccShow;
$ccShow->setCcPlaylist($this);
}
/**
* @param CcShowRelatedByDbAutoPlaylistId $ccShowRelatedByDbAutoPlaylistId The ccShowRelatedByDbAutoPlaylistId object to remove.
* @param CcShow $ccShow The ccShow object to remove.
* @return CcPlaylist The current object (for fluent API support)
*/
public function removeCcShowRelatedByDbAutoPlaylistId($ccShowRelatedByDbAutoPlaylistId)
public function removeCcShow($ccShow)
{
if ($this->getCcShowsRelatedByDbAutoPlaylistId()->contains($ccShowRelatedByDbAutoPlaylistId)) {
$this->collCcShowsRelatedByDbAutoPlaylistId->remove($this->collCcShowsRelatedByDbAutoPlaylistId->search($ccShowRelatedByDbAutoPlaylistId));
if (null === $this->ccShowsRelatedByDbAutoPlaylistIdScheduledForDeletion) {
$this->ccShowsRelatedByDbAutoPlaylistIdScheduledForDeletion = clone $this->collCcShowsRelatedByDbAutoPlaylistId;
$this->ccShowsRelatedByDbAutoPlaylistIdScheduledForDeletion->clear();
if ($this->getCcShows()->contains($ccShow)) {
$this->collCcShows->remove($this->collCcShows->search($ccShow));
if (null === $this->ccShowsScheduledForDeletion) {
$this->ccShowsScheduledForDeletion = clone $this->collCcShows;
$this->ccShowsScheduledForDeletion->clear();
}
$this->ccShowsRelatedByDbAutoPlaylistIdScheduledForDeletion[]= $ccShowRelatedByDbAutoPlaylistId;
$ccShowRelatedByDbAutoPlaylistId->setCcPlaylistRelatedByDbAutoPlaylistId(null);
}
return $this;
}
/**
* Clears out the collCcShowsRelatedByDbIntroPlaylistId collection
*
* This does not modify the database; however, it will remove any associated objects, causing
* them to be refetched by subsequent calls to accessor method.
*
* @return CcPlaylist The current object (for fluent API support)
* @see addCcShowsRelatedByDbIntroPlaylistId()
*/
public function clearCcShowsRelatedByDbIntroPlaylistId()
{
$this->collCcShowsRelatedByDbIntroPlaylistId = null; // important to set this to null since that means it is uninitialized
$this->collCcShowsRelatedByDbIntroPlaylistIdPartial = null;
return $this;
}
/**
* reset is the collCcShowsRelatedByDbIntroPlaylistId collection loaded partially
*
* @return void
*/
public function resetPartialCcShowsRelatedByDbIntroPlaylistId($v = true)
{
$this->collCcShowsRelatedByDbIntroPlaylistIdPartial = $v;
}
/**
* Initializes the collCcShowsRelatedByDbIntroPlaylistId collection.
*
* By default this just sets the collCcShowsRelatedByDbIntroPlaylistId collection to an empty array (like clearcollCcShowsRelatedByDbIntroPlaylistId());
* however, you may wish to override this method in your stub class to provide setting appropriate
* to your application -- for example, setting the initial array to the values stored in database.
*
* @param boolean $overrideExisting If set to true, the method call initializes
* the collection even if it is not empty
*
* @return void
*/
public function initCcShowsRelatedByDbIntroPlaylistId($overrideExisting = true)
{
if (null !== $this->collCcShowsRelatedByDbIntroPlaylistId && !$overrideExisting) {
return;
}
$this->collCcShowsRelatedByDbIntroPlaylistId = new PropelObjectCollection();
$this->collCcShowsRelatedByDbIntroPlaylistId->setModel('CcShow');
}
/**
* Gets an array of CcShow objects which contain a foreign key that references this object.
*
* If the $criteria is not null, it is used to always fetch the results from the database.
* Otherwise the results are fetched from the database the first time, then cached.
* Next time the same method is called without $criteria, the cached collection is returned.
* If this CcPlaylist is new, it will return
* an empty collection or the current collection; the criteria is ignored on a new object.
*
* @param Criteria $criteria optional Criteria object to narrow the query
* @param PropelPDO $con optional connection object
* @return PropelObjectCollection|CcShow[] List of CcShow objects
* @throws PropelException
*/
public function getCcShowsRelatedByDbIntroPlaylistId($criteria = null, PropelPDO $con = null)
{
$partial = $this->collCcShowsRelatedByDbIntroPlaylistIdPartial && !$this->isNew();
if (null === $this->collCcShowsRelatedByDbIntroPlaylistId || null !== $criteria || $partial) {
if ($this->isNew() && null === $this->collCcShowsRelatedByDbIntroPlaylistId) {
// return empty collection
$this->initCcShowsRelatedByDbIntroPlaylistId();
} else {
$collCcShowsRelatedByDbIntroPlaylistId = CcShowQuery::create(null, $criteria)
->filterByCcPlaylistRelatedByDbIntroPlaylistId($this)
->find($con);
if (null !== $criteria) {
if (false !== $this->collCcShowsRelatedByDbIntroPlaylistIdPartial && count($collCcShowsRelatedByDbIntroPlaylistId)) {
$this->initCcShowsRelatedByDbIntroPlaylistId(false);
foreach ($collCcShowsRelatedByDbIntroPlaylistId as $obj) {
if (false == $this->collCcShowsRelatedByDbIntroPlaylistId->contains($obj)) {
$this->collCcShowsRelatedByDbIntroPlaylistId->append($obj);
}
}
$this->collCcShowsRelatedByDbIntroPlaylistIdPartial = true;
}
$collCcShowsRelatedByDbIntroPlaylistId->getInternalIterator()->rewind();
return $collCcShowsRelatedByDbIntroPlaylistId;
}
if ($partial && $this->collCcShowsRelatedByDbIntroPlaylistId) {
foreach ($this->collCcShowsRelatedByDbIntroPlaylistId as $obj) {
if ($obj->isNew()) {
$collCcShowsRelatedByDbIntroPlaylistId[] = $obj;
}
}
}
$this->collCcShowsRelatedByDbIntroPlaylistId = $collCcShowsRelatedByDbIntroPlaylistId;
$this->collCcShowsRelatedByDbIntroPlaylistIdPartial = false;
}
}
return $this->collCcShowsRelatedByDbIntroPlaylistId;
}
/**
* Sets a collection of CcShowRelatedByDbIntroPlaylistId objects related by a one-to-many relationship
* to the current object.
* It will also schedule objects for deletion based on a diff between old objects (aka persisted)
* and new objects from the given Propel collection.
*
* @param PropelCollection $ccShowsRelatedByDbIntroPlaylistId A Propel collection.
* @param PropelPDO $con Optional connection object
* @return CcPlaylist The current object (for fluent API support)
*/
public function setCcShowsRelatedByDbIntroPlaylistId(PropelCollection $ccShowsRelatedByDbIntroPlaylistId, PropelPDO $con = null)
{
$ccShowsRelatedByDbIntroPlaylistIdToDelete = $this->getCcShowsRelatedByDbIntroPlaylistId(new Criteria(), $con)->diff($ccShowsRelatedByDbIntroPlaylistId);
$this->ccShowsRelatedByDbIntroPlaylistIdScheduledForDeletion = $ccShowsRelatedByDbIntroPlaylistIdToDelete;
foreach ($ccShowsRelatedByDbIntroPlaylistIdToDelete as $ccShowRelatedByDbIntroPlaylistIdRemoved) {
$ccShowRelatedByDbIntroPlaylistIdRemoved->setCcPlaylistRelatedByDbIntroPlaylistId(null);
}
$this->collCcShowsRelatedByDbIntroPlaylistId = null;
foreach ($ccShowsRelatedByDbIntroPlaylistId as $ccShowRelatedByDbIntroPlaylistId) {
$this->addCcShowRelatedByDbIntroPlaylistId($ccShowRelatedByDbIntroPlaylistId);
}
$this->collCcShowsRelatedByDbIntroPlaylistId = $ccShowsRelatedByDbIntroPlaylistId;
$this->collCcShowsRelatedByDbIntroPlaylistIdPartial = false;
return $this;
}
/**
* Returns the number of related CcShow objects.
*
* @param Criteria $criteria
* @param boolean $distinct
* @param PropelPDO $con
* @return int Count of related CcShow objects.
* @throws PropelException
*/
public function countCcShowsRelatedByDbIntroPlaylistId(Criteria $criteria = null, $distinct = false, PropelPDO $con = null)
{
$partial = $this->collCcShowsRelatedByDbIntroPlaylistIdPartial && !$this->isNew();
if (null === $this->collCcShowsRelatedByDbIntroPlaylistId || null !== $criteria || $partial) {
if ($this->isNew() && null === $this->collCcShowsRelatedByDbIntroPlaylistId) {
return 0;
}
if ($partial && !$criteria) {
return count($this->getCcShowsRelatedByDbIntroPlaylistId());
}
$query = CcShowQuery::create(null, $criteria);
if ($distinct) {
$query->distinct();
}
return $query
->filterByCcPlaylistRelatedByDbIntroPlaylistId($this)
->count($con);
}
return count($this->collCcShowsRelatedByDbIntroPlaylistId);
}
/**
* Method called to associate a CcShow object to this object
* through the CcShow foreign key attribute.
*
* @param CcShow $l CcShow
* @return CcPlaylist The current object (for fluent API support)
*/
public function addCcShowRelatedByDbIntroPlaylistId(CcShow $l)
{
if ($this->collCcShowsRelatedByDbIntroPlaylistId === null) {
$this->initCcShowsRelatedByDbIntroPlaylistId();
$this->collCcShowsRelatedByDbIntroPlaylistIdPartial = true;
}
if (!in_array($l, $this->collCcShowsRelatedByDbIntroPlaylistId->getArrayCopy(), true)) { // only add it if the **same** object is not already associated
$this->doAddCcShowRelatedByDbIntroPlaylistId($l);
if ($this->ccShowsRelatedByDbIntroPlaylistIdScheduledForDeletion and $this->ccShowsRelatedByDbIntroPlaylistIdScheduledForDeletion->contains($l)) {
$this->ccShowsRelatedByDbIntroPlaylistIdScheduledForDeletion->remove($this->ccShowsRelatedByDbIntroPlaylistIdScheduledForDeletion->search($l));
}
}
return $this;
}
/**
* @param CcShowRelatedByDbIntroPlaylistId $ccShowRelatedByDbIntroPlaylistId The ccShowRelatedByDbIntroPlaylistId object to add.
*/
protected function doAddCcShowRelatedByDbIntroPlaylistId($ccShowRelatedByDbIntroPlaylistId)
{
$this->collCcShowsRelatedByDbIntroPlaylistId[]= $ccShowRelatedByDbIntroPlaylistId;
$ccShowRelatedByDbIntroPlaylistId->setCcPlaylistRelatedByDbIntroPlaylistId($this);
}
/**
* @param CcShowRelatedByDbIntroPlaylistId $ccShowRelatedByDbIntroPlaylistId The ccShowRelatedByDbIntroPlaylistId object to remove.
* @return CcPlaylist The current object (for fluent API support)
*/
public function removeCcShowRelatedByDbIntroPlaylistId($ccShowRelatedByDbIntroPlaylistId)
{
if ($this->getCcShowsRelatedByDbIntroPlaylistId()->contains($ccShowRelatedByDbIntroPlaylistId)) {
$this->collCcShowsRelatedByDbIntroPlaylistId->remove($this->collCcShowsRelatedByDbIntroPlaylistId->search($ccShowRelatedByDbIntroPlaylistId));
if (null === $this->ccShowsRelatedByDbIntroPlaylistIdScheduledForDeletion) {
$this->ccShowsRelatedByDbIntroPlaylistIdScheduledForDeletion = clone $this->collCcShowsRelatedByDbIntroPlaylistId;
$this->ccShowsRelatedByDbIntroPlaylistIdScheduledForDeletion->clear();
}
$this->ccShowsRelatedByDbIntroPlaylistIdScheduledForDeletion[]= $ccShowRelatedByDbIntroPlaylistId;
$ccShowRelatedByDbIntroPlaylistId->setCcPlaylistRelatedByDbIntroPlaylistId(null);
}
return $this;
}
/**
* Clears out the collCcShowsRelatedByDbOutroPlaylistId collection
*
* This does not modify the database; however, it will remove any associated objects, causing
* them to be refetched by subsequent calls to accessor method.
*
* @return CcPlaylist The current object (for fluent API support)
* @see addCcShowsRelatedByDbOutroPlaylistId()
*/
public function clearCcShowsRelatedByDbOutroPlaylistId()
{
$this->collCcShowsRelatedByDbOutroPlaylistId = null; // important to set this to null since that means it is uninitialized
$this->collCcShowsRelatedByDbOutroPlaylistIdPartial = null;
return $this;
}
/**
* reset is the collCcShowsRelatedByDbOutroPlaylistId collection loaded partially
*
* @return void
*/
public function resetPartialCcShowsRelatedByDbOutroPlaylistId($v = true)
{
$this->collCcShowsRelatedByDbOutroPlaylistIdPartial = $v;
}
/**
* Initializes the collCcShowsRelatedByDbOutroPlaylistId collection.
*
* By default this just sets the collCcShowsRelatedByDbOutroPlaylistId collection to an empty array (like clearcollCcShowsRelatedByDbOutroPlaylistId());
* however, you may wish to override this method in your stub class to provide setting appropriate
* to your application -- for example, setting the initial array to the values stored in database.
*
* @param boolean $overrideExisting If set to true, the method call initializes
* the collection even if it is not empty
*
* @return void
*/
public function initCcShowsRelatedByDbOutroPlaylistId($overrideExisting = true)
{
if (null !== $this->collCcShowsRelatedByDbOutroPlaylistId && !$overrideExisting) {
return;
}
$this->collCcShowsRelatedByDbOutroPlaylistId = new PropelObjectCollection();
$this->collCcShowsRelatedByDbOutroPlaylistId->setModel('CcShow');
}
/**
* Gets an array of CcShow objects which contain a foreign key that references this object.
*
* If the $criteria is not null, it is used to always fetch the results from the database.
* Otherwise the results are fetched from the database the first time, then cached.
* Next time the same method is called without $criteria, the cached collection is returned.
* If this CcPlaylist is new, it will return
* an empty collection or the current collection; the criteria is ignored on a new object.
*
* @param Criteria $criteria optional Criteria object to narrow the query
* @param PropelPDO $con optional connection object
* @return PropelObjectCollection|CcShow[] List of CcShow objects
* @throws PropelException
*/
public function getCcShowsRelatedByDbOutroPlaylistId($criteria = null, PropelPDO $con = null)
{
$partial = $this->collCcShowsRelatedByDbOutroPlaylistIdPartial && !$this->isNew();
if (null === $this->collCcShowsRelatedByDbOutroPlaylistId || null !== $criteria || $partial) {
if ($this->isNew() && null === $this->collCcShowsRelatedByDbOutroPlaylistId) {
// return empty collection
$this->initCcShowsRelatedByDbOutroPlaylistId();
} else {
$collCcShowsRelatedByDbOutroPlaylistId = CcShowQuery::create(null, $criteria)
->filterByCcPlaylistRelatedByDbOutroPlaylistId($this)
->find($con);
if (null !== $criteria) {
if (false !== $this->collCcShowsRelatedByDbOutroPlaylistIdPartial && count($collCcShowsRelatedByDbOutroPlaylistId)) {
$this->initCcShowsRelatedByDbOutroPlaylistId(false);
foreach ($collCcShowsRelatedByDbOutroPlaylistId as $obj) {
if (false == $this->collCcShowsRelatedByDbOutroPlaylistId->contains($obj)) {
$this->collCcShowsRelatedByDbOutroPlaylistId->append($obj);
}
}
$this->collCcShowsRelatedByDbOutroPlaylistIdPartial = true;
}
$collCcShowsRelatedByDbOutroPlaylistId->getInternalIterator()->rewind();
return $collCcShowsRelatedByDbOutroPlaylistId;
}
if ($partial && $this->collCcShowsRelatedByDbOutroPlaylistId) {
foreach ($this->collCcShowsRelatedByDbOutroPlaylistId as $obj) {
if ($obj->isNew()) {
$collCcShowsRelatedByDbOutroPlaylistId[] = $obj;
}
}
}
$this->collCcShowsRelatedByDbOutroPlaylistId = $collCcShowsRelatedByDbOutroPlaylistId;
$this->collCcShowsRelatedByDbOutroPlaylistIdPartial = false;
}
}
return $this->collCcShowsRelatedByDbOutroPlaylistId;
}
/**
* Sets a collection of CcShowRelatedByDbOutroPlaylistId objects related by a one-to-many relationship
* to the current object.
* It will also schedule objects for deletion based on a diff between old objects (aka persisted)
* and new objects from the given Propel collection.
*
* @param PropelCollection $ccShowsRelatedByDbOutroPlaylistId A Propel collection.
* @param PropelPDO $con Optional connection object
* @return CcPlaylist The current object (for fluent API support)
*/
public function setCcShowsRelatedByDbOutroPlaylistId(PropelCollection $ccShowsRelatedByDbOutroPlaylistId, PropelPDO $con = null)
{
$ccShowsRelatedByDbOutroPlaylistIdToDelete = $this->getCcShowsRelatedByDbOutroPlaylistId(new Criteria(), $con)->diff($ccShowsRelatedByDbOutroPlaylistId);
$this->ccShowsRelatedByDbOutroPlaylistIdScheduledForDeletion = $ccShowsRelatedByDbOutroPlaylistIdToDelete;
foreach ($ccShowsRelatedByDbOutroPlaylistIdToDelete as $ccShowRelatedByDbOutroPlaylistIdRemoved) {
$ccShowRelatedByDbOutroPlaylistIdRemoved->setCcPlaylistRelatedByDbOutroPlaylistId(null);
}
$this->collCcShowsRelatedByDbOutroPlaylistId = null;
foreach ($ccShowsRelatedByDbOutroPlaylistId as $ccShowRelatedByDbOutroPlaylistId) {
$this->addCcShowRelatedByDbOutroPlaylistId($ccShowRelatedByDbOutroPlaylistId);
}
$this->collCcShowsRelatedByDbOutroPlaylistId = $ccShowsRelatedByDbOutroPlaylistId;
$this->collCcShowsRelatedByDbOutroPlaylistIdPartial = false;
return $this;
}
/**
* Returns the number of related CcShow objects.
*
* @param Criteria $criteria
* @param boolean $distinct
* @param PropelPDO $con
* @return int Count of related CcShow objects.
* @throws PropelException
*/
public function countCcShowsRelatedByDbOutroPlaylistId(Criteria $criteria = null, $distinct = false, PropelPDO $con = null)
{
$partial = $this->collCcShowsRelatedByDbOutroPlaylistIdPartial && !$this->isNew();
if (null === $this->collCcShowsRelatedByDbOutroPlaylistId || null !== $criteria || $partial) {
if ($this->isNew() && null === $this->collCcShowsRelatedByDbOutroPlaylistId) {
return 0;
}
if ($partial && !$criteria) {
return count($this->getCcShowsRelatedByDbOutroPlaylistId());
}
$query = CcShowQuery::create(null, $criteria);
if ($distinct) {
$query->distinct();
}
return $query
->filterByCcPlaylistRelatedByDbOutroPlaylistId($this)
->count($con);
}
return count($this->collCcShowsRelatedByDbOutroPlaylistId);
}
/**
* Method called to associate a CcShow object to this object
* through the CcShow foreign key attribute.
*
* @param CcShow $l CcShow
* @return CcPlaylist The current object (for fluent API support)
*/
public function addCcShowRelatedByDbOutroPlaylistId(CcShow $l)
{
if ($this->collCcShowsRelatedByDbOutroPlaylistId === null) {
$this->initCcShowsRelatedByDbOutroPlaylistId();
$this->collCcShowsRelatedByDbOutroPlaylistIdPartial = true;
}
if (!in_array($l, $this->collCcShowsRelatedByDbOutroPlaylistId->getArrayCopy(), true)) { // only add it if the **same** object is not already associated
$this->doAddCcShowRelatedByDbOutroPlaylistId($l);
if ($this->ccShowsRelatedByDbOutroPlaylistIdScheduledForDeletion and $this->ccShowsRelatedByDbOutroPlaylistIdScheduledForDeletion->contains($l)) {
$this->ccShowsRelatedByDbOutroPlaylistIdScheduledForDeletion->remove($this->ccShowsRelatedByDbOutroPlaylistIdScheduledForDeletion->search($l));
}
}
return $this;
}
/**
* @param CcShowRelatedByDbOutroPlaylistId $ccShowRelatedByDbOutroPlaylistId The ccShowRelatedByDbOutroPlaylistId object to add.
*/
protected function doAddCcShowRelatedByDbOutroPlaylistId($ccShowRelatedByDbOutroPlaylistId)
{
$this->collCcShowsRelatedByDbOutroPlaylistId[]= $ccShowRelatedByDbOutroPlaylistId;
$ccShowRelatedByDbOutroPlaylistId->setCcPlaylistRelatedByDbOutroPlaylistId($this);
}
/**
* @param CcShowRelatedByDbOutroPlaylistId $ccShowRelatedByDbOutroPlaylistId The ccShowRelatedByDbOutroPlaylistId object to remove.
* @return CcPlaylist The current object (for fluent API support)
*/
public function removeCcShowRelatedByDbOutroPlaylistId($ccShowRelatedByDbOutroPlaylistId)
{
if ($this->getCcShowsRelatedByDbOutroPlaylistId()->contains($ccShowRelatedByDbOutroPlaylistId)) {
$this->collCcShowsRelatedByDbOutroPlaylistId->remove($this->collCcShowsRelatedByDbOutroPlaylistId->search($ccShowRelatedByDbOutroPlaylistId));
if (null === $this->ccShowsRelatedByDbOutroPlaylistIdScheduledForDeletion) {
$this->ccShowsRelatedByDbOutroPlaylistIdScheduledForDeletion = clone $this->collCcShowsRelatedByDbOutroPlaylistId;
$this->ccShowsRelatedByDbOutroPlaylistIdScheduledForDeletion->clear();
}
$this->ccShowsRelatedByDbOutroPlaylistIdScheduledForDeletion[]= $ccShowRelatedByDbOutroPlaylistId;
$ccShowRelatedByDbOutroPlaylistId->setCcPlaylistRelatedByDbOutroPlaylistId(null);
$this->ccShowsScheduledForDeletion[]= $ccShow;
$ccShow->setCcPlaylist(null);
}
return $this;
@ -2449,18 +1895,8 @@ abstract class BaseCcPlaylist extends BaseObject implements Persistent
{
if ($deep && !$this->alreadyInClearAllReferencesDeep) {
$this->alreadyInClearAllReferencesDeep = true;
if ($this->collCcShowsRelatedByDbAutoPlaylistId) {
foreach ($this->collCcShowsRelatedByDbAutoPlaylistId as $o) {
$o->clearAllReferences($deep);
}
}
if ($this->collCcShowsRelatedByDbIntroPlaylistId) {
foreach ($this->collCcShowsRelatedByDbIntroPlaylistId as $o) {
$o->clearAllReferences($deep);
}
}
if ($this->collCcShowsRelatedByDbOutroPlaylistId) {
foreach ($this->collCcShowsRelatedByDbOutroPlaylistId as $o) {
if ($this->collCcShows) {
foreach ($this->collCcShows as $o) {
$o->clearAllReferences($deep);
}
}
@ -2476,18 +1912,10 @@ abstract class BaseCcPlaylist extends BaseObject implements Persistent
$this->alreadyInClearAllReferencesDeep = false;
} // if ($deep)
if ($this->collCcShowsRelatedByDbAutoPlaylistId instanceof PropelCollection) {
$this->collCcShowsRelatedByDbAutoPlaylistId->clearIterator();
if ($this->collCcShows instanceof PropelCollection) {
$this->collCcShows->clearIterator();
}
$this->collCcShowsRelatedByDbAutoPlaylistId = null;
if ($this->collCcShowsRelatedByDbIntroPlaylistId instanceof PropelCollection) {
$this->collCcShowsRelatedByDbIntroPlaylistId->clearIterator();
}
$this->collCcShowsRelatedByDbIntroPlaylistId = null;
if ($this->collCcShowsRelatedByDbOutroPlaylistId instanceof PropelCollection) {
$this->collCcShowsRelatedByDbOutroPlaylistId->clearIterator();
}
$this->collCcShowsRelatedByDbOutroPlaylistId = null;
$this->collCcShows = null;
if ($this->collCcPlaylistcontentss instanceof PropelCollection) {
$this->collCcPlaylistcontentss->clearIterator();
}

View File

@ -385,12 +385,6 @@ abstract class BaseCcPlaylistPeer
*/
public static function clearRelatedInstancePool()
{
// Invalidate objects in CcShowPeer instance pool,
// since one or more of them may be deleted by ON DELETE CASCADE/SETNULL rule.
CcShowPeer::clearInstancePool();
// Invalidate objects in CcShowPeer instance pool,
// since one or more of them may be deleted by ON DELETE CASCADE/SETNULL rule.
CcShowPeer::clearInstancePool();
// Invalidate objects in CcShowPeer instance pool,
// since one or more of them may be deleted by ON DELETE CASCADE/SETNULL rule.
CcShowPeer::clearInstancePool();

View File

@ -30,17 +30,9 @@
* @method CcPlaylistQuery rightJoinCcSubjs($relationAlias = null) Adds a RIGHT JOIN clause to the query using the CcSubjs relation
* @method CcPlaylistQuery innerJoinCcSubjs($relationAlias = null) Adds a INNER JOIN clause to the query using the CcSubjs relation
*
* @method CcPlaylistQuery leftJoinCcShowRelatedByDbAutoPlaylistId($relationAlias = null) Adds a LEFT JOIN clause to the query using the CcShowRelatedByDbAutoPlaylistId relation
* @method CcPlaylistQuery rightJoinCcShowRelatedByDbAutoPlaylistId($relationAlias = null) Adds a RIGHT JOIN clause to the query using the CcShowRelatedByDbAutoPlaylistId relation
* @method CcPlaylistQuery innerJoinCcShowRelatedByDbAutoPlaylistId($relationAlias = null) Adds a INNER JOIN clause to the query using the CcShowRelatedByDbAutoPlaylistId relation
*
* @method CcPlaylistQuery leftJoinCcShowRelatedByDbIntroPlaylistId($relationAlias = null) Adds a LEFT JOIN clause to the query using the CcShowRelatedByDbIntroPlaylistId relation
* @method CcPlaylistQuery rightJoinCcShowRelatedByDbIntroPlaylistId($relationAlias = null) Adds a RIGHT JOIN clause to the query using the CcShowRelatedByDbIntroPlaylistId relation
* @method CcPlaylistQuery innerJoinCcShowRelatedByDbIntroPlaylistId($relationAlias = null) Adds a INNER JOIN clause to the query using the CcShowRelatedByDbIntroPlaylistId relation
*
* @method CcPlaylistQuery leftJoinCcShowRelatedByDbOutroPlaylistId($relationAlias = null) Adds a LEFT JOIN clause to the query using the CcShowRelatedByDbOutroPlaylistId relation
* @method CcPlaylistQuery rightJoinCcShowRelatedByDbOutroPlaylistId($relationAlias = null) Adds a RIGHT JOIN clause to the query using the CcShowRelatedByDbOutroPlaylistId relation
* @method CcPlaylistQuery innerJoinCcShowRelatedByDbOutroPlaylistId($relationAlias = null) Adds a INNER JOIN clause to the query using the CcShowRelatedByDbOutroPlaylistId relation
* @method CcPlaylistQuery leftJoinCcShow($relationAlias = null) Adds a LEFT JOIN clause to the query using the CcShow relation
* @method CcPlaylistQuery rightJoinCcShow($relationAlias = null) Adds a RIGHT JOIN clause to the query using the CcShow relation
* @method CcPlaylistQuery innerJoinCcShow($relationAlias = null) Adds a INNER JOIN clause to the query using the CcShow relation
*
* @method CcPlaylistQuery leftJoinCcPlaylistcontents($relationAlias = null) Adds a LEFT JOIN clause to the query using the CcPlaylistcontents relation
* @method CcPlaylistQuery rightJoinCcPlaylistcontents($relationAlias = null) Adds a RIGHT JOIN clause to the query using the CcPlaylistcontents relation
@ -603,33 +595,33 @@ abstract class BaseCcPlaylistQuery extends ModelCriteria
* @return CcPlaylistQuery The current query, for fluid interface
* @throws PropelException - if the provided filter is invalid.
*/
public function filterByCcShowRelatedByDbAutoPlaylistId($ccShow, $comparison = null)
public function filterByCcShow($ccShow, $comparison = null)
{
if ($ccShow instanceof CcShow) {
return $this
->addUsingAlias(CcPlaylistPeer::ID, $ccShow->getDbAutoPlaylistId(), $comparison);
} elseif ($ccShow instanceof PropelObjectCollection) {
return $this
->useCcShowRelatedByDbAutoPlaylistIdQuery()
->useCcShowQuery()
->filterByPrimaryKeys($ccShow->getPrimaryKeys())
->endUse();
} else {
throw new PropelException('filterByCcShowRelatedByDbAutoPlaylistId() only accepts arguments of type CcShow or PropelCollection');
throw new PropelException('filterByCcShow() only accepts arguments of type CcShow or PropelCollection');
}
}
/**
* Adds a JOIN clause to the query using the CcShowRelatedByDbAutoPlaylistId relation
* Adds a JOIN clause to the query using the CcShow relation
*
* @param string $relationAlias optional alias for the relation
* @param string $joinType Accepted values are null, 'left join', 'right join', 'inner join'
*
* @return CcPlaylistQuery The current query, for fluid interface
*/
public function joinCcShowRelatedByDbAutoPlaylistId($relationAlias = null, $joinType = Criteria::LEFT_JOIN)
public function joinCcShow($relationAlias = null, $joinType = Criteria::LEFT_JOIN)
{
$tableMap = $this->getTableMap();
$relationMap = $tableMap->getRelation('CcShowRelatedByDbAutoPlaylistId');
$relationMap = $tableMap->getRelation('CcShow');
// create a ModelJoin object for this join
$join = new ModelJoin();
@ -644,14 +636,14 @@ abstract class BaseCcPlaylistQuery extends ModelCriteria
$this->addAlias($relationAlias, $relationMap->getRightTable()->getName());
$this->addJoinObject($join, $relationAlias);
} else {
$this->addJoinObject($join, 'CcShowRelatedByDbAutoPlaylistId');
$this->addJoinObject($join, 'CcShow');
}
return $this;
}
/**
* Use the CcShowRelatedByDbAutoPlaylistId relation CcShow object
* Use the CcShow relation CcShow object
*
* @see useQuery()
*
@ -661,159 +653,11 @@ abstract class BaseCcPlaylistQuery extends ModelCriteria
*
* @return CcShowQuery A secondary query class using the current class as primary query
*/
public function useCcShowRelatedByDbAutoPlaylistIdQuery($relationAlias = null, $joinType = Criteria::LEFT_JOIN)
public function useCcShowQuery($relationAlias = null, $joinType = Criteria::LEFT_JOIN)
{
return $this
->joinCcShowRelatedByDbAutoPlaylistId($relationAlias, $joinType)
->useQuery($relationAlias ? $relationAlias : 'CcShowRelatedByDbAutoPlaylistId', 'CcShowQuery');
}
/**
* Filter the query by a related CcShow object
*
* @param CcShow|PropelObjectCollection $ccShow the related object to use as filter
* @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL
*
* @return CcPlaylistQuery The current query, for fluid interface
* @throws PropelException - if the provided filter is invalid.
*/
public function filterByCcShowRelatedByDbIntroPlaylistId($ccShow, $comparison = null)
{
if ($ccShow instanceof CcShow) {
return $this
->addUsingAlias(CcPlaylistPeer::ID, $ccShow->getDbIntroPlaylistId(), $comparison);
} elseif ($ccShow instanceof PropelObjectCollection) {
return $this
->useCcShowRelatedByDbIntroPlaylistIdQuery()
->filterByPrimaryKeys($ccShow->getPrimaryKeys())
->endUse();
} else {
throw new PropelException('filterByCcShowRelatedByDbIntroPlaylistId() only accepts arguments of type CcShow or PropelCollection');
}
}
/**
* Adds a JOIN clause to the query using the CcShowRelatedByDbIntroPlaylistId relation
*
* @param string $relationAlias optional alias for the relation
* @param string $joinType Accepted values are null, 'left join', 'right join', 'inner join'
*
* @return CcPlaylistQuery The current query, for fluid interface
*/
public function joinCcShowRelatedByDbIntroPlaylistId($relationAlias = null, $joinType = Criteria::LEFT_JOIN)
{
$tableMap = $this->getTableMap();
$relationMap = $tableMap->getRelation('CcShowRelatedByDbIntroPlaylistId');
// create a ModelJoin object for this join
$join = new ModelJoin();
$join->setJoinType($joinType);
$join->setRelationMap($relationMap, $this->useAliasInSQL ? $this->getModelAlias() : null, $relationAlias);
if ($previousJoin = $this->getPreviousJoin()) {
$join->setPreviousJoin($previousJoin);
}
// add the ModelJoin to the current object
if ($relationAlias) {
$this->addAlias($relationAlias, $relationMap->getRightTable()->getName());
$this->addJoinObject($join, $relationAlias);
} else {
$this->addJoinObject($join, 'CcShowRelatedByDbIntroPlaylistId');
}
return $this;
}
/**
* Use the CcShowRelatedByDbIntroPlaylistId relation CcShow object
*
* @see useQuery()
*
* @param string $relationAlias optional alias for the relation,
* to be used as main alias in the secondary query
* @param string $joinType Accepted values are null, 'left join', 'right join', 'inner join'
*
* @return CcShowQuery A secondary query class using the current class as primary query
*/
public function useCcShowRelatedByDbIntroPlaylistIdQuery($relationAlias = null, $joinType = Criteria::LEFT_JOIN)
{
return $this
->joinCcShowRelatedByDbIntroPlaylistId($relationAlias, $joinType)
->useQuery($relationAlias ? $relationAlias : 'CcShowRelatedByDbIntroPlaylistId', 'CcShowQuery');
}
/**
* Filter the query by a related CcShow object
*
* @param CcShow|PropelObjectCollection $ccShow the related object to use as filter
* @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL
*
* @return CcPlaylistQuery The current query, for fluid interface
* @throws PropelException - if the provided filter is invalid.
*/
public function filterByCcShowRelatedByDbOutroPlaylistId($ccShow, $comparison = null)
{
if ($ccShow instanceof CcShow) {
return $this
->addUsingAlias(CcPlaylistPeer::ID, $ccShow->getDbOutroPlaylistId(), $comparison);
} elseif ($ccShow instanceof PropelObjectCollection) {
return $this
->useCcShowRelatedByDbOutroPlaylistIdQuery()
->filterByPrimaryKeys($ccShow->getPrimaryKeys())
->endUse();
} else {
throw new PropelException('filterByCcShowRelatedByDbOutroPlaylistId() only accepts arguments of type CcShow or PropelCollection');
}
}
/**
* Adds a JOIN clause to the query using the CcShowRelatedByDbOutroPlaylistId relation
*
* @param string $relationAlias optional alias for the relation
* @param string $joinType Accepted values are null, 'left join', 'right join', 'inner join'
*
* @return CcPlaylistQuery The current query, for fluid interface
*/
public function joinCcShowRelatedByDbOutroPlaylistId($relationAlias = null, $joinType = Criteria::LEFT_JOIN)
{
$tableMap = $this->getTableMap();
$relationMap = $tableMap->getRelation('CcShowRelatedByDbOutroPlaylistId');
// create a ModelJoin object for this join
$join = new ModelJoin();
$join->setJoinType($joinType);
$join->setRelationMap($relationMap, $this->useAliasInSQL ? $this->getModelAlias() : null, $relationAlias);
if ($previousJoin = $this->getPreviousJoin()) {
$join->setPreviousJoin($previousJoin);
}
// add the ModelJoin to the current object
if ($relationAlias) {
$this->addAlias($relationAlias, $relationMap->getRightTable()->getName());
$this->addJoinObject($join, $relationAlias);
} else {
$this->addJoinObject($join, 'CcShowRelatedByDbOutroPlaylistId');
}
return $this;
}
/**
* Use the CcShowRelatedByDbOutroPlaylistId relation CcShow object
*
* @see useQuery()
*
* @param string $relationAlias optional alias for the relation,
* to be used as main alias in the secondary query
* @param string $joinType Accepted values are null, 'left join', 'right join', 'inner join'
*
* @return CcShowQuery A secondary query class using the current class as primary query
*/
public function useCcShowRelatedByDbOutroPlaylistIdQuery($relationAlias = null, $joinType = Criteria::LEFT_JOIN)
{
return $this
->joinCcShowRelatedByDbOutroPlaylistId($relationAlias, $joinType)
->useQuery($relationAlias ? $relationAlias : 'CcShowRelatedByDbOutroPlaylistId', 'CcShowQuery');
->joinCcShow($relationAlias, $joinType)
->useQuery($relationAlias ? $relationAlias : 'CcShow', 'CcShowQuery');
}
/**

View File

@ -141,46 +141,10 @@ abstract class BaseCcShow extends BaseObject implements Persistent
*/
protected $autoplaylist_repeat;
/**
* The value for the override_intro_playlist field.
* Note: this column has a database default value of: false
* @var boolean
*/
protected $override_intro_playlist;
/**
* The value for the intro_playlist_id field.
* @var int
*/
protected $intro_playlist_id;
/**
* The value for the override_outro_playlist field.
* Note: this column has a database default value of: false
* @var boolean
*/
protected $override_outro_playlist;
/**
* The value for the outro_playlist_id field.
* @var int
*/
protected $outro_playlist_id;
/**
* @var CcPlaylist
*/
protected $aCcPlaylistRelatedByDbAutoPlaylistId;
/**
* @var CcPlaylist
*/
protected $aCcPlaylistRelatedByDbIntroPlaylistId;
/**
* @var CcPlaylist
*/
protected $aCcPlaylistRelatedByDbOutroPlaylistId;
protected $aCcPlaylist;
/**
* @var PropelObjectCollection|CcShowInstances[] Collection to store aggregation of CcShowInstances objects.
@ -268,8 +232,6 @@ abstract class BaseCcShow extends BaseObject implements Persistent
$this->image_path = '';
$this->has_autoplaylist = false;
$this->autoplaylist_repeat = false;
$this->override_intro_playlist = false;
$this->override_outro_playlist = false;
}
/**
@ -469,50 +431,6 @@ abstract class BaseCcShow extends BaseObject implements Persistent
return $this->autoplaylist_repeat;
}
/**
* Get the [override_intro_playlist] column value.
*
* @return boolean
*/
public function getDbOverrideIntroPlaylist()
{
return $this->override_intro_playlist;
}
/**
* Get the [intro_playlist_id] column value.
*
* @return int
*/
public function getDbIntroPlaylistId()
{
return $this->intro_playlist_id;
}
/**
* Get the [override_outro_playlist] column value.
*
* @return boolean
*/
public function getDbOverrideOutroPlaylist()
{
return $this->override_outro_playlist;
}
/**
* Get the [outro_playlist_id] column value.
*
* @return int
*/
public function getDbOutroPlaylistId()
{
return $this->outro_playlist_id;
}
/**
* Set the value of [id] column.
*
@ -885,8 +803,8 @@ abstract class BaseCcShow extends BaseObject implements Persistent
$this->modifiedColumns[] = CcShowPeer::AUTOPLAYLIST_ID;
}
if ($this->aCcPlaylistRelatedByDbAutoPlaylistId !== null && $this->aCcPlaylistRelatedByDbAutoPlaylistId->getDbId() !== $v) {
$this->aCcPlaylistRelatedByDbAutoPlaylistId = null;
if ($this->aCcPlaylist !== null && $this->aCcPlaylist->getDbId() !== $v) {
$this->aCcPlaylist = null;
}
@ -922,114 +840,6 @@ abstract class BaseCcShow extends BaseObject implements Persistent
return $this;
} // setDbAutoPlaylistRepeat()
/**
* Sets the value of the [override_intro_playlist] column.
* Non-boolean arguments are converted using the following rules:
* * 1, '1', 'true', 'on', and 'yes' are converted to boolean true
* * 0, '0', 'false', 'off', and 'no' are converted to boolean false
* Check on string values is case insensitive (so 'FaLsE' is seen as 'false').
*
* @param boolean|integer|string $v The new value
* @return CcShow The current object (for fluent API support)
*/
public function setDbOverrideIntroPlaylist($v)
{
if ($v !== null) {
if (is_string($v)) {
$v = in_array(strtolower($v), array('false', 'off', '-', 'no', 'n', '0', '')) ? false : true;
} else {
$v = (boolean) $v;
}
}
if ($this->override_intro_playlist !== $v) {
$this->override_intro_playlist = $v;
$this->modifiedColumns[] = CcShowPeer::OVERRIDE_INTRO_PLAYLIST;
}
return $this;
} // setDbOverrideIntroPlaylist()
/**
* Set the value of [intro_playlist_id] column.
*
* @param int $v new value
* @return CcShow The current object (for fluent API support)
*/
public function setDbIntroPlaylistId($v)
{
if ($v !== null && is_numeric($v)) {
$v = (int) $v;
}
if ($this->intro_playlist_id !== $v) {
$this->intro_playlist_id = $v;
$this->modifiedColumns[] = CcShowPeer::INTRO_PLAYLIST_ID;
}
if ($this->aCcPlaylistRelatedByDbIntroPlaylistId !== null && $this->aCcPlaylistRelatedByDbIntroPlaylistId->getDbId() !== $v) {
$this->aCcPlaylistRelatedByDbIntroPlaylistId = null;
}
return $this;
} // setDbIntroPlaylistId()
/**
* Sets the value of the [override_outro_playlist] column.
* Non-boolean arguments are converted using the following rules:
* * 1, '1', 'true', 'on', and 'yes' are converted to boolean true
* * 0, '0', 'false', 'off', and 'no' are converted to boolean false
* Check on string values is case insensitive (so 'FaLsE' is seen as 'false').
*
* @param boolean|integer|string $v The new value
* @return CcShow The current object (for fluent API support)
*/
public function setDbOverrideOutroPlaylist($v)
{
if ($v !== null) {
if (is_string($v)) {
$v = in_array(strtolower($v), array('false', 'off', '-', 'no', 'n', '0', '')) ? false : true;
} else {
$v = (boolean) $v;
}
}
if ($this->override_outro_playlist !== $v) {
$this->override_outro_playlist = $v;
$this->modifiedColumns[] = CcShowPeer::OVERRIDE_OUTRO_PLAYLIST;
}
return $this;
} // setDbOverrideOutroPlaylist()
/**
* Set the value of [outro_playlist_id] column.
*
* @param int $v new value
* @return CcShow The current object (for fluent API support)
*/
public function setDbOutroPlaylistId($v)
{
if ($v !== null && is_numeric($v)) {
$v = (int) $v;
}
if ($this->outro_playlist_id !== $v) {
$this->outro_playlist_id = $v;
$this->modifiedColumns[] = CcShowPeer::OUTRO_PLAYLIST_ID;
}
if ($this->aCcPlaylistRelatedByDbOutroPlaylistId !== null && $this->aCcPlaylistRelatedByDbOutroPlaylistId->getDbId() !== $v) {
$this->aCcPlaylistRelatedByDbOutroPlaylistId = null;
}
return $this;
} // setDbOutroPlaylistId()
/**
* Indicates whether the columns in this object are only set to default values.
*
@ -1080,14 +890,6 @@ abstract class BaseCcShow extends BaseObject implements Persistent
return false;
}
if ($this->override_intro_playlist !== false) {
return false;
}
if ($this->override_outro_playlist !== false) {
return false;
}
// otherwise, everything was equal, so return true
return true;
} // hasOnlyDefaultValues()
@ -1127,10 +929,6 @@ abstract class BaseCcShow extends BaseObject implements Persistent
$this->has_autoplaylist = ($row[$startcol + 14] !== null) ? (boolean) $row[$startcol + 14] : null;
$this->autoplaylist_id = ($row[$startcol + 15] !== null) ? (int) $row[$startcol + 15] : null;
$this->autoplaylist_repeat = ($row[$startcol + 16] !== null) ? (boolean) $row[$startcol + 16] : null;
$this->override_intro_playlist = ($row[$startcol + 17] !== null) ? (boolean) $row[$startcol + 17] : null;
$this->intro_playlist_id = ($row[$startcol + 18] !== null) ? (int) $row[$startcol + 18] : null;
$this->override_outro_playlist = ($row[$startcol + 19] !== null) ? (boolean) $row[$startcol + 19] : null;
$this->outro_playlist_id = ($row[$startcol + 20] !== null) ? (int) $row[$startcol + 20] : null;
$this->resetModified();
$this->setNew(false);
@ -1140,7 +938,7 @@ abstract class BaseCcShow extends BaseObject implements Persistent
}
$this->postHydrate($row, $startcol, $rehydrate);
return $startcol + 21; // 21 = CcShowPeer::NUM_HYDRATE_COLUMNS.
return $startcol + 17; // 17 = CcShowPeer::NUM_HYDRATE_COLUMNS.
} catch (Exception $e) {
throw new PropelException("Error populating CcShow object", $e);
@ -1163,14 +961,8 @@ abstract class BaseCcShow extends BaseObject implements Persistent
public function ensureConsistency()
{
if ($this->aCcPlaylistRelatedByDbAutoPlaylistId !== null && $this->autoplaylist_id !== $this->aCcPlaylistRelatedByDbAutoPlaylistId->getDbId()) {
$this->aCcPlaylistRelatedByDbAutoPlaylistId = null;
}
if ($this->aCcPlaylistRelatedByDbIntroPlaylistId !== null && $this->intro_playlist_id !== $this->aCcPlaylistRelatedByDbIntroPlaylistId->getDbId()) {
$this->aCcPlaylistRelatedByDbIntroPlaylistId = null;
}
if ($this->aCcPlaylistRelatedByDbOutroPlaylistId !== null && $this->outro_playlist_id !== $this->aCcPlaylistRelatedByDbOutroPlaylistId->getDbId()) {
$this->aCcPlaylistRelatedByDbOutroPlaylistId = null;
if ($this->aCcPlaylist !== null && $this->autoplaylist_id !== $this->aCcPlaylist->getDbId()) {
$this->aCcPlaylist = null;
}
} // ensureConsistency
@ -1211,9 +1003,7 @@ abstract class BaseCcShow extends BaseObject implements Persistent
if ($deep) { // also de-associate any related objects?
$this->aCcPlaylistRelatedByDbAutoPlaylistId = null;
$this->aCcPlaylistRelatedByDbIntroPlaylistId = null;
$this->aCcPlaylistRelatedByDbOutroPlaylistId = null;
$this->aCcPlaylist = null;
$this->collCcShowInstancess = null;
$this->collCcShowDayss = null;
@ -1340,25 +1130,11 @@ abstract class BaseCcShow extends BaseObject implements Persistent
// method. This object relates to these object(s) by a
// foreign key reference.
if ($this->aCcPlaylistRelatedByDbAutoPlaylistId !== null) {
if ($this->aCcPlaylistRelatedByDbAutoPlaylistId->isModified() || $this->aCcPlaylistRelatedByDbAutoPlaylistId->isNew()) {
$affectedRows += $this->aCcPlaylistRelatedByDbAutoPlaylistId->save($con);
if ($this->aCcPlaylist !== null) {
if ($this->aCcPlaylist->isModified() || $this->aCcPlaylist->isNew()) {
$affectedRows += $this->aCcPlaylist->save($con);
}
$this->setCcPlaylistRelatedByDbAutoPlaylistId($this->aCcPlaylistRelatedByDbAutoPlaylistId);
}
if ($this->aCcPlaylistRelatedByDbIntroPlaylistId !== null) {
if ($this->aCcPlaylistRelatedByDbIntroPlaylistId->isModified() || $this->aCcPlaylistRelatedByDbIntroPlaylistId->isNew()) {
$affectedRows += $this->aCcPlaylistRelatedByDbIntroPlaylistId->save($con);
}
$this->setCcPlaylistRelatedByDbIntroPlaylistId($this->aCcPlaylistRelatedByDbIntroPlaylistId);
}
if ($this->aCcPlaylistRelatedByDbOutroPlaylistId !== null) {
if ($this->aCcPlaylistRelatedByDbOutroPlaylistId->isModified() || $this->aCcPlaylistRelatedByDbOutroPlaylistId->isNew()) {
$affectedRows += $this->aCcPlaylistRelatedByDbOutroPlaylistId->save($con);
}
$this->setCcPlaylistRelatedByDbOutroPlaylistId($this->aCcPlaylistRelatedByDbOutroPlaylistId);
$this->setCcPlaylist($this->aCcPlaylist);
}
if ($this->isNew() || $this->isModified()) {
@ -1527,18 +1303,6 @@ abstract class BaseCcShow extends BaseObject implements Persistent
if ($this->isColumnModified(CcShowPeer::AUTOPLAYLIST_REPEAT)) {
$modifiedColumns[':p' . $index++] = '"autoplaylist_repeat"';
}
if ($this->isColumnModified(CcShowPeer::OVERRIDE_INTRO_PLAYLIST)) {
$modifiedColumns[':p' . $index++] = '"override_intro_playlist"';
}
if ($this->isColumnModified(CcShowPeer::INTRO_PLAYLIST_ID)) {
$modifiedColumns[':p' . $index++] = '"intro_playlist_id"';
}
if ($this->isColumnModified(CcShowPeer::OVERRIDE_OUTRO_PLAYLIST)) {
$modifiedColumns[':p' . $index++] = '"override_outro_playlist"';
}
if ($this->isColumnModified(CcShowPeer::OUTRO_PLAYLIST_ID)) {
$modifiedColumns[':p' . $index++] = '"outro_playlist_id"';
}
$sql = sprintf(
'INSERT INTO "cc_show" (%s) VALUES (%s)',
@ -1601,18 +1365,6 @@ abstract class BaseCcShow extends BaseObject implements Persistent
case '"autoplaylist_repeat"':
$stmt->bindValue($identifier, $this->autoplaylist_repeat, PDO::PARAM_BOOL);
break;
case '"override_intro_playlist"':
$stmt->bindValue($identifier, $this->override_intro_playlist, PDO::PARAM_BOOL);
break;
case '"intro_playlist_id"':
$stmt->bindValue($identifier, $this->intro_playlist_id, PDO::PARAM_INT);
break;
case '"override_outro_playlist"':
$stmt->bindValue($identifier, $this->override_outro_playlist, PDO::PARAM_BOOL);
break;
case '"outro_playlist_id"':
$stmt->bindValue($identifier, $this->outro_playlist_id, PDO::PARAM_INT);
break;
}
}
$stmt->execute();
@ -1705,21 +1457,9 @@ abstract class BaseCcShow extends BaseObject implements Persistent
// method. This object relates to these object(s) by a
// foreign key reference.
if ($this->aCcPlaylistRelatedByDbAutoPlaylistId !== null) {
if (!$this->aCcPlaylistRelatedByDbAutoPlaylistId->validate($columns)) {
$failureMap = array_merge($failureMap, $this->aCcPlaylistRelatedByDbAutoPlaylistId->getValidationFailures());
}
}
if ($this->aCcPlaylistRelatedByDbIntroPlaylistId !== null) {
if (!$this->aCcPlaylistRelatedByDbIntroPlaylistId->validate($columns)) {
$failureMap = array_merge($failureMap, $this->aCcPlaylistRelatedByDbIntroPlaylistId->getValidationFailures());
}
}
if ($this->aCcPlaylistRelatedByDbOutroPlaylistId !== null) {
if (!$this->aCcPlaylistRelatedByDbOutroPlaylistId->validate($columns)) {
$failureMap = array_merge($failureMap, $this->aCcPlaylistRelatedByDbOutroPlaylistId->getValidationFailures());
if ($this->aCcPlaylist !== null) {
if (!$this->aCcPlaylist->validate($columns)) {
$failureMap = array_merge($failureMap, $this->aCcPlaylist->getValidationFailures());
}
}
@ -1847,18 +1587,6 @@ abstract class BaseCcShow extends BaseObject implements Persistent
case 16:
return $this->getDbAutoPlaylistRepeat();
break;
case 17:
return $this->getDbOverrideIntroPlaylist();
break;
case 18:
return $this->getDbIntroPlaylistId();
break;
case 19:
return $this->getDbOverrideOutroPlaylist();
break;
case 20:
return $this->getDbOutroPlaylistId();
break;
default:
return null;
break;
@ -1905,10 +1633,6 @@ abstract class BaseCcShow extends BaseObject implements Persistent
$keys[14] => $this->getDbHasAutoPlaylist(),
$keys[15] => $this->getDbAutoPlaylistId(),
$keys[16] => $this->getDbAutoPlaylistRepeat(),
$keys[17] => $this->getDbOverrideIntroPlaylist(),
$keys[18] => $this->getDbIntroPlaylistId(),
$keys[19] => $this->getDbOverrideOutroPlaylist(),
$keys[20] => $this->getDbOutroPlaylistId(),
);
$virtualColumns = $this->virtualColumns;
foreach ($virtualColumns as $key => $virtualColumn) {
@ -1916,14 +1640,8 @@ abstract class BaseCcShow extends BaseObject implements Persistent
}
if ($includeForeignObjects) {
if (null !== $this->aCcPlaylistRelatedByDbAutoPlaylistId) {
$result['CcPlaylistRelatedByDbAutoPlaylistId'] = $this->aCcPlaylistRelatedByDbAutoPlaylistId->toArray($keyType, $includeLazyLoadColumns, $alreadyDumpedObjects, true);
}
if (null !== $this->aCcPlaylistRelatedByDbIntroPlaylistId) {
$result['CcPlaylistRelatedByDbIntroPlaylistId'] = $this->aCcPlaylistRelatedByDbIntroPlaylistId->toArray($keyType, $includeLazyLoadColumns, $alreadyDumpedObjects, true);
}
if (null !== $this->aCcPlaylistRelatedByDbOutroPlaylistId) {
$result['CcPlaylistRelatedByDbOutroPlaylistId'] = $this->aCcPlaylistRelatedByDbOutroPlaylistId->toArray($keyType, $includeLazyLoadColumns, $alreadyDumpedObjects, true);
if (null !== $this->aCcPlaylist) {
$result['CcPlaylist'] = $this->aCcPlaylist->toArray($keyType, $includeLazyLoadColumns, $alreadyDumpedObjects, true);
}
if (null !== $this->collCcShowInstancess) {
$result['CcShowInstancess'] = $this->collCcShowInstancess->toArray(null, true, $keyType, $includeLazyLoadColumns, $alreadyDumpedObjects);
@ -2022,18 +1740,6 @@ abstract class BaseCcShow extends BaseObject implements Persistent
case 16:
$this->setDbAutoPlaylistRepeat($value);
break;
case 17:
$this->setDbOverrideIntroPlaylist($value);
break;
case 18:
$this->setDbIntroPlaylistId($value);
break;
case 19:
$this->setDbOverrideOutroPlaylist($value);
break;
case 20:
$this->setDbOutroPlaylistId($value);
break;
} // switch()
}
@ -2075,10 +1781,6 @@ abstract class BaseCcShow extends BaseObject implements Persistent
if (array_key_exists($keys[14], $arr)) $this->setDbHasAutoPlaylist($arr[$keys[14]]);
if (array_key_exists($keys[15], $arr)) $this->setDbAutoPlaylistId($arr[$keys[15]]);
if (array_key_exists($keys[16], $arr)) $this->setDbAutoPlaylistRepeat($arr[$keys[16]]);
if (array_key_exists($keys[17], $arr)) $this->setDbOverrideIntroPlaylist($arr[$keys[17]]);
if (array_key_exists($keys[18], $arr)) $this->setDbIntroPlaylistId($arr[$keys[18]]);
if (array_key_exists($keys[19], $arr)) $this->setDbOverrideOutroPlaylist($arr[$keys[19]]);
if (array_key_exists($keys[20], $arr)) $this->setDbOutroPlaylistId($arr[$keys[20]]);
}
/**
@ -2107,10 +1809,6 @@ abstract class BaseCcShow extends BaseObject implements Persistent
if ($this->isColumnModified(CcShowPeer::HAS_AUTOPLAYLIST)) $criteria->add(CcShowPeer::HAS_AUTOPLAYLIST, $this->has_autoplaylist);
if ($this->isColumnModified(CcShowPeer::AUTOPLAYLIST_ID)) $criteria->add(CcShowPeer::AUTOPLAYLIST_ID, $this->autoplaylist_id);
if ($this->isColumnModified(CcShowPeer::AUTOPLAYLIST_REPEAT)) $criteria->add(CcShowPeer::AUTOPLAYLIST_REPEAT, $this->autoplaylist_repeat);
if ($this->isColumnModified(CcShowPeer::OVERRIDE_INTRO_PLAYLIST)) $criteria->add(CcShowPeer::OVERRIDE_INTRO_PLAYLIST, $this->override_intro_playlist);
if ($this->isColumnModified(CcShowPeer::INTRO_PLAYLIST_ID)) $criteria->add(CcShowPeer::INTRO_PLAYLIST_ID, $this->intro_playlist_id);
if ($this->isColumnModified(CcShowPeer::OVERRIDE_OUTRO_PLAYLIST)) $criteria->add(CcShowPeer::OVERRIDE_OUTRO_PLAYLIST, $this->override_outro_playlist);
if ($this->isColumnModified(CcShowPeer::OUTRO_PLAYLIST_ID)) $criteria->add(CcShowPeer::OUTRO_PLAYLIST_ID, $this->outro_playlist_id);
return $criteria;
}
@ -2190,10 +1888,6 @@ abstract class BaseCcShow extends BaseObject implements Persistent
$copyObj->setDbHasAutoPlaylist($this->getDbHasAutoPlaylist());
$copyObj->setDbAutoPlaylistId($this->getDbAutoPlaylistId());
$copyObj->setDbAutoPlaylistRepeat($this->getDbAutoPlaylistRepeat());
$copyObj->setDbOverrideIntroPlaylist($this->getDbOverrideIntroPlaylist());
$copyObj->setDbIntroPlaylistId($this->getDbIntroPlaylistId());
$copyObj->setDbOverrideOutroPlaylist($this->getDbOverrideOutroPlaylist());
$copyObj->setDbOutroPlaylistId($this->getDbOutroPlaylistId());
if ($deepCopy && !$this->startCopy) {
// important: temporarily setNew(false) because this affects the behavior of
@ -2283,7 +1977,7 @@ abstract class BaseCcShow extends BaseObject implements Persistent
* @return CcShow The current object (for fluent API support)
* @throws PropelException
*/
public function setCcPlaylistRelatedByDbAutoPlaylistId(CcPlaylist $v = null)
public function setCcPlaylist(CcPlaylist $v = null)
{
if ($v === null) {
$this->setDbAutoPlaylistId(NULL);
@ -2291,12 +1985,12 @@ abstract class BaseCcShow extends BaseObject implements Persistent
$this->setDbAutoPlaylistId($v->getDbId());
}
$this->aCcPlaylistRelatedByDbAutoPlaylistId = $v;
$this->aCcPlaylist = $v;
// Add binding for other direction of this n:n relationship.
// If this object has already been added to the CcPlaylist object, it will not be re-added.
if ($v !== null) {
$v->addCcShowRelatedByDbAutoPlaylistId($this);
$v->addCcShow($this);
}
@ -2312,124 +2006,20 @@ abstract class BaseCcShow extends BaseObject implements Persistent
* @return CcPlaylist The associated CcPlaylist object.
* @throws PropelException
*/
public function getCcPlaylistRelatedByDbAutoPlaylistId(PropelPDO $con = null, $doQuery = true)
public function getCcPlaylist(PropelPDO $con = null, $doQuery = true)
{
if ($this->aCcPlaylistRelatedByDbAutoPlaylistId === null && ($this->autoplaylist_id !== null) && $doQuery) {
$this->aCcPlaylistRelatedByDbAutoPlaylistId = CcPlaylistQuery::create()->findPk($this->autoplaylist_id, $con);
if ($this->aCcPlaylist === null && ($this->autoplaylist_id !== null) && $doQuery) {
$this->aCcPlaylist = CcPlaylistQuery::create()->findPk($this->autoplaylist_id, $con);
/* The following can be used additionally to
guarantee the related object contains a reference
to this object. This level of coupling may, however, be
undesirable since it could result in an only partially populated collection
in the referenced object.
$this->aCcPlaylistRelatedByDbAutoPlaylistId->addCcShowsRelatedByDbAutoPlaylistId($this);
$this->aCcPlaylist->addCcShows($this);
*/
}
return $this->aCcPlaylistRelatedByDbAutoPlaylistId;
}
/**
* Declares an association between this object and a CcPlaylist object.
*
* @param CcPlaylist $v
* @return CcShow The current object (for fluent API support)
* @throws PropelException
*/
public function setCcPlaylistRelatedByDbIntroPlaylistId(CcPlaylist $v = null)
{
if ($v === null) {
$this->setDbIntroPlaylistId(NULL);
} else {
$this->setDbIntroPlaylistId($v->getDbId());
}
$this->aCcPlaylistRelatedByDbIntroPlaylistId = $v;
// Add binding for other direction of this n:n relationship.
// If this object has already been added to the CcPlaylist object, it will not be re-added.
if ($v !== null) {
$v->addCcShowRelatedByDbIntroPlaylistId($this);
}
return $this;
}
/**
* Get the associated CcPlaylist object
*
* @param PropelPDO $con Optional Connection object.
* @param $doQuery Executes a query to get the object if required
* @return CcPlaylist The associated CcPlaylist object.
* @throws PropelException
*/
public function getCcPlaylistRelatedByDbIntroPlaylistId(PropelPDO $con = null, $doQuery = true)
{
if ($this->aCcPlaylistRelatedByDbIntroPlaylistId === null && ($this->intro_playlist_id !== null) && $doQuery) {
$this->aCcPlaylistRelatedByDbIntroPlaylistId = CcPlaylistQuery::create()->findPk($this->intro_playlist_id, $con);
/* The following can be used additionally to
guarantee the related object contains a reference
to this object. This level of coupling may, however, be
undesirable since it could result in an only partially populated collection
in the referenced object.
$this->aCcPlaylistRelatedByDbIntroPlaylistId->addCcShowsRelatedByDbIntroPlaylistId($this);
*/
}
return $this->aCcPlaylistRelatedByDbIntroPlaylistId;
}
/**
* Declares an association between this object and a CcPlaylist object.
*
* @param CcPlaylist $v
* @return CcShow The current object (for fluent API support)
* @throws PropelException
*/
public function setCcPlaylistRelatedByDbOutroPlaylistId(CcPlaylist $v = null)
{
if ($v === null) {
$this->setDbOutroPlaylistId(NULL);
} else {
$this->setDbOutroPlaylistId($v->getDbId());
}
$this->aCcPlaylistRelatedByDbOutroPlaylistId = $v;
// Add binding for other direction of this n:n relationship.
// If this object has already been added to the CcPlaylist object, it will not be re-added.
if ($v !== null) {
$v->addCcShowRelatedByDbOutroPlaylistId($this);
}
return $this;
}
/**
* Get the associated CcPlaylist object
*
* @param PropelPDO $con Optional Connection object.
* @param $doQuery Executes a query to get the object if required
* @return CcPlaylist The associated CcPlaylist object.
* @throws PropelException
*/
public function getCcPlaylistRelatedByDbOutroPlaylistId(PropelPDO $con = null, $doQuery = true)
{
if ($this->aCcPlaylistRelatedByDbOutroPlaylistId === null && ($this->outro_playlist_id !== null) && $doQuery) {
$this->aCcPlaylistRelatedByDbOutroPlaylistId = CcPlaylistQuery::create()->findPk($this->outro_playlist_id, $con);
/* The following can be used additionally to
guarantee the related object contains a reference
to this object. This level of coupling may, however, be
undesirable since it could result in an only partially populated collection
in the referenced object.
$this->aCcPlaylistRelatedByDbOutroPlaylistId->addCcShowsRelatedByDbOutroPlaylistId($this);
*/
}
return $this->aCcPlaylistRelatedByDbOutroPlaylistId;
return $this->aCcPlaylist;
}
@ -3454,10 +3044,6 @@ abstract class BaseCcShow extends BaseObject implements Persistent
$this->has_autoplaylist = null;
$this->autoplaylist_id = null;
$this->autoplaylist_repeat = null;
$this->override_intro_playlist = null;
$this->intro_playlist_id = null;
$this->override_outro_playlist = null;
$this->outro_playlist_id = null;
$this->alreadyInSave = false;
$this->alreadyInValidation = false;
$this->alreadyInClearAllReferencesDeep = false;
@ -3501,14 +3087,8 @@ abstract class BaseCcShow extends BaseObject implements Persistent
$o->clearAllReferences($deep);
}
}
if ($this->aCcPlaylistRelatedByDbAutoPlaylistId instanceof Persistent) {
$this->aCcPlaylistRelatedByDbAutoPlaylistId->clearAllReferences($deep);
}
if ($this->aCcPlaylistRelatedByDbIntroPlaylistId instanceof Persistent) {
$this->aCcPlaylistRelatedByDbIntroPlaylistId->clearAllReferences($deep);
}
if ($this->aCcPlaylistRelatedByDbOutroPlaylistId instanceof Persistent) {
$this->aCcPlaylistRelatedByDbOutroPlaylistId->clearAllReferences($deep);
if ($this->aCcPlaylist instanceof Persistent) {
$this->aCcPlaylist->clearAllReferences($deep);
}
$this->alreadyInClearAllReferencesDeep = false;
@ -3530,9 +3110,7 @@ abstract class BaseCcShow extends BaseObject implements Persistent
$this->collCcShowHostss->clearIterator();
}
$this->collCcShowHostss = null;
$this->aCcPlaylistRelatedByDbAutoPlaylistId = null;
$this->aCcPlaylistRelatedByDbIntroPlaylistId = null;
$this->aCcPlaylistRelatedByDbOutroPlaylistId = null;
$this->aCcPlaylist = null;
}
/**

View File

@ -24,13 +24,13 @@ abstract class BaseCcShowPeer
const TM_CLASS = 'CcShowTableMap';
/** The total number of columns. */
const NUM_COLUMNS = 21;
const NUM_COLUMNS = 17;
/** The number of lazy-loaded columns. */
const NUM_LAZY_LOAD_COLUMNS = 0;
/** The number of columns to hydrate (NUM_COLUMNS - NUM_LAZY_LOAD_COLUMNS) */
const NUM_HYDRATE_COLUMNS = 21;
const NUM_HYDRATE_COLUMNS = 17;
/** the column name for the id field */
const ID = 'cc_show.id';
@ -83,18 +83,6 @@ abstract class BaseCcShowPeer
/** the column name for the autoplaylist_repeat field */
const AUTOPLAYLIST_REPEAT = 'cc_show.autoplaylist_repeat';
/** the column name for the override_intro_playlist field */
const OVERRIDE_INTRO_PLAYLIST = 'cc_show.override_intro_playlist';
/** the column name for the intro_playlist_id field */
const INTRO_PLAYLIST_ID = 'cc_show.intro_playlist_id';
/** the column name for the override_outro_playlist field */
const OVERRIDE_OUTRO_PLAYLIST = 'cc_show.override_outro_playlist';
/** the column name for the outro_playlist_id field */
const OUTRO_PLAYLIST_ID = 'cc_show.outro_playlist_id';
/** The default string format for model objects of the related table **/
const DEFAULT_STRING_FORMAT = 'YAML';
@ -114,12 +102,12 @@ abstract class BaseCcShowPeer
* e.g. CcShowPeer::$fieldNames[CcShowPeer::TYPE_PHPNAME][0] = 'Id'
*/
protected static $fieldNames = array (
BasePeer::TYPE_PHPNAME => array ('DbId', 'DbName', 'DbUrl', 'DbGenre', 'DbDescription', 'DbColor', 'DbBackgroundColor', 'DbLiveStreamUsingAirtimeAuth', 'DbLiveStreamUsingCustomAuth', 'DbLiveStreamUser', 'DbLiveStreamPass', 'DbLinked', 'DbIsLinkable', 'DbImagePath', 'DbHasAutoPlaylist', 'DbAutoPlaylistId', 'DbAutoPlaylistRepeat', 'DbOverrideIntroPlaylist', 'DbIntroPlaylistId', 'DbOverrideOutroPlaylist', 'DbOutroPlaylistId', ),
BasePeer::TYPE_STUDLYPHPNAME => array ('dbId', 'dbName', 'dbUrl', 'dbGenre', 'dbDescription', 'dbColor', 'dbBackgroundColor', 'dbLiveStreamUsingAirtimeAuth', 'dbLiveStreamUsingCustomAuth', 'dbLiveStreamUser', 'dbLiveStreamPass', 'dbLinked', 'dbIsLinkable', 'dbImagePath', 'dbHasAutoPlaylist', 'dbAutoPlaylistId', 'dbAutoPlaylistRepeat', 'dbOverrideIntroPlaylist', 'dbIntroPlaylistId', 'dbOverrideOutroPlaylist', 'dbOutroPlaylistId', ),
BasePeer::TYPE_COLNAME => array (CcShowPeer::ID, CcShowPeer::NAME, CcShowPeer::URL, CcShowPeer::GENRE, CcShowPeer::DESCRIPTION, CcShowPeer::COLOR, CcShowPeer::BACKGROUND_COLOR, CcShowPeer::LIVE_STREAM_USING_AIRTIME_AUTH, CcShowPeer::LIVE_STREAM_USING_CUSTOM_AUTH, CcShowPeer::LIVE_STREAM_USER, CcShowPeer::LIVE_STREAM_PASS, CcShowPeer::LINKED, CcShowPeer::IS_LINKABLE, CcShowPeer::IMAGE_PATH, CcShowPeer::HAS_AUTOPLAYLIST, CcShowPeer::AUTOPLAYLIST_ID, CcShowPeer::AUTOPLAYLIST_REPEAT, CcShowPeer::OVERRIDE_INTRO_PLAYLIST, CcShowPeer::INTRO_PLAYLIST_ID, CcShowPeer::OVERRIDE_OUTRO_PLAYLIST, CcShowPeer::OUTRO_PLAYLIST_ID, ),
BasePeer::TYPE_RAW_COLNAME => array ('ID', 'NAME', 'URL', 'GENRE', 'DESCRIPTION', 'COLOR', 'BACKGROUND_COLOR', 'LIVE_STREAM_USING_AIRTIME_AUTH', 'LIVE_STREAM_USING_CUSTOM_AUTH', 'LIVE_STREAM_USER', 'LIVE_STREAM_PASS', 'LINKED', 'IS_LINKABLE', 'IMAGE_PATH', 'HAS_AUTOPLAYLIST', 'AUTOPLAYLIST_ID', 'AUTOPLAYLIST_REPEAT', 'OVERRIDE_INTRO_PLAYLIST', 'INTRO_PLAYLIST_ID', 'OVERRIDE_OUTRO_PLAYLIST', 'OUTRO_PLAYLIST_ID', ),
BasePeer::TYPE_FIELDNAME => array ('id', 'name', 'url', 'genre', 'description', 'color', 'background_color', 'live_stream_using_airtime_auth', 'live_stream_using_custom_auth', 'live_stream_user', 'live_stream_pass', 'linked', 'is_linkable', 'image_path', 'has_autoplaylist', 'autoplaylist_id', 'autoplaylist_repeat', 'override_intro_playlist', 'intro_playlist_id', 'override_outro_playlist', 'outro_playlist_id', ),
BasePeer::TYPE_NUM => array (0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, )
BasePeer::TYPE_PHPNAME => array ('DbId', 'DbName', 'DbUrl', 'DbGenre', 'DbDescription', 'DbColor', 'DbBackgroundColor', 'DbLiveStreamUsingAirtimeAuth', 'DbLiveStreamUsingCustomAuth', 'DbLiveStreamUser', 'DbLiveStreamPass', 'DbLinked', 'DbIsLinkable', 'DbImagePath', 'DbHasAutoPlaylist', 'DbAutoPlaylistId', 'DbAutoPlaylistRepeat', ),
BasePeer::TYPE_STUDLYPHPNAME => array ('dbId', 'dbName', 'dbUrl', 'dbGenre', 'dbDescription', 'dbColor', 'dbBackgroundColor', 'dbLiveStreamUsingAirtimeAuth', 'dbLiveStreamUsingCustomAuth', 'dbLiveStreamUser', 'dbLiveStreamPass', 'dbLinked', 'dbIsLinkable', 'dbImagePath', 'dbHasAutoPlaylist', 'dbAutoPlaylistId', 'dbAutoPlaylistRepeat', ),
BasePeer::TYPE_COLNAME => array (CcShowPeer::ID, CcShowPeer::NAME, CcShowPeer::URL, CcShowPeer::GENRE, CcShowPeer::DESCRIPTION, CcShowPeer::COLOR, CcShowPeer::BACKGROUND_COLOR, CcShowPeer::LIVE_STREAM_USING_AIRTIME_AUTH, CcShowPeer::LIVE_STREAM_USING_CUSTOM_AUTH, CcShowPeer::LIVE_STREAM_USER, CcShowPeer::LIVE_STREAM_PASS, CcShowPeer::LINKED, CcShowPeer::IS_LINKABLE, CcShowPeer::IMAGE_PATH, CcShowPeer::HAS_AUTOPLAYLIST, CcShowPeer::AUTOPLAYLIST_ID, CcShowPeer::AUTOPLAYLIST_REPEAT, ),
BasePeer::TYPE_RAW_COLNAME => array ('ID', 'NAME', 'URL', 'GENRE', 'DESCRIPTION', 'COLOR', 'BACKGROUND_COLOR', 'LIVE_STREAM_USING_AIRTIME_AUTH', 'LIVE_STREAM_USING_CUSTOM_AUTH', 'LIVE_STREAM_USER', 'LIVE_STREAM_PASS', 'LINKED', 'IS_LINKABLE', 'IMAGE_PATH', 'HAS_AUTOPLAYLIST', 'AUTOPLAYLIST_ID', 'AUTOPLAYLIST_REPEAT', ),
BasePeer::TYPE_FIELDNAME => array ('id', 'name', 'url', 'genre', 'description', 'color', 'background_color', 'live_stream_using_airtime_auth', 'live_stream_using_custom_auth', 'live_stream_user', 'live_stream_pass', 'linked', 'is_linkable', 'image_path', 'has_autoplaylist', 'autoplaylist_id', 'autoplaylist_repeat', ),
BasePeer::TYPE_NUM => array (0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, )
);
/**
@ -129,12 +117,12 @@ abstract class BaseCcShowPeer
* e.g. CcShowPeer::$fieldNames[BasePeer::TYPE_PHPNAME]['Id'] = 0
*/
protected static $fieldKeys = array (
BasePeer::TYPE_PHPNAME => array ('DbId' => 0, 'DbName' => 1, 'DbUrl' => 2, 'DbGenre' => 3, 'DbDescription' => 4, 'DbColor' => 5, 'DbBackgroundColor' => 6, 'DbLiveStreamUsingAirtimeAuth' => 7, 'DbLiveStreamUsingCustomAuth' => 8, 'DbLiveStreamUser' => 9, 'DbLiveStreamPass' => 10, 'DbLinked' => 11, 'DbIsLinkable' => 12, 'DbImagePath' => 13, 'DbHasAutoPlaylist' => 14, 'DbAutoPlaylistId' => 15, 'DbAutoPlaylistRepeat' => 16, 'DbOverrideIntroPlaylist' => 17, 'DbIntroPlaylistId' => 18, 'DbOverrideOutroPlaylist' => 19, 'DbOutroPlaylistId' => 20, ),
BasePeer::TYPE_STUDLYPHPNAME => array ('dbId' => 0, 'dbName' => 1, 'dbUrl' => 2, 'dbGenre' => 3, 'dbDescription' => 4, 'dbColor' => 5, 'dbBackgroundColor' => 6, 'dbLiveStreamUsingAirtimeAuth' => 7, 'dbLiveStreamUsingCustomAuth' => 8, 'dbLiveStreamUser' => 9, 'dbLiveStreamPass' => 10, 'dbLinked' => 11, 'dbIsLinkable' => 12, 'dbImagePath' => 13, 'dbHasAutoPlaylist' => 14, 'dbAutoPlaylistId' => 15, 'dbAutoPlaylistRepeat' => 16, 'dbOverrideIntroPlaylist' => 17, 'dbIntroPlaylistId' => 18, 'dbOverrideOutroPlaylist' => 19, 'dbOutroPlaylistId' => 20, ),
BasePeer::TYPE_COLNAME => array (CcShowPeer::ID => 0, CcShowPeer::NAME => 1, CcShowPeer::URL => 2, CcShowPeer::GENRE => 3, CcShowPeer::DESCRIPTION => 4, CcShowPeer::COLOR => 5, CcShowPeer::BACKGROUND_COLOR => 6, CcShowPeer::LIVE_STREAM_USING_AIRTIME_AUTH => 7, CcShowPeer::LIVE_STREAM_USING_CUSTOM_AUTH => 8, CcShowPeer::LIVE_STREAM_USER => 9, CcShowPeer::LIVE_STREAM_PASS => 10, CcShowPeer::LINKED => 11, CcShowPeer::IS_LINKABLE => 12, CcShowPeer::IMAGE_PATH => 13, CcShowPeer::HAS_AUTOPLAYLIST => 14, CcShowPeer::AUTOPLAYLIST_ID => 15, CcShowPeer::AUTOPLAYLIST_REPEAT => 16, CcShowPeer::OVERRIDE_INTRO_PLAYLIST => 17, CcShowPeer::INTRO_PLAYLIST_ID => 18, CcShowPeer::OVERRIDE_OUTRO_PLAYLIST => 19, CcShowPeer::OUTRO_PLAYLIST_ID => 20, ),
BasePeer::TYPE_RAW_COLNAME => array ('ID' => 0, 'NAME' => 1, 'URL' => 2, 'GENRE' => 3, 'DESCRIPTION' => 4, 'COLOR' => 5, 'BACKGROUND_COLOR' => 6, 'LIVE_STREAM_USING_AIRTIME_AUTH' => 7, 'LIVE_STREAM_USING_CUSTOM_AUTH' => 8, 'LIVE_STREAM_USER' => 9, 'LIVE_STREAM_PASS' => 10, 'LINKED' => 11, 'IS_LINKABLE' => 12, 'IMAGE_PATH' => 13, 'HAS_AUTOPLAYLIST' => 14, 'AUTOPLAYLIST_ID' => 15, 'AUTOPLAYLIST_REPEAT' => 16, 'OVERRIDE_INTRO_PLAYLIST' => 17, 'INTRO_PLAYLIST_ID' => 18, 'OVERRIDE_OUTRO_PLAYLIST' => 19, 'OUTRO_PLAYLIST_ID' => 20, ),
BasePeer::TYPE_FIELDNAME => array ('id' => 0, 'name' => 1, 'url' => 2, 'genre' => 3, 'description' => 4, 'color' => 5, 'background_color' => 6, 'live_stream_using_airtime_auth' => 7, 'live_stream_using_custom_auth' => 8, 'live_stream_user' => 9, 'live_stream_pass' => 10, 'linked' => 11, 'is_linkable' => 12, 'image_path' => 13, 'has_autoplaylist' => 14, 'autoplaylist_id' => 15, 'autoplaylist_repeat' => 16, 'override_intro_playlist' => 17, 'intro_playlist_id' => 18, 'override_outro_playlist' => 19, 'outro_playlist_id' => 20, ),
BasePeer::TYPE_NUM => array (0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, )
BasePeer::TYPE_PHPNAME => array ('DbId' => 0, 'DbName' => 1, 'DbUrl' => 2, 'DbGenre' => 3, 'DbDescription' => 4, 'DbColor' => 5, 'DbBackgroundColor' => 6, 'DbLiveStreamUsingAirtimeAuth' => 7, 'DbLiveStreamUsingCustomAuth' => 8, 'DbLiveStreamUser' => 9, 'DbLiveStreamPass' => 10, 'DbLinked' => 11, 'DbIsLinkable' => 12, 'DbImagePath' => 13, 'DbHasAutoPlaylist' => 14, 'DbAutoPlaylistId' => 15, 'DbAutoPlaylistRepeat' => 16, ),
BasePeer::TYPE_STUDLYPHPNAME => array ('dbId' => 0, 'dbName' => 1, 'dbUrl' => 2, 'dbGenre' => 3, 'dbDescription' => 4, 'dbColor' => 5, 'dbBackgroundColor' => 6, 'dbLiveStreamUsingAirtimeAuth' => 7, 'dbLiveStreamUsingCustomAuth' => 8, 'dbLiveStreamUser' => 9, 'dbLiveStreamPass' => 10, 'dbLinked' => 11, 'dbIsLinkable' => 12, 'dbImagePath' => 13, 'dbHasAutoPlaylist' => 14, 'dbAutoPlaylistId' => 15, 'dbAutoPlaylistRepeat' => 16, ),
BasePeer::TYPE_COLNAME => array (CcShowPeer::ID => 0, CcShowPeer::NAME => 1, CcShowPeer::URL => 2, CcShowPeer::GENRE => 3, CcShowPeer::DESCRIPTION => 4, CcShowPeer::COLOR => 5, CcShowPeer::BACKGROUND_COLOR => 6, CcShowPeer::LIVE_STREAM_USING_AIRTIME_AUTH => 7, CcShowPeer::LIVE_STREAM_USING_CUSTOM_AUTH => 8, CcShowPeer::LIVE_STREAM_USER => 9, CcShowPeer::LIVE_STREAM_PASS => 10, CcShowPeer::LINKED => 11, CcShowPeer::IS_LINKABLE => 12, CcShowPeer::IMAGE_PATH => 13, CcShowPeer::HAS_AUTOPLAYLIST => 14, CcShowPeer::AUTOPLAYLIST_ID => 15, CcShowPeer::AUTOPLAYLIST_REPEAT => 16, ),
BasePeer::TYPE_RAW_COLNAME => array ('ID' => 0, 'NAME' => 1, 'URL' => 2, 'GENRE' => 3, 'DESCRIPTION' => 4, 'COLOR' => 5, 'BACKGROUND_COLOR' => 6, 'LIVE_STREAM_USING_AIRTIME_AUTH' => 7, 'LIVE_STREAM_USING_CUSTOM_AUTH' => 8, 'LIVE_STREAM_USER' => 9, 'LIVE_STREAM_PASS' => 10, 'LINKED' => 11, 'IS_LINKABLE' => 12, 'IMAGE_PATH' => 13, 'HAS_AUTOPLAYLIST' => 14, 'AUTOPLAYLIST_ID' => 15, 'AUTOPLAYLIST_REPEAT' => 16, ),
BasePeer::TYPE_FIELDNAME => array ('id' => 0, 'name' => 1, 'url' => 2, 'genre' => 3, 'description' => 4, 'color' => 5, 'background_color' => 6, 'live_stream_using_airtime_auth' => 7, 'live_stream_using_custom_auth' => 8, 'live_stream_user' => 9, 'live_stream_pass' => 10, 'linked' => 11, 'is_linkable' => 12, 'image_path' => 13, 'has_autoplaylist' => 14, 'autoplaylist_id' => 15, 'autoplaylist_repeat' => 16, ),
BasePeer::TYPE_NUM => array (0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, )
);
/**
@ -225,10 +213,6 @@ abstract class BaseCcShowPeer
$criteria->addSelectColumn(CcShowPeer::HAS_AUTOPLAYLIST);
$criteria->addSelectColumn(CcShowPeer::AUTOPLAYLIST_ID);
$criteria->addSelectColumn(CcShowPeer::AUTOPLAYLIST_REPEAT);
$criteria->addSelectColumn(CcShowPeer::OVERRIDE_INTRO_PLAYLIST);
$criteria->addSelectColumn(CcShowPeer::INTRO_PLAYLIST_ID);
$criteria->addSelectColumn(CcShowPeer::OVERRIDE_OUTRO_PLAYLIST);
$criteria->addSelectColumn(CcShowPeer::OUTRO_PLAYLIST_ID);
} else {
$criteria->addSelectColumn($alias . '.id');
$criteria->addSelectColumn($alias . '.name');
@ -247,10 +231,6 @@ abstract class BaseCcShowPeer
$criteria->addSelectColumn($alias . '.has_autoplaylist');
$criteria->addSelectColumn($alias . '.autoplaylist_id');
$criteria->addSelectColumn($alias . '.autoplaylist_repeat');
$criteria->addSelectColumn($alias . '.override_intro_playlist');
$criteria->addSelectColumn($alias . '.intro_playlist_id');
$criteria->addSelectColumn($alias . '.override_outro_playlist');
$criteria->addSelectColumn($alias . '.outro_playlist_id');
}
}
@ -565,7 +545,7 @@ abstract class BaseCcShowPeer
/**
* Returns the number of rows matching criteria, joining the related CcPlaylistRelatedByDbAutoPlaylistId table
* Returns the number of rows matching criteria, joining the related CcPlaylist table
*
* @param Criteria $criteria
* @param boolean $distinct Whether to select only distinct columns; deprecated: use Criteria->setDistinct() instead.
@ -573,7 +553,7 @@ abstract class BaseCcShowPeer
* @param String $join_behavior the type of joins to use, defaults to Criteria::LEFT_JOIN
* @return int Number of matching rows.
*/
public static function doCountJoinCcPlaylistRelatedByDbAutoPlaylistId(Criteria $criteria, $distinct = false, PropelPDO $con = null, $join_behavior = Criteria::LEFT_JOIN)
public static function doCountJoinCcPlaylist(Criteria $criteria, $distinct = false, PropelPDO $con = null, $join_behavior = Criteria::LEFT_JOIN)
{
// we're going to modify criteria, so copy it first
$criteria = clone $criteria;
@ -615,108 +595,6 @@ abstract class BaseCcShowPeer
}
/**
* Returns the number of rows matching criteria, joining the related CcPlaylistRelatedByDbIntroPlaylistId table
*
* @param Criteria $criteria
* @param boolean $distinct Whether to select only distinct columns; deprecated: use Criteria->setDistinct() instead.
* @param PropelPDO $con
* @param String $join_behavior the type of joins to use, defaults to Criteria::LEFT_JOIN
* @return int Number of matching rows.
*/
public static function doCountJoinCcPlaylistRelatedByDbIntroPlaylistId(Criteria $criteria, $distinct = false, PropelPDO $con = null, $join_behavior = Criteria::LEFT_JOIN)
{
// we're going to modify criteria, so copy it first
$criteria = clone $criteria;
// We need to set the primary table name, since in the case that there are no WHERE columns
// it will be impossible for the BasePeer::createSelectSql() method to determine which
// tables go into the FROM clause.
$criteria->setPrimaryTableName(CcShowPeer::TABLE_NAME);
if ($distinct && !in_array(Criteria::DISTINCT, $criteria->getSelectModifiers())) {
$criteria->setDistinct();
}
if (!$criteria->hasSelectClause()) {
CcShowPeer::addSelectColumns($criteria);
}
$criteria->clearOrderByColumns(); // ORDER BY won't ever affect the count
// Set the correct dbName
$criteria->setDbName(CcShowPeer::DATABASE_NAME);
if ($con === null) {
$con = Propel::getConnection(CcShowPeer::DATABASE_NAME, Propel::CONNECTION_READ);
}
$criteria->addJoin(CcShowPeer::INTRO_PLAYLIST_ID, CcPlaylistPeer::ID, $join_behavior);
$stmt = BasePeer::doCount($criteria, $con);
if ($row = $stmt->fetch(PDO::FETCH_NUM)) {
$count = (int) $row[0];
} else {
$count = 0; // no rows returned; we infer that means 0 matches.
}
$stmt->closeCursor();
return $count;
}
/**
* Returns the number of rows matching criteria, joining the related CcPlaylistRelatedByDbOutroPlaylistId table
*
* @param Criteria $criteria
* @param boolean $distinct Whether to select only distinct columns; deprecated: use Criteria->setDistinct() instead.
* @param PropelPDO $con
* @param String $join_behavior the type of joins to use, defaults to Criteria::LEFT_JOIN
* @return int Number of matching rows.
*/
public static function doCountJoinCcPlaylistRelatedByDbOutroPlaylistId(Criteria $criteria, $distinct = false, PropelPDO $con = null, $join_behavior = Criteria::LEFT_JOIN)
{
// we're going to modify criteria, so copy it first
$criteria = clone $criteria;
// We need to set the primary table name, since in the case that there are no WHERE columns
// it will be impossible for the BasePeer::createSelectSql() method to determine which
// tables go into the FROM clause.
$criteria->setPrimaryTableName(CcShowPeer::TABLE_NAME);
if ($distinct && !in_array(Criteria::DISTINCT, $criteria->getSelectModifiers())) {
$criteria->setDistinct();
}
if (!$criteria->hasSelectClause()) {
CcShowPeer::addSelectColumns($criteria);
}
$criteria->clearOrderByColumns(); // ORDER BY won't ever affect the count
// Set the correct dbName
$criteria->setDbName(CcShowPeer::DATABASE_NAME);
if ($con === null) {
$con = Propel::getConnection(CcShowPeer::DATABASE_NAME, Propel::CONNECTION_READ);
}
$criteria->addJoin(CcShowPeer::OUTRO_PLAYLIST_ID, CcPlaylistPeer::ID, $join_behavior);
$stmt = BasePeer::doCount($criteria, $con);
if ($row = $stmt->fetch(PDO::FETCH_NUM)) {
$count = (int) $row[0];
} else {
$count = 0; // no rows returned; we infer that means 0 matches.
}
$stmt->closeCursor();
return $count;
}
/**
* Selects a collection of CcShow objects pre-filled with their CcPlaylist objects.
* @param Criteria $criteria
@ -726,7 +604,7 @@ abstract class BaseCcShowPeer
* @throws PropelException Any exceptions caught during processing will be
* rethrown wrapped into a PropelException.
*/
public static function doSelectJoinCcPlaylistRelatedByDbAutoPlaylistId(Criteria $criteria, $con = null, $join_behavior = Criteria::LEFT_JOIN)
public static function doSelectJoinCcPlaylist(Criteria $criteria, $con = null, $join_behavior = Criteria::LEFT_JOIN)
{
$criteria = clone $criteria;
@ -772,141 +650,7 @@ abstract class BaseCcShowPeer
} // if obj2 already loaded
// Add the $obj1 (CcShow) to $obj2 (CcPlaylist)
$obj2->addCcShowRelatedByDbAutoPlaylistId($obj1);
} // if joined row was not null
$results[] = $obj1;
}
$stmt->closeCursor();
return $results;
}
/**
* Selects a collection of CcShow objects pre-filled with their CcPlaylist objects.
* @param Criteria $criteria
* @param PropelPDO $con
* @param String $join_behavior the type of joins to use, defaults to Criteria::LEFT_JOIN
* @return array Array of CcShow objects.
* @throws PropelException Any exceptions caught during processing will be
* rethrown wrapped into a PropelException.
*/
public static function doSelectJoinCcPlaylistRelatedByDbIntroPlaylistId(Criteria $criteria, $con = null, $join_behavior = Criteria::LEFT_JOIN)
{
$criteria = clone $criteria;
// Set the correct dbName if it has not been overridden
if ($criteria->getDbName() == Propel::getDefaultDB()) {
$criteria->setDbName(CcShowPeer::DATABASE_NAME);
}
CcShowPeer::addSelectColumns($criteria);
$startcol = CcShowPeer::NUM_HYDRATE_COLUMNS;
CcPlaylistPeer::addSelectColumns($criteria);
$criteria->addJoin(CcShowPeer::INTRO_PLAYLIST_ID, CcPlaylistPeer::ID, $join_behavior);
$stmt = BasePeer::doSelect($criteria, $con);
$results = array();
while ($row = $stmt->fetch(PDO::FETCH_NUM)) {
$key1 = CcShowPeer::getPrimaryKeyHashFromRow($row, 0);
if (null !== ($obj1 = CcShowPeer::getInstanceFromPool($key1))) {
// We no longer rehydrate the object, since this can cause data loss.
// See http://www.propelorm.org/ticket/509
// $obj1->hydrate($row, 0, true); // rehydrate
} else {
$cls = CcShowPeer::getOMClass();
$obj1 = new $cls();
$obj1->hydrate($row);
CcShowPeer::addInstanceToPool($obj1, $key1);
} // if $obj1 already loaded
$key2 = CcPlaylistPeer::getPrimaryKeyHashFromRow($row, $startcol);
if ($key2 !== null) {
$obj2 = CcPlaylistPeer::getInstanceFromPool($key2);
if (!$obj2) {
$cls = CcPlaylistPeer::getOMClass();
$obj2 = new $cls();
$obj2->hydrate($row, $startcol);
CcPlaylistPeer::addInstanceToPool($obj2, $key2);
} // if obj2 already loaded
// Add the $obj1 (CcShow) to $obj2 (CcPlaylist)
$obj2->addCcShowRelatedByDbIntroPlaylistId($obj1);
} // if joined row was not null
$results[] = $obj1;
}
$stmt->closeCursor();
return $results;
}
/**
* Selects a collection of CcShow objects pre-filled with their CcPlaylist objects.
* @param Criteria $criteria
* @param PropelPDO $con
* @param String $join_behavior the type of joins to use, defaults to Criteria::LEFT_JOIN
* @return array Array of CcShow objects.
* @throws PropelException Any exceptions caught during processing will be
* rethrown wrapped into a PropelException.
*/
public static function doSelectJoinCcPlaylistRelatedByDbOutroPlaylistId(Criteria $criteria, $con = null, $join_behavior = Criteria::LEFT_JOIN)
{
$criteria = clone $criteria;
// Set the correct dbName if it has not been overridden
if ($criteria->getDbName() == Propel::getDefaultDB()) {
$criteria->setDbName(CcShowPeer::DATABASE_NAME);
}
CcShowPeer::addSelectColumns($criteria);
$startcol = CcShowPeer::NUM_HYDRATE_COLUMNS;
CcPlaylistPeer::addSelectColumns($criteria);
$criteria->addJoin(CcShowPeer::OUTRO_PLAYLIST_ID, CcPlaylistPeer::ID, $join_behavior);
$stmt = BasePeer::doSelect($criteria, $con);
$results = array();
while ($row = $stmt->fetch(PDO::FETCH_NUM)) {
$key1 = CcShowPeer::getPrimaryKeyHashFromRow($row, 0);
if (null !== ($obj1 = CcShowPeer::getInstanceFromPool($key1))) {
// We no longer rehydrate the object, since this can cause data loss.
// See http://www.propelorm.org/ticket/509
// $obj1->hydrate($row, 0, true); // rehydrate
} else {
$cls = CcShowPeer::getOMClass();
$obj1 = new $cls();
$obj1->hydrate($row);
CcShowPeer::addInstanceToPool($obj1, $key1);
} // if $obj1 already loaded
$key2 = CcPlaylistPeer::getPrimaryKeyHashFromRow($row, $startcol);
if ($key2 !== null) {
$obj2 = CcPlaylistPeer::getInstanceFromPool($key2);
if (!$obj2) {
$cls = CcPlaylistPeer::getOMClass();
$obj2 = new $cls();
$obj2->hydrate($row, $startcol);
CcPlaylistPeer::addInstanceToPool($obj2, $key2);
} // if obj2 already loaded
// Add the $obj1 (CcShow) to $obj2 (CcPlaylist)
$obj2->addCcShowRelatedByDbOutroPlaylistId($obj1);
$obj2->addCcShow($obj1);
} // if joined row was not null
@ -956,10 +700,6 @@ abstract class BaseCcShowPeer
$criteria->addJoin(CcShowPeer::AUTOPLAYLIST_ID, CcPlaylistPeer::ID, $join_behavior);
$criteria->addJoin(CcShowPeer::INTRO_PLAYLIST_ID, CcPlaylistPeer::ID, $join_behavior);
$criteria->addJoin(CcShowPeer::OUTRO_PLAYLIST_ID, CcPlaylistPeer::ID, $join_behavior);
$stmt = BasePeer::doCount($criteria, $con);
if ($row = $stmt->fetch(PDO::FETCH_NUM)) {
@ -997,18 +737,8 @@ abstract class BaseCcShowPeer
CcPlaylistPeer::addSelectColumns($criteria);
$startcol3 = $startcol2 + CcPlaylistPeer::NUM_HYDRATE_COLUMNS;
CcPlaylistPeer::addSelectColumns($criteria);
$startcol4 = $startcol3 + CcPlaylistPeer::NUM_HYDRATE_COLUMNS;
CcPlaylistPeer::addSelectColumns($criteria);
$startcol5 = $startcol4 + CcPlaylistPeer::NUM_HYDRATE_COLUMNS;
$criteria->addJoin(CcShowPeer::AUTOPLAYLIST_ID, CcPlaylistPeer::ID, $join_behavior);
$criteria->addJoin(CcShowPeer::INTRO_PLAYLIST_ID, CcPlaylistPeer::ID, $join_behavior);
$criteria->addJoin(CcShowPeer::OUTRO_PLAYLIST_ID, CcPlaylistPeer::ID, $join_behavior);
$stmt = BasePeer::doSelect($criteria, $con);
$results = array();
@ -1041,342 +771,9 @@ abstract class BaseCcShowPeer
} // if obj2 loaded
// Add the $obj1 (CcShow) to the collection in $obj2 (CcPlaylist)
$obj2->addCcShowRelatedByDbAutoPlaylistId($obj1);
$obj2->addCcShow($obj1);
} // if joined row not null
// Add objects for joined CcPlaylist rows
$key3 = CcPlaylistPeer::getPrimaryKeyHashFromRow($row, $startcol3);
if ($key3 !== null) {
$obj3 = CcPlaylistPeer::getInstanceFromPool($key3);
if (!$obj3) {
$cls = CcPlaylistPeer::getOMClass();
$obj3 = new $cls();
$obj3->hydrate($row, $startcol3);
CcPlaylistPeer::addInstanceToPool($obj3, $key3);
} // if obj3 loaded
// Add the $obj1 (CcShow) to the collection in $obj3 (CcPlaylist)
$obj3->addCcShowRelatedByDbIntroPlaylistId($obj1);
} // if joined row not null
// Add objects for joined CcPlaylist rows
$key4 = CcPlaylistPeer::getPrimaryKeyHashFromRow($row, $startcol4);
if ($key4 !== null) {
$obj4 = CcPlaylistPeer::getInstanceFromPool($key4);
if (!$obj4) {
$cls = CcPlaylistPeer::getOMClass();
$obj4 = new $cls();
$obj4->hydrate($row, $startcol4);
CcPlaylistPeer::addInstanceToPool($obj4, $key4);
} // if obj4 loaded
// Add the $obj1 (CcShow) to the collection in $obj4 (CcPlaylist)
$obj4->addCcShowRelatedByDbOutroPlaylistId($obj1);
} // if joined row not null
$results[] = $obj1;
}
$stmt->closeCursor();
return $results;
}
/**
* Returns the number of rows matching criteria, joining the related CcPlaylistRelatedByDbAutoPlaylistId table
*
* @param Criteria $criteria
* @param boolean $distinct Whether to select only distinct columns; deprecated: use Criteria->setDistinct() instead.
* @param PropelPDO $con
* @param String $join_behavior the type of joins to use, defaults to Criteria::LEFT_JOIN
* @return int Number of matching rows.
*/
public static function doCountJoinAllExceptCcPlaylistRelatedByDbAutoPlaylistId(Criteria $criteria, $distinct = false, PropelPDO $con = null, $join_behavior = Criteria::LEFT_JOIN)
{
// we're going to modify criteria, so copy it first
$criteria = clone $criteria;
// We need to set the primary table name, since in the case that there are no WHERE columns
// it will be impossible for the BasePeer::createSelectSql() method to determine which
// tables go into the FROM clause.
$criteria->setPrimaryTableName(CcShowPeer::TABLE_NAME);
if ($distinct && !in_array(Criteria::DISTINCT, $criteria->getSelectModifiers())) {
$criteria->setDistinct();
}
if (!$criteria->hasSelectClause()) {
CcShowPeer::addSelectColumns($criteria);
}
$criteria->clearOrderByColumns(); // ORDER BY should not affect count
// Set the correct dbName
$criteria->setDbName(CcShowPeer::DATABASE_NAME);
if ($con === null) {
$con = Propel::getConnection(CcShowPeer::DATABASE_NAME, Propel::CONNECTION_READ);
}
$stmt = BasePeer::doCount($criteria, $con);
if ($row = $stmt->fetch(PDO::FETCH_NUM)) {
$count = (int) $row[0];
} else {
$count = 0; // no rows returned; we infer that means 0 matches.
}
$stmt->closeCursor();
return $count;
}
/**
* Returns the number of rows matching criteria, joining the related CcPlaylistRelatedByDbIntroPlaylistId table
*
* @param Criteria $criteria
* @param boolean $distinct Whether to select only distinct columns; deprecated: use Criteria->setDistinct() instead.
* @param PropelPDO $con
* @param String $join_behavior the type of joins to use, defaults to Criteria::LEFT_JOIN
* @return int Number of matching rows.
*/
public static function doCountJoinAllExceptCcPlaylistRelatedByDbIntroPlaylistId(Criteria $criteria, $distinct = false, PropelPDO $con = null, $join_behavior = Criteria::LEFT_JOIN)
{
// we're going to modify criteria, so copy it first
$criteria = clone $criteria;
// We need to set the primary table name, since in the case that there are no WHERE columns
// it will be impossible for the BasePeer::createSelectSql() method to determine which
// tables go into the FROM clause.
$criteria->setPrimaryTableName(CcShowPeer::TABLE_NAME);
if ($distinct && !in_array(Criteria::DISTINCT, $criteria->getSelectModifiers())) {
$criteria->setDistinct();
}
if (!$criteria->hasSelectClause()) {
CcShowPeer::addSelectColumns($criteria);
}
$criteria->clearOrderByColumns(); // ORDER BY should not affect count
// Set the correct dbName
$criteria->setDbName(CcShowPeer::DATABASE_NAME);
if ($con === null) {
$con = Propel::getConnection(CcShowPeer::DATABASE_NAME, Propel::CONNECTION_READ);
}
$stmt = BasePeer::doCount($criteria, $con);
if ($row = $stmt->fetch(PDO::FETCH_NUM)) {
$count = (int) $row[0];
} else {
$count = 0; // no rows returned; we infer that means 0 matches.
}
$stmt->closeCursor();
return $count;
}
/**
* Returns the number of rows matching criteria, joining the related CcPlaylistRelatedByDbOutroPlaylistId table
*
* @param Criteria $criteria
* @param boolean $distinct Whether to select only distinct columns; deprecated: use Criteria->setDistinct() instead.
* @param PropelPDO $con
* @param String $join_behavior the type of joins to use, defaults to Criteria::LEFT_JOIN
* @return int Number of matching rows.
*/
public static function doCountJoinAllExceptCcPlaylistRelatedByDbOutroPlaylistId(Criteria $criteria, $distinct = false, PropelPDO $con = null, $join_behavior = Criteria::LEFT_JOIN)
{
// we're going to modify criteria, so copy it first
$criteria = clone $criteria;
// We need to set the primary table name, since in the case that there are no WHERE columns
// it will be impossible for the BasePeer::createSelectSql() method to determine which
// tables go into the FROM clause.
$criteria->setPrimaryTableName(CcShowPeer::TABLE_NAME);
if ($distinct && !in_array(Criteria::DISTINCT, $criteria->getSelectModifiers())) {
$criteria->setDistinct();
}
if (!$criteria->hasSelectClause()) {
CcShowPeer::addSelectColumns($criteria);
}
$criteria->clearOrderByColumns(); // ORDER BY should not affect count
// Set the correct dbName
$criteria->setDbName(CcShowPeer::DATABASE_NAME);
if ($con === null) {
$con = Propel::getConnection(CcShowPeer::DATABASE_NAME, Propel::CONNECTION_READ);
}
$stmt = BasePeer::doCount($criteria, $con);
if ($row = $stmt->fetch(PDO::FETCH_NUM)) {
$count = (int) $row[0];
} else {
$count = 0; // no rows returned; we infer that means 0 matches.
}
$stmt->closeCursor();
return $count;
}
/**
* Selects a collection of CcShow objects pre-filled with all related objects except CcPlaylistRelatedByDbAutoPlaylistId.
*
* @param Criteria $criteria
* @param PropelPDO $con
* @param String $join_behavior the type of joins to use, defaults to Criteria::LEFT_JOIN
* @return array Array of CcShow objects.
* @throws PropelException Any exceptions caught during processing will be
* rethrown wrapped into a PropelException.
*/
public static function doSelectJoinAllExceptCcPlaylistRelatedByDbAutoPlaylistId(Criteria $criteria, $con = null, $join_behavior = Criteria::LEFT_JOIN)
{
$criteria = clone $criteria;
// Set the correct dbName if it has not been overridden
// $criteria->getDbName() will return the same object if not set to another value
// so == check is okay and faster
if ($criteria->getDbName() == Propel::getDefaultDB()) {
$criteria->setDbName(CcShowPeer::DATABASE_NAME);
}
CcShowPeer::addSelectColumns($criteria);
$startcol2 = CcShowPeer::NUM_HYDRATE_COLUMNS;
$stmt = BasePeer::doSelect($criteria, $con);
$results = array();
while ($row = $stmt->fetch(PDO::FETCH_NUM)) {
$key1 = CcShowPeer::getPrimaryKeyHashFromRow($row, 0);
if (null !== ($obj1 = CcShowPeer::getInstanceFromPool($key1))) {
// We no longer rehydrate the object, since this can cause data loss.
// See http://www.propelorm.org/ticket/509
// $obj1->hydrate($row, 0, true); // rehydrate
} else {
$cls = CcShowPeer::getOMClass();
$obj1 = new $cls();
$obj1->hydrate($row);
CcShowPeer::addInstanceToPool($obj1, $key1);
} // if obj1 already loaded
$results[] = $obj1;
}
$stmt->closeCursor();
return $results;
}
/**
* Selects a collection of CcShow objects pre-filled with all related objects except CcPlaylistRelatedByDbIntroPlaylistId.
*
* @param Criteria $criteria
* @param PropelPDO $con
* @param String $join_behavior the type of joins to use, defaults to Criteria::LEFT_JOIN
* @return array Array of CcShow objects.
* @throws PropelException Any exceptions caught during processing will be
* rethrown wrapped into a PropelException.
*/
public static function doSelectJoinAllExceptCcPlaylistRelatedByDbIntroPlaylistId(Criteria $criteria, $con = null, $join_behavior = Criteria::LEFT_JOIN)
{
$criteria = clone $criteria;
// Set the correct dbName if it has not been overridden
// $criteria->getDbName() will return the same object if not set to another value
// so == check is okay and faster
if ($criteria->getDbName() == Propel::getDefaultDB()) {
$criteria->setDbName(CcShowPeer::DATABASE_NAME);
}
CcShowPeer::addSelectColumns($criteria);
$startcol2 = CcShowPeer::NUM_HYDRATE_COLUMNS;
$stmt = BasePeer::doSelect($criteria, $con);
$results = array();
while ($row = $stmt->fetch(PDO::FETCH_NUM)) {
$key1 = CcShowPeer::getPrimaryKeyHashFromRow($row, 0);
if (null !== ($obj1 = CcShowPeer::getInstanceFromPool($key1))) {
// We no longer rehydrate the object, since this can cause data loss.
// See http://www.propelorm.org/ticket/509
// $obj1->hydrate($row, 0, true); // rehydrate
} else {
$cls = CcShowPeer::getOMClass();
$obj1 = new $cls();
$obj1->hydrate($row);
CcShowPeer::addInstanceToPool($obj1, $key1);
} // if obj1 already loaded
$results[] = $obj1;
}
$stmt->closeCursor();
return $results;
}
/**
* Selects a collection of CcShow objects pre-filled with all related objects except CcPlaylistRelatedByDbOutroPlaylistId.
*
* @param Criteria $criteria
* @param PropelPDO $con
* @param String $join_behavior the type of joins to use, defaults to Criteria::LEFT_JOIN
* @return array Array of CcShow objects.
* @throws PropelException Any exceptions caught during processing will be
* rethrown wrapped into a PropelException.
*/
public static function doSelectJoinAllExceptCcPlaylistRelatedByDbOutroPlaylistId(Criteria $criteria, $con = null, $join_behavior = Criteria::LEFT_JOIN)
{
$criteria = clone $criteria;
// Set the correct dbName if it has not been overridden
// $criteria->getDbName() will return the same object if not set to another value
// so == check is okay and faster
if ($criteria->getDbName() == Propel::getDefaultDB()) {
$criteria->setDbName(CcShowPeer::DATABASE_NAME);
}
CcShowPeer::addSelectColumns($criteria);
$startcol2 = CcShowPeer::NUM_HYDRATE_COLUMNS;
$stmt = BasePeer::doSelect($criteria, $con);
$results = array();
while ($row = $stmt->fetch(PDO::FETCH_NUM)) {
$key1 = CcShowPeer::getPrimaryKeyHashFromRow($row, 0);
if (null !== ($obj1 = CcShowPeer::getInstanceFromPool($key1))) {
// We no longer rehydrate the object, since this can cause data loss.
// See http://www.propelorm.org/ticket/509
// $obj1->hydrate($row, 0, true); // rehydrate
} else {
$cls = CcShowPeer::getOMClass();
$obj1 = new $cls();
$obj1->hydrate($row);
CcShowPeer::addInstanceToPool($obj1, $key1);
} // if obj1 already loaded
$results[] = $obj1;
}
$stmt->closeCursor();

View File

@ -23,10 +23,6 @@
* @method CcShowQuery orderByDbHasAutoPlaylist($order = Criteria::ASC) Order by the has_autoplaylist column
* @method CcShowQuery orderByDbAutoPlaylistId($order = Criteria::ASC) Order by the autoplaylist_id column
* @method CcShowQuery orderByDbAutoPlaylistRepeat($order = Criteria::ASC) Order by the autoplaylist_repeat column
* @method CcShowQuery orderByDbOverrideIntroPlaylist($order = Criteria::ASC) Order by the override_intro_playlist column
* @method CcShowQuery orderByDbIntroPlaylistId($order = Criteria::ASC) Order by the intro_playlist_id column
* @method CcShowQuery orderByDbOverrideOutroPlaylist($order = Criteria::ASC) Order by the override_outro_playlist column
* @method CcShowQuery orderByDbOutroPlaylistId($order = Criteria::ASC) Order by the outro_playlist_id column
*
* @method CcShowQuery groupByDbId() Group by the id column
* @method CcShowQuery groupByDbName() Group by the name column
@ -45,26 +41,14 @@
* @method CcShowQuery groupByDbHasAutoPlaylist() Group by the has_autoplaylist column
* @method CcShowQuery groupByDbAutoPlaylistId() Group by the autoplaylist_id column
* @method CcShowQuery groupByDbAutoPlaylistRepeat() Group by the autoplaylist_repeat column
* @method CcShowQuery groupByDbOverrideIntroPlaylist() Group by the override_intro_playlist column
* @method CcShowQuery groupByDbIntroPlaylistId() Group by the intro_playlist_id column
* @method CcShowQuery groupByDbOverrideOutroPlaylist() Group by the override_outro_playlist column
* @method CcShowQuery groupByDbOutroPlaylistId() Group by the outro_playlist_id column
*
* @method CcShowQuery leftJoin($relation) Adds a LEFT JOIN clause to the query
* @method CcShowQuery rightJoin($relation) Adds a RIGHT JOIN clause to the query
* @method CcShowQuery innerJoin($relation) Adds a INNER JOIN clause to the query
*
* @method CcShowQuery leftJoinCcPlaylistRelatedByDbAutoPlaylistId($relationAlias = null) Adds a LEFT JOIN clause to the query using the CcPlaylistRelatedByDbAutoPlaylistId relation
* @method CcShowQuery rightJoinCcPlaylistRelatedByDbAutoPlaylistId($relationAlias = null) Adds a RIGHT JOIN clause to the query using the CcPlaylistRelatedByDbAutoPlaylistId relation
* @method CcShowQuery innerJoinCcPlaylistRelatedByDbAutoPlaylistId($relationAlias = null) Adds a INNER JOIN clause to the query using the CcPlaylistRelatedByDbAutoPlaylistId relation
*
* @method CcShowQuery leftJoinCcPlaylistRelatedByDbIntroPlaylistId($relationAlias = null) Adds a LEFT JOIN clause to the query using the CcPlaylistRelatedByDbIntroPlaylistId relation
* @method CcShowQuery rightJoinCcPlaylistRelatedByDbIntroPlaylistId($relationAlias = null) Adds a RIGHT JOIN clause to the query using the CcPlaylistRelatedByDbIntroPlaylistId relation
* @method CcShowQuery innerJoinCcPlaylistRelatedByDbIntroPlaylistId($relationAlias = null) Adds a INNER JOIN clause to the query using the CcPlaylistRelatedByDbIntroPlaylistId relation
*
* @method CcShowQuery leftJoinCcPlaylistRelatedByDbOutroPlaylistId($relationAlias = null) Adds a LEFT JOIN clause to the query using the CcPlaylistRelatedByDbOutroPlaylistId relation
* @method CcShowQuery rightJoinCcPlaylistRelatedByDbOutroPlaylistId($relationAlias = null) Adds a RIGHT JOIN clause to the query using the CcPlaylistRelatedByDbOutroPlaylistId relation
* @method CcShowQuery innerJoinCcPlaylistRelatedByDbOutroPlaylistId($relationAlias = null) Adds a INNER JOIN clause to the query using the CcPlaylistRelatedByDbOutroPlaylistId relation
* @method CcShowQuery leftJoinCcPlaylist($relationAlias = null) Adds a LEFT JOIN clause to the query using the CcPlaylist relation
* @method CcShowQuery rightJoinCcPlaylist($relationAlias = null) Adds a RIGHT JOIN clause to the query using the CcPlaylist relation
* @method CcShowQuery innerJoinCcPlaylist($relationAlias = null) Adds a INNER JOIN clause to the query using the CcPlaylist relation
*
* @method CcShowQuery leftJoinCcShowInstances($relationAlias = null) Adds a LEFT JOIN clause to the query using the CcShowInstances relation
* @method CcShowQuery rightJoinCcShowInstances($relationAlias = null) Adds a RIGHT JOIN clause to the query using the CcShowInstances relation
@ -101,10 +85,6 @@
* @method CcShow findOneByDbHasAutoPlaylist(boolean $has_autoplaylist) Return the first CcShow filtered by the has_autoplaylist column
* @method CcShow findOneByDbAutoPlaylistId(int $autoplaylist_id) Return the first CcShow filtered by the autoplaylist_id column
* @method CcShow findOneByDbAutoPlaylistRepeat(boolean $autoplaylist_repeat) Return the first CcShow filtered by the autoplaylist_repeat column
* @method CcShow findOneByDbOverrideIntroPlaylist(boolean $override_intro_playlist) Return the first CcShow filtered by the override_intro_playlist column
* @method CcShow findOneByDbIntroPlaylistId(int $intro_playlist_id) Return the first CcShow filtered by the intro_playlist_id column
* @method CcShow findOneByDbOverrideOutroPlaylist(boolean $override_outro_playlist) Return the first CcShow filtered by the override_outro_playlist column
* @method CcShow findOneByDbOutroPlaylistId(int $outro_playlist_id) Return the first CcShow filtered by the outro_playlist_id column
*
* @method array findByDbId(int $id) Return CcShow objects filtered by the id column
* @method array findByDbName(string $name) Return CcShow objects filtered by the name column
@ -123,10 +103,6 @@
* @method array findByDbHasAutoPlaylist(boolean $has_autoplaylist) Return CcShow objects filtered by the has_autoplaylist column
* @method array findByDbAutoPlaylistId(int $autoplaylist_id) Return CcShow objects filtered by the autoplaylist_id column
* @method array findByDbAutoPlaylistRepeat(boolean $autoplaylist_repeat) Return CcShow objects filtered by the autoplaylist_repeat column
* @method array findByDbOverrideIntroPlaylist(boolean $override_intro_playlist) Return CcShow objects filtered by the override_intro_playlist column
* @method array findByDbIntroPlaylistId(int $intro_playlist_id) Return CcShow objects filtered by the intro_playlist_id column
* @method array findByDbOverrideOutroPlaylist(boolean $override_outro_playlist) Return CcShow objects filtered by the override_outro_playlist column
* @method array findByDbOutroPlaylistId(int $outro_playlist_id) Return CcShow objects filtered by the outro_playlist_id column
*
* @package propel.generator.airtime.om
*/
@ -234,7 +210,7 @@ abstract class BaseCcShowQuery extends ModelCriteria
*/
protected function findPkSimple($key, $con)
{
$sql = 'SELECT "id", "name", "url", "genre", "description", "color", "background_color", "live_stream_using_airtime_auth", "live_stream_using_custom_auth", "live_stream_user", "live_stream_pass", "linked", "is_linkable", "image_path", "has_autoplaylist", "autoplaylist_id", "autoplaylist_repeat", "override_intro_playlist", "intro_playlist_id", "override_outro_playlist", "outro_playlist_id" FROM "cc_show" WHERE "id" = :p0';
$sql = 'SELECT "id", "name", "url", "genre", "description", "color", "background_color", "live_stream_using_airtime_auth", "live_stream_using_custom_auth", "live_stream_user", "live_stream_pass", "linked", "is_linkable", "image_path", "has_autoplaylist", "autoplaylist_id", "autoplaylist_repeat" FROM "cc_show" WHERE "id" = :p0';
try {
$stmt = $con->prepare($sql);
$stmt->bindValue(':p0', $key, PDO::PARAM_INT);
@ -772,7 +748,7 @@ abstract class BaseCcShowQuery extends ModelCriteria
* $query->filterByDbAutoPlaylistId(array('max' => 12)); // WHERE autoplaylist_id <= 12
* </code>
*
* @see filterByCcPlaylistRelatedByDbAutoPlaylistId()
* @see filterByCcPlaylist()
*
* @param mixed $dbAutoPlaylistId The value to use as filter.
* Use scalar values for equality.
@ -832,148 +808,6 @@ abstract class BaseCcShowQuery extends ModelCriteria
return $this->addUsingAlias(CcShowPeer::AUTOPLAYLIST_REPEAT, $dbAutoPlaylistRepeat, $comparison);
}
/**
* Filter the query on the override_intro_playlist column
*
* Example usage:
* <code>
* $query->filterByDbOverrideIntroPlaylist(true); // WHERE override_intro_playlist = true
* $query->filterByDbOverrideIntroPlaylist('yes'); // WHERE override_intro_playlist = true
* </code>
*
* @param boolean|string $dbOverrideIntroPlaylist The value to use as filter.
* Non-boolean arguments are converted using the following rules:
* * 1, '1', 'true', 'on', and 'yes' are converted to boolean true
* * 0, '0', 'false', 'off', and 'no' are converted to boolean false
* Check on string values is case insensitive (so 'FaLsE' is seen as 'false').
* @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL
*
* @return CcShowQuery The current query, for fluid interface
*/
public function filterByDbOverrideIntroPlaylist($dbOverrideIntroPlaylist = null, $comparison = null)
{
if (is_string($dbOverrideIntroPlaylist)) {
$dbOverrideIntroPlaylist = in_array(strtolower($dbOverrideIntroPlaylist), array('false', 'off', '-', 'no', 'n', '0', '')) ? false : true;
}
return $this->addUsingAlias(CcShowPeer::OVERRIDE_INTRO_PLAYLIST, $dbOverrideIntroPlaylist, $comparison);
}
/**
* Filter the query on the intro_playlist_id column
*
* Example usage:
* <code>
* $query->filterByDbIntroPlaylistId(1234); // WHERE intro_playlist_id = 1234
* $query->filterByDbIntroPlaylistId(array(12, 34)); // WHERE intro_playlist_id IN (12, 34)
* $query->filterByDbIntroPlaylistId(array('min' => 12)); // WHERE intro_playlist_id >= 12
* $query->filterByDbIntroPlaylistId(array('max' => 12)); // WHERE intro_playlist_id <= 12
* </code>
*
* @see filterByCcPlaylistRelatedByDbIntroPlaylistId()
*
* @param mixed $dbIntroPlaylistId The value to use as filter.
* Use scalar values for equality.
* Use array values for in_array() equivalent.
* Use associative array('min' => $minValue, 'max' => $maxValue) for intervals.
* @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL
*
* @return CcShowQuery The current query, for fluid interface
*/
public function filterByDbIntroPlaylistId($dbIntroPlaylistId = null, $comparison = null)
{
if (is_array($dbIntroPlaylistId)) {
$useMinMax = false;
if (isset($dbIntroPlaylistId['min'])) {
$this->addUsingAlias(CcShowPeer::INTRO_PLAYLIST_ID, $dbIntroPlaylistId['min'], Criteria::GREATER_EQUAL);
$useMinMax = true;
}
if (isset($dbIntroPlaylistId['max'])) {
$this->addUsingAlias(CcShowPeer::INTRO_PLAYLIST_ID, $dbIntroPlaylistId['max'], Criteria::LESS_EQUAL);
$useMinMax = true;
}
if ($useMinMax) {
return $this;
}
if (null === $comparison) {
$comparison = Criteria::IN;
}
}
return $this->addUsingAlias(CcShowPeer::INTRO_PLAYLIST_ID, $dbIntroPlaylistId, $comparison);
}
/**
* Filter the query on the override_outro_playlist column
*
* Example usage:
* <code>
* $query->filterByDbOverrideOutroPlaylist(true); // WHERE override_outro_playlist = true
* $query->filterByDbOverrideOutroPlaylist('yes'); // WHERE override_outro_playlist = true
* </code>
*
* @param boolean|string $dbOverrideOutroPlaylist The value to use as filter.
* Non-boolean arguments are converted using the following rules:
* * 1, '1', 'true', 'on', and 'yes' are converted to boolean true
* * 0, '0', 'false', 'off', and 'no' are converted to boolean false
* Check on string values is case insensitive (so 'FaLsE' is seen as 'false').
* @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL
*
* @return CcShowQuery The current query, for fluid interface
*/
public function filterByDbOverrideOutroPlaylist($dbOverrideOutroPlaylist = null, $comparison = null)
{
if (is_string($dbOverrideOutroPlaylist)) {
$dbOverrideOutroPlaylist = in_array(strtolower($dbOverrideOutroPlaylist), array('false', 'off', '-', 'no', 'n', '0', '')) ? false : true;
}
return $this->addUsingAlias(CcShowPeer::OVERRIDE_OUTRO_PLAYLIST, $dbOverrideOutroPlaylist, $comparison);
}
/**
* Filter the query on the outro_playlist_id column
*
* Example usage:
* <code>
* $query->filterByDbOutroPlaylistId(1234); // WHERE outro_playlist_id = 1234
* $query->filterByDbOutroPlaylistId(array(12, 34)); // WHERE outro_playlist_id IN (12, 34)
* $query->filterByDbOutroPlaylistId(array('min' => 12)); // WHERE outro_playlist_id >= 12
* $query->filterByDbOutroPlaylistId(array('max' => 12)); // WHERE outro_playlist_id <= 12
* </code>
*
* @see filterByCcPlaylistRelatedByDbOutroPlaylistId()
*
* @param mixed $dbOutroPlaylistId The value to use as filter.
* Use scalar values for equality.
* Use array values for in_array() equivalent.
* Use associative array('min' => $minValue, 'max' => $maxValue) for intervals.
* @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL
*
* @return CcShowQuery The current query, for fluid interface
*/
public function filterByDbOutroPlaylistId($dbOutroPlaylistId = null, $comparison = null)
{
if (is_array($dbOutroPlaylistId)) {
$useMinMax = false;
if (isset($dbOutroPlaylistId['min'])) {
$this->addUsingAlias(CcShowPeer::OUTRO_PLAYLIST_ID, $dbOutroPlaylistId['min'], Criteria::GREATER_EQUAL);
$useMinMax = true;
}
if (isset($dbOutroPlaylistId['max'])) {
$this->addUsingAlias(CcShowPeer::OUTRO_PLAYLIST_ID, $dbOutroPlaylistId['max'], Criteria::LESS_EQUAL);
$useMinMax = true;
}
if ($useMinMax) {
return $this;
}
if (null === $comparison) {
$comparison = Criteria::IN;
}
}
return $this->addUsingAlias(CcShowPeer::OUTRO_PLAYLIST_ID, $dbOutroPlaylistId, $comparison);
}
/**
* Filter the query by a related CcPlaylist object
*
@ -983,7 +817,7 @@ abstract class BaseCcShowQuery extends ModelCriteria
* @return CcShowQuery The current query, for fluid interface
* @throws PropelException - if the provided filter is invalid.
*/
public function filterByCcPlaylistRelatedByDbAutoPlaylistId($ccPlaylist, $comparison = null)
public function filterByCcPlaylist($ccPlaylist, $comparison = null)
{
if ($ccPlaylist instanceof CcPlaylist) {
return $this
@ -996,22 +830,22 @@ abstract class BaseCcShowQuery extends ModelCriteria
return $this
->addUsingAlias(CcShowPeer::AUTOPLAYLIST_ID, $ccPlaylist->toKeyValue('PrimaryKey', 'DbId'), $comparison);
} else {
throw new PropelException('filterByCcPlaylistRelatedByDbAutoPlaylistId() only accepts arguments of type CcPlaylist or PropelCollection');
throw new PropelException('filterByCcPlaylist() only accepts arguments of type CcPlaylist or PropelCollection');
}
}
/**
* Adds a JOIN clause to the query using the CcPlaylistRelatedByDbAutoPlaylistId relation
* Adds a JOIN clause to the query using the CcPlaylist relation
*
* @param string $relationAlias optional alias for the relation
* @param string $joinType Accepted values are null, 'left join', 'right join', 'inner join'
*
* @return CcShowQuery The current query, for fluid interface
*/
public function joinCcPlaylistRelatedByDbAutoPlaylistId($relationAlias = null, $joinType = Criteria::LEFT_JOIN)
public function joinCcPlaylist($relationAlias = null, $joinType = Criteria::LEFT_JOIN)
{
$tableMap = $this->getTableMap();
$relationMap = $tableMap->getRelation('CcPlaylistRelatedByDbAutoPlaylistId');
$relationMap = $tableMap->getRelation('CcPlaylist');
// create a ModelJoin object for this join
$join = new ModelJoin();
@ -1026,14 +860,14 @@ abstract class BaseCcShowQuery extends ModelCriteria
$this->addAlias($relationAlias, $relationMap->getRightTable()->getName());
$this->addJoinObject($join, $relationAlias);
} else {
$this->addJoinObject($join, 'CcPlaylistRelatedByDbAutoPlaylistId');
$this->addJoinObject($join, 'CcPlaylist');
}
return $this;
}
/**
* Use the CcPlaylistRelatedByDbAutoPlaylistId relation CcPlaylist object
* Use the CcPlaylist relation CcPlaylist object
*
* @see useQuery()
*
@ -1043,163 +877,11 @@ abstract class BaseCcShowQuery extends ModelCriteria
*
* @return CcPlaylistQuery A secondary query class using the current class as primary query
*/
public function useCcPlaylistRelatedByDbAutoPlaylistIdQuery($relationAlias = null, $joinType = Criteria::LEFT_JOIN)
public function useCcPlaylistQuery($relationAlias = null, $joinType = Criteria::LEFT_JOIN)
{
return $this
->joinCcPlaylistRelatedByDbAutoPlaylistId($relationAlias, $joinType)
->useQuery($relationAlias ? $relationAlias : 'CcPlaylistRelatedByDbAutoPlaylistId', 'CcPlaylistQuery');
}
/**
* Filter the query by a related CcPlaylist object
*
* @param CcPlaylist|PropelObjectCollection $ccPlaylist The related object(s) to use as filter
* @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL
*
* @return CcShowQuery The current query, for fluid interface
* @throws PropelException - if the provided filter is invalid.
*/
public function filterByCcPlaylistRelatedByDbIntroPlaylistId($ccPlaylist, $comparison = null)
{
if ($ccPlaylist instanceof CcPlaylist) {
return $this
->addUsingAlias(CcShowPeer::INTRO_PLAYLIST_ID, $ccPlaylist->getDbId(), $comparison);
} elseif ($ccPlaylist instanceof PropelObjectCollection) {
if (null === $comparison) {
$comparison = Criteria::IN;
}
return $this
->addUsingAlias(CcShowPeer::INTRO_PLAYLIST_ID, $ccPlaylist->toKeyValue('PrimaryKey', 'DbId'), $comparison);
} else {
throw new PropelException('filterByCcPlaylistRelatedByDbIntroPlaylistId() only accepts arguments of type CcPlaylist or PropelCollection');
}
}
/**
* Adds a JOIN clause to the query using the CcPlaylistRelatedByDbIntroPlaylistId relation
*
* @param string $relationAlias optional alias for the relation
* @param string $joinType Accepted values are null, 'left join', 'right join', 'inner join'
*
* @return CcShowQuery The current query, for fluid interface
*/
public function joinCcPlaylistRelatedByDbIntroPlaylistId($relationAlias = null, $joinType = Criteria::LEFT_JOIN)
{
$tableMap = $this->getTableMap();
$relationMap = $tableMap->getRelation('CcPlaylistRelatedByDbIntroPlaylistId');
// create a ModelJoin object for this join
$join = new ModelJoin();
$join->setJoinType($joinType);
$join->setRelationMap($relationMap, $this->useAliasInSQL ? $this->getModelAlias() : null, $relationAlias);
if ($previousJoin = $this->getPreviousJoin()) {
$join->setPreviousJoin($previousJoin);
}
// add the ModelJoin to the current object
if ($relationAlias) {
$this->addAlias($relationAlias, $relationMap->getRightTable()->getName());
$this->addJoinObject($join, $relationAlias);
} else {
$this->addJoinObject($join, 'CcPlaylistRelatedByDbIntroPlaylistId');
}
return $this;
}
/**
* Use the CcPlaylistRelatedByDbIntroPlaylistId relation CcPlaylist object
*
* @see useQuery()
*
* @param string $relationAlias optional alias for the relation,
* to be used as main alias in the secondary query
* @param string $joinType Accepted values are null, 'left join', 'right join', 'inner join'
*
* @return CcPlaylistQuery A secondary query class using the current class as primary query
*/
public function useCcPlaylistRelatedByDbIntroPlaylistIdQuery($relationAlias = null, $joinType = Criteria::LEFT_JOIN)
{
return $this
->joinCcPlaylistRelatedByDbIntroPlaylistId($relationAlias, $joinType)
->useQuery($relationAlias ? $relationAlias : 'CcPlaylistRelatedByDbIntroPlaylistId', 'CcPlaylistQuery');
}
/**
* Filter the query by a related CcPlaylist object
*
* @param CcPlaylist|PropelObjectCollection $ccPlaylist The related object(s) to use as filter
* @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL
*
* @return CcShowQuery The current query, for fluid interface
* @throws PropelException - if the provided filter is invalid.
*/
public function filterByCcPlaylistRelatedByDbOutroPlaylistId($ccPlaylist, $comparison = null)
{
if ($ccPlaylist instanceof CcPlaylist) {
return $this
->addUsingAlias(CcShowPeer::OUTRO_PLAYLIST_ID, $ccPlaylist->getDbId(), $comparison);
} elseif ($ccPlaylist instanceof PropelObjectCollection) {
if (null === $comparison) {
$comparison = Criteria::IN;
}
return $this
->addUsingAlias(CcShowPeer::OUTRO_PLAYLIST_ID, $ccPlaylist->toKeyValue('PrimaryKey', 'DbId'), $comparison);
} else {
throw new PropelException('filterByCcPlaylistRelatedByDbOutroPlaylistId() only accepts arguments of type CcPlaylist or PropelCollection');
}
}
/**
* Adds a JOIN clause to the query using the CcPlaylistRelatedByDbOutroPlaylistId relation
*
* @param string $relationAlias optional alias for the relation
* @param string $joinType Accepted values are null, 'left join', 'right join', 'inner join'
*
* @return CcShowQuery The current query, for fluid interface
*/
public function joinCcPlaylistRelatedByDbOutroPlaylistId($relationAlias = null, $joinType = Criteria::LEFT_JOIN)
{
$tableMap = $this->getTableMap();
$relationMap = $tableMap->getRelation('CcPlaylistRelatedByDbOutroPlaylistId');
// create a ModelJoin object for this join
$join = new ModelJoin();
$join->setJoinType($joinType);
$join->setRelationMap($relationMap, $this->useAliasInSQL ? $this->getModelAlias() : null, $relationAlias);
if ($previousJoin = $this->getPreviousJoin()) {
$join->setPreviousJoin($previousJoin);
}
// add the ModelJoin to the current object
if ($relationAlias) {
$this->addAlias($relationAlias, $relationMap->getRightTable()->getName());
$this->addJoinObject($join, $relationAlias);
} else {
$this->addJoinObject($join, 'CcPlaylistRelatedByDbOutroPlaylistId');
}
return $this;
}
/**
* Use the CcPlaylistRelatedByDbOutroPlaylistId relation CcPlaylist object
*
* @see useQuery()
*
* @param string $relationAlias optional alias for the relation,
* to be used as main alias in the secondary query
* @param string $joinType Accepted values are null, 'left join', 'right join', 'inner join'
*
* @return CcPlaylistQuery A secondary query class using the current class as primary query
*/
public function useCcPlaylistRelatedByDbOutroPlaylistIdQuery($relationAlias = null, $joinType = Criteria::LEFT_JOIN)
{
return $this
->joinCcPlaylistRelatedByDbOutroPlaylistId($relationAlias, $joinType)
->useQuery($relationAlias ? $relationAlias : 'CcPlaylistRelatedByDbOutroPlaylistId', 'CcPlaylistQuery');
->joinCcPlaylist($relationAlias, $joinType)
->useQuery($relationAlias ? $relationAlias : 'CcPlaylist', 'CcPlaylistQuery');
}
/**

View File

@ -164,8 +164,6 @@ class Application_Service_ShowFormService
'add_show_has_autoplaylist' => $this->ccShow->getDbHasAutoPlaylist() ? 1 : 0,
'add_show_autoplaylist_id' => $this->ccShow->getDbAutoPlaylistId(),
'add_show_autoplaylist_repeat' => $this->ccShow->getDbAutoPlaylistRepeat(),
'add_show_intro_playlist_id' => $this->ccShow->getDbOverrideIntroPlaylist() ? $this->ccShow->getDbIntroPlaylistId() : 0,
'add_show_outro_playlist_id' => $this->ccShow->getDbOverrideOutroPlaylist() ? $this->ccShow->getDbOutroPlaylistId() : 0,
]
);
}

View File

@ -1668,16 +1668,6 @@ SQL;
$ccShow->setDbAutoPlaylistId($showData['add_show_autoplaylist_id']);
}
$ccShow->setDbOverrideIntroPlaylist($showData['add_show_intro_playlist_id'] != 0);
if ($showData['add_show_intro_playlist_id'] != '') {
$ccShow->setDbIntroPlaylistId($showData['add_show_intro_playlist_id']);
}
$ccShow->setDbOverrideOutroPlaylist($showData['add_show_outro_playlist_id'] != 0);
if ($showData['add_show_outro_playlist_id'] != '') {
$ccShow->setDbOutroPlaylistId($showData['add_show_outro_playlist_id']);
}
// Here a user has edited a show and linked it.
// We need to grab the existing show instances ids and fill their content
// with the content from the show instance that was clicked on to edit the show.

View File

@ -19,7 +19,6 @@
</dt>
<dd>
<?php echo $this->element->getElement('add_show_autoplaylist_id') ?>
</dd>
</div>
<div id="add_show_autoplaylist_repeat">
<dt id="add_show_autoplaylist_repeat_label">
@ -31,26 +30,7 @@
<?php echo $this->element->getElement('add_show_autoplaylist_repeat') ?>
</dd>
</div>
<hr/>
<div id="add_show_override_intro_playlist_dropdown">
<dt id="add_show_intro_playlist_id">
<label for="add_show_intro_playlist_id" class="required">
<?php echo $this->element->getElement('add_show_intro_playlist_id')->getLabel() ?>
</label>
</dt>
<dd>
<?php echo $this->element->getElement('add_show_intro_playlist_id') ?>
</dd>
</div>
<div id="add_show_override_outro_playlist_dropdown">
<dt id="add_show_outro_playlist_id">
<label for="add_show_outro_playlist_id" class="required">
<?php echo $this->element->getElement('add_show_outro_playlist_id')->getLabel() ?>
</label>
</dt>
<dd>
<?php echo $this->element->getElement('add_show_outro_playlist_id') ?>
</dd>
</div>
</dl>
</fieldset>

View File

@ -18,7 +18,6 @@ $baseUrl = Config::getBasePath();
<div class="inner_track_editor_title" style="width: 100%;">
<h2 style="line-height: 26px !important;"><span class="title_obj_name"><?php echo ($this->title); ?></span></h2>
<h3 style="line-height: 2px !important;"><span class=""><?php echo ($this->artist_name); ?></span></h3>
<h5 style="line-height: 26px !important;"><span class=""><?php echo ($this->file_name) . " (" . $this->file_size . ")"; ?></span></h5>
</div>
</div>
</div>

View File

@ -122,19 +122,9 @@
<column name="has_autoplaylist" phpName="DbHasAutoPlaylist" type="BOOLEAN" required="true" defaultValue="false" />
<column name="autoplaylist_id" phpName="DbAutoPlaylistId" type="INTEGER" required="false" />
<column name="autoplaylist_repeat" phpName="DbAutoPlaylistRepeat" type="BOOLEAN" required="true" defaultValue="false" />
<column name="override_intro_playlist" phpName="DbOverrideIntroPlaylist" type="BOOLEAN" required="true" defaultValue="false" />
<column name="intro_playlist_id" phpName="DbIntroPlaylistId" type="INTEGER" required="false" />
<column name="override_outro_playlist" phpName="DbOverrideOutroPlaylist" type="BOOLEAN" required="true" defaultValue="false" />
<column name="outro_playlist_id" phpName="DbOutroPlaylistId" type="INTEGER" required="false" />
<foreign-key foreignTable="cc_playlist" name="cc_playlist_autoplaylist_fkey" onDelete="SETNULL">
<reference local="autoplaylist_id" foreign="id" />
</foreign-key>
<foreign-key foreignTable="cc_playlist" name="cc_playlist_intro_playlist_fkey" onDelete="SETNULL">
<reference local="intro_playlist_id" foreign="id" />
</foreign-key>
<foreign-key foreignTable="cc_playlist" name="cc_playlist_outro_playlist_fkey" onDelete="SETNULL">
<reference local="outro_playlist_id" foreign="id" />
</foreign-key>
</table>
<table name="cc_show_instances" phpName="CcShowInstances">
<column name="id" phpName="DbId" type="INTEGER" primaryKey="true" autoIncrement="true" required="true" />

216
legacy/composer.lock generated
View File

@ -62,24 +62,24 @@
},
{
"name": "composer/semver",
"version": "3.4.3",
"version": "3.4.0",
"source": {
"type": "git",
"url": "https://github.com/composer/semver.git",
"reference": "4313d26ada5e0c4edfbd1dc481a92ff7bff91f12"
"reference": "35e8d0af4486141bc745f23a29cc2091eb624a32"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/composer/semver/zipball/4313d26ada5e0c4edfbd1dc481a92ff7bff91f12",
"reference": "4313d26ada5e0c4edfbd1dc481a92ff7bff91f12",
"url": "https://api.github.com/repos/composer/semver/zipball/35e8d0af4486141bc745f23a29cc2091eb624a32",
"reference": "35e8d0af4486141bc745f23a29cc2091eb624a32",
"shasum": ""
},
"require": {
"php": "^5.3.2 || ^7.0 || ^8.0"
},
"require-dev": {
"phpstan/phpstan": "^1.11",
"symfony/phpunit-bridge": "^3 || ^7"
"phpstan/phpstan": "^1.4",
"symfony/phpunit-bridge": "^4.2 || ^5"
},
"type": "library",
"extra": {
@ -123,7 +123,7 @@
"support": {
"irc": "ircs://irc.libera.chat:6697/composer",
"issues": "https://github.com/composer/semver/issues",
"source": "https://github.com/composer/semver/tree/3.4.3"
"source": "https://github.com/composer/semver/tree/3.4.0"
},
"funding": [
{
@ -139,7 +139,7 @@
"type": "tidelift"
}
],
"time": "2024-09-19T14:15:21+00:00"
"time": "2023-08-31T09:50:34+00:00"
},
{
"name": "james-heinrich/getid3",
@ -760,16 +760,16 @@
},
{
"name": "php-amqplib/php-amqplib",
"version": "v3.7.2",
"version": "v3.6.2",
"source": {
"type": "git",
"url": "https://github.com/php-amqplib/php-amqplib.git",
"reference": "738a73eb0019b6c99d9bc25d7a0c0dd8f56a5199"
"reference": "cb514530ce45a6d2f636be5196010c47c3bcf6e0"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/php-amqplib/php-amqplib/zipball/738a73eb0019b6c99d9bc25d7a0c0dd8f56a5199",
"reference": "738a73eb0019b6c99d9bc25d7a0c0dd8f56a5199",
"url": "https://api.github.com/repos/php-amqplib/php-amqplib/zipball/cb514530ce45a6d2f636be5196010c47c3bcf6e0",
"reference": "cb514530ce45a6d2f636be5196010c47c3bcf6e0",
"shasum": ""
},
"require": {
@ -835,26 +835,26 @@
],
"support": {
"issues": "https://github.com/php-amqplib/php-amqplib/issues",
"source": "https://github.com/php-amqplib/php-amqplib/tree/v3.7.2"
"source": "https://github.com/php-amqplib/php-amqplib/tree/v3.6.2"
},
"time": "2024-11-21T09:21:41+00:00"
"time": "2024-04-15T18:31:22+00:00"
},
{
"name": "phpseclib/phpseclib",
"version": "3.0.42",
"version": "3.0.37",
"source": {
"type": "git",
"url": "https://github.com/phpseclib/phpseclib.git",
"reference": "db92f1b1987b12b13f248fe76c3a52cadb67bb98"
"reference": "cfa2013d0f68c062055180dd4328cc8b9d1f30b8"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/phpseclib/phpseclib/zipball/db92f1b1987b12b13f248fe76c3a52cadb67bb98",
"reference": "db92f1b1987b12b13f248fe76c3a52cadb67bb98",
"url": "https://api.github.com/repos/phpseclib/phpseclib/zipball/cfa2013d0f68c062055180dd4328cc8b9d1f30b8",
"reference": "cfa2013d0f68c062055180dd4328cc8b9d1f30b8",
"shasum": ""
},
"require": {
"paragonie/constant_time_encoding": "^1|^2|^3",
"paragonie/constant_time_encoding": "^1|^2",
"paragonie/random_compat": "^1.4|^2.0|^9.99.99",
"php": ">=5.6.1"
},
@ -931,7 +931,7 @@
],
"support": {
"issues": "https://github.com/phpseclib/phpseclib/issues",
"source": "https://github.com/phpseclib/phpseclib/tree/3.0.42"
"source": "https://github.com/phpseclib/phpseclib/tree/3.0.37"
},
"funding": [
{
@ -947,7 +947,7 @@
"type": "tidelift"
}
],
"time": "2024-09-16T03:06:04+00:00"
"time": "2024-03-03T02:14:58+00:00"
},
{
"name": "psr/http-message",
@ -1004,16 +1004,16 @@
},
{
"name": "simplepie/simplepie",
"version": "1.8.1",
"version": "1.8.0",
"source": {
"type": "git",
"url": "https://github.com/simplepie/simplepie.git",
"reference": "a567b8ab9b6145a23e6a9ec2b6b74f56d52f7ad1"
"reference": "65b095d87bc00898d8fa7737bdbcda93a3fbcc55"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/simplepie/simplepie/zipball/a567b8ab9b6145a23e6a9ec2b6b74f56d52f7ad1",
"reference": "a567b8ab9b6145a23e6a9ec2b6b74f56d52f7ad1",
"url": "https://api.github.com/repos/simplepie/simplepie/zipball/65b095d87bc00898d8fa7737bdbcda93a3fbcc55",
"reference": "65b095d87bc00898d8fa7737bdbcda93a3fbcc55",
"shasum": ""
},
"require": {
@ -1074,22 +1074,22 @@
],
"support": {
"issues": "https://github.com/simplepie/simplepie/issues",
"source": "https://github.com/simplepie/simplepie/tree/1.8.1"
"source": "https://github.com/simplepie/simplepie/tree/1.8.0"
},
"time": "2024-11-22T16:33:20+00:00"
"time": "2023-01-20T08:37:35+00:00"
},
{
"name": "symfony/config",
"version": "v5.4.46",
"version": "v5.4.40",
"source": {
"type": "git",
"url": "https://github.com/symfony/config.git",
"reference": "977c88a02d7d3f16904a81907531b19666a08e78"
"reference": "d4e1db78421163b98dd9971d247fd0df4a57ee5e"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/symfony/config/zipball/977c88a02d7d3f16904a81907531b19666a08e78",
"reference": "977c88a02d7d3f16904a81907531b19666a08e78",
"url": "https://api.github.com/repos/symfony/config/zipball/d4e1db78421163b98dd9971d247fd0df4a57ee5e",
"reference": "d4e1db78421163b98dd9971d247fd0df4a57ee5e",
"shasum": ""
},
"require": {
@ -1139,7 +1139,7 @@
"description": "Helps you find, load, combine, autofill and validate configuration values of any kind",
"homepage": "https://symfony.com",
"support": {
"source": "https://github.com/symfony/config/tree/v5.4.46"
"source": "https://github.com/symfony/config/tree/v5.4.40"
},
"funding": [
{
@ -1155,20 +1155,20 @@
"type": "tidelift"
}
],
"time": "2024-10-30T07:58:02+00:00"
"time": "2024-05-31T14:33:22+00:00"
},
{
"name": "symfony/deprecation-contracts",
"version": "v2.5.4",
"version": "v2.5.3",
"source": {
"type": "git",
"url": "https://github.com/symfony/deprecation-contracts.git",
"reference": "605389f2a7e5625f273b53960dc46aeaf9c62918"
"reference": "80d075412b557d41002320b96a096ca65aa2c98d"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/symfony/deprecation-contracts/zipball/605389f2a7e5625f273b53960dc46aeaf9c62918",
"reference": "605389f2a7e5625f273b53960dc46aeaf9c62918",
"url": "https://api.github.com/repos/symfony/deprecation-contracts/zipball/80d075412b557d41002320b96a096ca65aa2c98d",
"reference": "80d075412b557d41002320b96a096ca65aa2c98d",
"shasum": ""
},
"require": {
@ -1206,7 +1206,7 @@
"description": "A generic function and convention to trigger deprecation notices",
"homepage": "https://symfony.com",
"support": {
"source": "https://github.com/symfony/deprecation-contracts/tree/v2.5.4"
"source": "https://github.com/symfony/deprecation-contracts/tree/v2.5.3"
},
"funding": [
{
@ -1222,20 +1222,20 @@
"type": "tidelift"
}
],
"time": "2024-09-25T14:11:13+00:00"
"time": "2023-01-24T14:02:46+00:00"
},
{
"name": "symfony/filesystem",
"version": "v5.4.45",
"version": "v5.4.40",
"source": {
"type": "git",
"url": "https://github.com/symfony/filesystem.git",
"reference": "57c8294ed37d4a055b77057827c67f9558c95c54"
"reference": "26dd9912df6940810ea00f8f53ad48d6a3424995"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/symfony/filesystem/zipball/57c8294ed37d4a055b77057827c67f9558c95c54",
"reference": "57c8294ed37d4a055b77057827c67f9558c95c54",
"url": "https://api.github.com/repos/symfony/filesystem/zipball/26dd9912df6940810ea00f8f53ad48d6a3424995",
"reference": "26dd9912df6940810ea00f8f53ad48d6a3424995",
"shasum": ""
},
"require": {
@ -1273,7 +1273,7 @@
"description": "Provides basic utilities for the filesystem",
"homepage": "https://symfony.com",
"support": {
"source": "https://github.com/symfony/filesystem/tree/v5.4.45"
"source": "https://github.com/symfony/filesystem/tree/v5.4.40"
},
"funding": [
{
@ -1289,24 +1289,24 @@
"type": "tidelift"
}
],
"time": "2024-10-22T13:05:35+00:00"
"time": "2024-05-31T14:33:22+00:00"
},
{
"name": "symfony/polyfill-ctype",
"version": "v1.31.0",
"version": "v1.29.0",
"source": {
"type": "git",
"url": "https://github.com/symfony/polyfill-ctype.git",
"reference": "a3cc8b044a6ea513310cbd48ef7333b384945638"
"reference": "ef4d7e442ca910c4764bce785146269b30cb5fc4"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/symfony/polyfill-ctype/zipball/a3cc8b044a6ea513310cbd48ef7333b384945638",
"reference": "a3cc8b044a6ea513310cbd48ef7333b384945638",
"url": "https://api.github.com/repos/symfony/polyfill-ctype/zipball/ef4d7e442ca910c4764bce785146269b30cb5fc4",
"reference": "ef4d7e442ca910c4764bce785146269b30cb5fc4",
"shasum": ""
},
"require": {
"php": ">=7.2"
"php": ">=7.1"
},
"provide": {
"ext-ctype": "*"
@ -1352,7 +1352,7 @@
"portable"
],
"support": {
"source": "https://github.com/symfony/polyfill-ctype/tree/v1.31.0"
"source": "https://github.com/symfony/polyfill-ctype/tree/v1.29.0"
},
"funding": [
{
@ -1368,24 +1368,24 @@
"type": "tidelift"
}
],
"time": "2024-09-09T11:45:10+00:00"
"time": "2024-01-29T20:11:03+00:00"
},
{
"name": "symfony/polyfill-mbstring",
"version": "v1.31.0",
"version": "v1.29.0",
"source": {
"type": "git",
"url": "https://github.com/symfony/polyfill-mbstring.git",
"reference": "85181ba99b2345b0ef10ce42ecac37612d9fd341"
"reference": "9773676c8a1bb1f8d4340a62efe641cf76eda7ec"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/symfony/polyfill-mbstring/zipball/85181ba99b2345b0ef10ce42ecac37612d9fd341",
"reference": "85181ba99b2345b0ef10ce42ecac37612d9fd341",
"url": "https://api.github.com/repos/symfony/polyfill-mbstring/zipball/9773676c8a1bb1f8d4340a62efe641cf76eda7ec",
"reference": "9773676c8a1bb1f8d4340a62efe641cf76eda7ec",
"shasum": ""
},
"require": {
"php": ">=7.2"
"php": ">=7.1"
},
"provide": {
"ext-mbstring": "*"
@ -1432,7 +1432,7 @@
"shim"
],
"support": {
"source": "https://github.com/symfony/polyfill-mbstring/tree/v1.31.0"
"source": "https://github.com/symfony/polyfill-mbstring/tree/v1.29.0"
},
"funding": [
{
@ -1448,24 +1448,24 @@
"type": "tidelift"
}
],
"time": "2024-09-09T11:45:10+00:00"
"time": "2024-01-29T20:11:03+00:00"
},
{
"name": "symfony/polyfill-php80",
"version": "v1.31.0",
"version": "v1.29.0",
"source": {
"type": "git",
"url": "https://github.com/symfony/polyfill-php80.git",
"reference": "60328e362d4c2c802a54fcbf04f9d3fb892b4cf8"
"reference": "87b68208d5c1188808dd7839ee1e6c8ec3b02f1b"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/symfony/polyfill-php80/zipball/60328e362d4c2c802a54fcbf04f9d3fb892b4cf8",
"reference": "60328e362d4c2c802a54fcbf04f9d3fb892b4cf8",
"url": "https://api.github.com/repos/symfony/polyfill-php80/zipball/87b68208d5c1188808dd7839ee1e6c8ec3b02f1b",
"reference": "87b68208d5c1188808dd7839ee1e6c8ec3b02f1b",
"shasum": ""
},
"require": {
"php": ">=7.2"
"php": ">=7.1"
},
"type": "library",
"extra": {
@ -1512,7 +1512,7 @@
"shim"
],
"support": {
"source": "https://github.com/symfony/polyfill-php80/tree/v1.31.0"
"source": "https://github.com/symfony/polyfill-php80/tree/v1.29.0"
},
"funding": [
{
@ -1528,24 +1528,24 @@
"type": "tidelift"
}
],
"time": "2024-09-09T11:45:10+00:00"
"time": "2024-01-29T20:11:03+00:00"
},
{
"name": "symfony/polyfill-php81",
"version": "v1.31.0",
"version": "v1.29.0",
"source": {
"type": "git",
"url": "https://github.com/symfony/polyfill-php81.git",
"reference": "4a4cfc2d253c21a5ad0e53071df248ed48c6ce5c"
"reference": "c565ad1e63f30e7477fc40738343c62b40bc672d"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/symfony/polyfill-php81/zipball/4a4cfc2d253c21a5ad0e53071df248ed48c6ce5c",
"reference": "4a4cfc2d253c21a5ad0e53071df248ed48c6ce5c",
"url": "https://api.github.com/repos/symfony/polyfill-php81/zipball/c565ad1e63f30e7477fc40738343c62b40bc672d",
"reference": "c565ad1e63f30e7477fc40738343c62b40bc672d",
"shasum": ""
},
"require": {
"php": ">=7.2"
"php": ">=7.1"
},
"type": "library",
"extra": {
@ -1588,7 +1588,7 @@
"shim"
],
"support": {
"source": "https://github.com/symfony/polyfill-php81/tree/v1.31.0"
"source": "https://github.com/symfony/polyfill-php81/tree/v1.29.0"
},
"funding": [
{
@ -1604,7 +1604,7 @@
"type": "tidelift"
}
],
"time": "2024-09-09T11:45:10+00:00"
"time": "2024-01-29T20:11:03+00:00"
},
{
"name": "zf1s/zend-acl",
@ -3440,16 +3440,16 @@
},
{
"name": "myclabs/deep-copy",
"version": "1.12.1",
"version": "1.12.0",
"source": {
"type": "git",
"url": "https://github.com/myclabs/DeepCopy.git",
"reference": "123267b2c49fbf30d78a7b2d333f6be754b94845"
"reference": "3a6b9a42cd8f8771bd4295d13e1423fa7f3d942c"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/myclabs/DeepCopy/zipball/123267b2c49fbf30d78a7b2d333f6be754b94845",
"reference": "123267b2c49fbf30d78a7b2d333f6be754b94845",
"url": "https://api.github.com/repos/myclabs/DeepCopy/zipball/3a6b9a42cd8f8771bd4295d13e1423fa7f3d942c",
"reference": "3a6b9a42cd8f8771bd4295d13e1423fa7f3d942c",
"shasum": ""
},
"require": {
@ -3488,7 +3488,7 @@
],
"support": {
"issues": "https://github.com/myclabs/DeepCopy/issues",
"source": "https://github.com/myclabs/DeepCopy/tree/1.12.1"
"source": "https://github.com/myclabs/DeepCopy/tree/1.12.0"
},
"funding": [
{
@ -3496,7 +3496,7 @@
"type": "tidelift"
}
],
"time": "2024-11-08T17:47:46+00:00"
"time": "2024-06-12T14:39:25+00:00"
},
{
"name": "phpdocumentor/reflection-common",
@ -3553,16 +3553,16 @@
},
{
"name": "phpdocumentor/reflection-docblock",
"version": "5.6.0",
"version": "5.4.1",
"source": {
"type": "git",
"url": "https://github.com/phpDocumentor/ReflectionDocBlock.git",
"reference": "f3558a4c23426d12bffeaab463f8a8d8b681193c"
"reference": "9d07b3f7fdcf5efec5d1609cba3c19c5ea2bdc9c"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/phpDocumentor/ReflectionDocBlock/zipball/f3558a4c23426d12bffeaab463f8a8d8b681193c",
"reference": "f3558a4c23426d12bffeaab463f8a8d8b681193c",
"url": "https://api.github.com/repos/phpDocumentor/ReflectionDocBlock/zipball/9d07b3f7fdcf5efec5d1609cba3c19c5ea2bdc9c",
"reference": "9d07b3f7fdcf5efec5d1609cba3c19c5ea2bdc9c",
"shasum": ""
},
"require": {
@ -3571,17 +3571,17 @@
"php": "^7.4 || ^8.0",
"phpdocumentor/reflection-common": "^2.2",
"phpdocumentor/type-resolver": "^1.7",
"phpstan/phpdoc-parser": "^1.7|^2.0",
"phpstan/phpdoc-parser": "^1.7",
"webmozart/assert": "^1.9.1"
},
"require-dev": {
"mockery/mockery": "~1.3.5 || ~1.6.0",
"mockery/mockery": "~1.3.5",
"phpstan/extension-installer": "^1.1",
"phpstan/phpstan": "^1.8",
"phpstan/phpstan-mockery": "^1.1",
"phpstan/phpstan-webmozart-assert": "^1.2",
"phpunit/phpunit": "^9.5",
"psalm/phar": "^5.26"
"vimeo/psalm": "^5.13"
},
"type": "library",
"extra": {
@ -3611,29 +3611,29 @@
"description": "With this component, a library can provide support for annotations via DocBlocks or otherwise retrieve information that is embedded in a DocBlock.",
"support": {
"issues": "https://github.com/phpDocumentor/ReflectionDocBlock/issues",
"source": "https://github.com/phpDocumentor/ReflectionDocBlock/tree/5.6.0"
"source": "https://github.com/phpDocumentor/ReflectionDocBlock/tree/5.4.1"
},
"time": "2024-11-12T11:25:25+00:00"
"time": "2024-05-21T05:55:05+00:00"
},
{
"name": "phpdocumentor/type-resolver",
"version": "1.10.0",
"version": "1.8.2",
"source": {
"type": "git",
"url": "https://github.com/phpDocumentor/TypeResolver.git",
"reference": "679e3ce485b99e84c775d28e2e96fade9a7fb50a"
"reference": "153ae662783729388a584b4361f2545e4d841e3c"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/phpDocumentor/TypeResolver/zipball/679e3ce485b99e84c775d28e2e96fade9a7fb50a",
"reference": "679e3ce485b99e84c775d28e2e96fade9a7fb50a",
"url": "https://api.github.com/repos/phpDocumentor/TypeResolver/zipball/153ae662783729388a584b4361f2545e4d841e3c",
"reference": "153ae662783729388a584b4361f2545e4d841e3c",
"shasum": ""
},
"require": {
"doctrine/deprecations": "^1.0",
"php": "^7.3 || ^8.0",
"phpdocumentor/reflection-common": "^2.0",
"phpstan/phpdoc-parser": "^1.18|^2.0"
"phpstan/phpdoc-parser": "^1.13"
},
"require-dev": {
"ext-tokenizer": "*",
@ -3669,9 +3669,9 @@
"description": "A PSR-5 based resolver of Class names, Types and Structural Element Names",
"support": {
"issues": "https://github.com/phpDocumentor/TypeResolver/issues",
"source": "https://github.com/phpDocumentor/TypeResolver/tree/1.10.0"
"source": "https://github.com/phpDocumentor/TypeResolver/tree/1.8.2"
},
"time": "2024-11-09T15:12:26+00:00"
"time": "2024-02-23T11:10:43+00:00"
},
{
"name": "phpspec/prophecy",
@ -3742,30 +3742,30 @@
},
{
"name": "phpstan/phpdoc-parser",
"version": "2.0.0",
"version": "1.29.1",
"source": {
"type": "git",
"url": "https://github.com/phpstan/phpdoc-parser.git",
"reference": "c00d78fb6b29658347f9d37ebe104bffadf36299"
"reference": "fcaefacf2d5c417e928405b71b400d4ce10daaf4"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/phpstan/phpdoc-parser/zipball/c00d78fb6b29658347f9d37ebe104bffadf36299",
"reference": "c00d78fb6b29658347f9d37ebe104bffadf36299",
"url": "https://api.github.com/repos/phpstan/phpdoc-parser/zipball/fcaefacf2d5c417e928405b71b400d4ce10daaf4",
"reference": "fcaefacf2d5c417e928405b71b400d4ce10daaf4",
"shasum": ""
},
"require": {
"php": "^7.4 || ^8.0"
"php": "^7.2 || ^8.0"
},
"require-dev": {
"doctrine/annotations": "^2.0",
"nikic/php-parser": "^5.3.0",
"nikic/php-parser": "^4.15",
"php-parallel-lint/php-parallel-lint": "^1.2",
"phpstan/extension-installer": "^1.0",
"phpstan/phpstan": "^2.0",
"phpstan/phpstan-phpunit": "^2.0",
"phpstan/phpstan-strict-rules": "^2.0",
"phpunit/phpunit": "^9.6",
"phpstan/phpstan": "^1.5",
"phpstan/phpstan-phpunit": "^1.1",
"phpstan/phpstan-strict-rules": "^1.0",
"phpunit/phpunit": "^9.5",
"symfony/process": "^5.2"
},
"type": "library",
@ -3783,9 +3783,9 @@
"description": "PHPDoc parser with support for nullable, intersection and generic types",
"support": {
"issues": "https://github.com/phpstan/phpdoc-parser/issues",
"source": "https://github.com/phpstan/phpdoc-parser/tree/2.0.0"
"source": "https://github.com/phpstan/phpdoc-parser/tree/1.29.1"
},
"time": "2024-10-13T11:29:49+00:00"
"time": "2024-05-31T08:52:43+00:00"
},
{
"name": "phpunit/dbunit",
@ -5079,6 +5079,6 @@
"platform": {
"php": "^7.4"
},
"platform-dev": {},
"platform-dev": [],
"plugin-api-version": "2.6.0"
}

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

@ -7,7 +7,6 @@ en_GB.UTF-8 UTF-8
en_US.UTF-8 UTF-8
es_ES.UTF-8 UTF-8
fr_FR.UTF-8 UTF-8
nb_NO.UTF-8 UTF-8
hr_HR.UTF-8 UTF-8
hu_HU.UTF-8 UTF-8
it_IT.UTF-8 UTF-8

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

@ -27,7 +27,7 @@ $(document).ready(function () {
[], //array of songs will be filled with below's json call
{
swfPath: baseUrl + "js/jplayer",
supplied: "oga, mp3, m4v, m4a, wav, flac",
supplied: "oga, mp3, m4v, m4a, wav",
size: {
width: "0px",
height: "0px",
@ -161,12 +161,6 @@ function buildplaylist(p_url, p_playIndex) {
artist: data[index]["element_artist"],
wav: data[index]["uri"],
};
} else if (data[index]["element_flac"] != undefined) {
media = {
title: data[index]["element_title"],
artist: data[index]["element_artist"],
flac: data[index]["uri"],
};
} else {
// skip this track since it's not supported
console.log("continue");
@ -183,8 +177,6 @@ function buildplaylist(p_url, p_playIndex) {
key = "m4a";
} else if (mime.search(/wav/i) > 0) {
key = "wav";
} else if (mime.search(/flac/i) > 0) {
key = "flac";
}
if (key) {
@ -251,8 +243,6 @@ function playOne(uri, mime) {
key = "m4a";
} else if (mime.search(/wav/i) > 0) {
key = "wav";
} else if (mime.search(/flac/i) > 0) {
key = "flac";
}
if (key) {

View File

@ -55,7 +55,6 @@ var AIRTIME = (function (AIRTIME) {
replay_gain: "n",
artwork: "s",
track_type_id: "tt",
filepath: "s",
};
if (AIRTIME.library === undefined) {
@ -844,13 +843,6 @@ var AIRTIME = (function (AIRTIME) {
sClass: "library_year",
sWidth: "60px",
},
/* File Name */ {
sTitle: $.i18n._("File Name"),
mDataProp: "filepath",
bVisible: false,
sClass: "library_file",
sWidth: "170px",
},
];
if (onDashboard) {
@ -866,7 +858,7 @@ var AIRTIME = (function (AIRTIME) {
);
}
var colExclude = onDashboard ? [0, 1, 2, 3, 35] : [0, 1, 2];
var colExclude = onDashboard ? [0, 1, 2, 3, 34] : [0, 1, 2];
/* ############################################
DATATABLES

View File

@ -1,23 +0,0 @@
{
"sEmptyTable": "No data available in table",
"sInfo": "Showing _START_ to _END_ of _TOTAL_ entries",
"sInfoEmpty": "Showing 0 to 0 of 0 entries",
"sInfoFiltered": "(filtered from _MAX_ total entries)",
"sInfoPostFix": "",
"sInfoThousands": ",",
"sLengthMenu": "Show _MENU_",
"sLoadingRecords": "Loading...",
"sProcessing": "Processing...",
"sSearch": "",
"sZeroRecords": "No matching records found",
"oPaginate": {
"sFirst": "First",
"sLast": "Last",
"sNext": "Next",
"sPrevious": "Previous"
},
"oAria": {
"sSortAscending": ": activate to sort column ascending",
"sSortDescending": ": activate to sort column descending"
}
}

View File

@ -17,29 +17,21 @@ Compress with: http://jscompress.com/
csvEncoding = 'data:text/csv;charset=utf-8,',
csvOutput = "",
csvRows = [],
BREAK = '\r\n', // Use CRLF for line breaks
BREAK = '\r\n',
DELIMITER = ',',
FILENAME = "export.csv";
FILENAME = "export.csv";
// Get and Write the headers
csvHeaders = Object.keys(csvData[0]);
csvOutput += csvHeaders.join(DELIMITER) + BREAK;
csvOutput += csvHeaders.join(',') + BREAK;
for (var i = 0; i < csvData.length; i++) {
var rowElements = [];
for (var k = 0; k < csvHeaders.length; k++) {
var cell = csvData[i][csvHeaders[k]];
if (typeof cell === 'string') {
if (cell.includes('"')) {
cell = '"' + cell.replace(/"/g, '""') + '"'; // Escape double quotes by doubling them
} else if (cell.includes(DELIMITER) || cell.includes('\r') || cell.includes('\n')) {
cell = '"' + cell + '"'; // Enclose in double quotes if it contains commas, CR, or LF
}
}
rowElements.push(cell);
} // Write the row array based on the headers
csvRows.push(rowElements.join(DELIMITER));
}
var rowElements = [];
for(var k = 0; k < csvHeaders.length; k++) {
rowElements.push(csvData[i][csvHeaders[k]]);
} // Write the row array based on the headers
csvRows.push(rowElements.join(DELIMITER));
}
csvOutput += csvRows.join(BREAK);

View File

@ -1,27 +0,0 @@
// Norwegian Bokmål (Norway)
plupload.addI18n({
'Select files' : 'Select files',
'Add files to the upload queue and click the start button.' : 'Add files to the upload queue and click the start button.',
'Filename' : 'Filename',
'Status' : 'Status',
'Size' : 'Size',
'Add files' : 'Add files',
'Stop current upload' : 'Stop current upload',
'Start uploading queue' : 'Start uploading queue',
'Uploaded %d/%d files': 'Uploaded %d/%d files',
'N/A' : 'N/A',
'Drag files here.' : 'Drag files here.',
'File extension error.': 'File extension error.',
'File size error.': 'File size error.',
'Init error.': 'Init error.',
'HTTP Error.': 'HTTP Error.',
'Security error.': 'Security error.',
'Generic error.': 'Generic error.',
'IO error.': 'IO error.',
'Stop Upload': 'Stop Upload',
'Add Files': 'Add Files',
'Start Upload': 'Start Upload',
'Start upload': 'Start upload',
'%d files queued': '%d files queued',
"Error: Invalid file extension: " : $.i18n._("Error: Invalid file extension: ")
});

View File

@ -16,10 +16,6 @@ cc_show:
has_autoplaylist: false
autoplaylist_id: null
autoplaylist_repeat: false
override_intro_playlist: false
intro_playlist_id: null
override_outro_playlist: false
outro_playlist_id: null
cc_show_days:
- id: "1"
first_show: "2014-01-05"

View File

@ -77,10 +77,6 @@ class ShowServiceDbTest extends Zend_Test_PHPUnit_DatabaseTestCase
'add_show_has_autoplaylist' => 0,
'add_show_autoplaylist_id' => null,
'add_show_autoplaylist_repeat' => 0,
'add_show_override_intro_playlist' => 0,
'add_show_intro_playlist_id' => null,
'add_show_override_outro_playlist' => 0,
'add_show_outro_playlist_id' => null,
];
$showService->setCcShow($data);

View File

@ -16,7 +16,3 @@ cc_show:
has_autoplaylist: false
autoplaylist_id: null
autoplaylist_repeat: false
override_intro_playlist: false
intro_playlist_id: null
override_outro_playlist: false
outro_playlist_id: null

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