mirror of
https://github.com/ElvishArtisan/rivendell.git
synced 2025-05-13 23:49:07 +02:00
Merge remote-tracking branch 'upstream/master' into rdlibrary
Conflicts: ChangeLog
This commit is contained in:
commit
edd01a1ae4
37
ChangeLog
37
ChangeLog
@ -18611,3 +18611,40 @@
|
||||
2019-04-29 Patrick Linstruth <patrick@deltecent.com>
|
||||
* Added second schedule code filter to rdlibrary(1).
|
||||
* Change rdlibrary(1) minimum width from 850 to 975.
|
||||
2019-04-29 Fred Gleason <fredg@paravelsystems.com>
|
||||
* Fixed a typo in 'RDLogPlay::move()'.
|
||||
2019-04-29 Fred Gleason <fredg@paravelsystems.com>
|
||||
* Added a 'STACK_SCHED_CODES' table to the database.
|
||||
* Dropped the 'STACK_LINES.SCHED_CODES' field from the database.
|
||||
* Incremented the database version to 308.
|
||||
* Renamed the 'SchedCartList' class to 'RDSchedCartList' and
|
||||
refactored it to be idiomatic Qt.
|
||||
* Renamed the 'SchedRulesList' class to 'RDSchedRulesList'.
|
||||
2019-04-29 Fred Gleason <fredg@paravelsystems.com>
|
||||
* Added code to normalize the case of group names in
|
||||
'RDGroup::RDGroup()'.
|
||||
2019-04-29 Fred Gleason <fredg@paravelsystems.com>
|
||||
* Added code to normalize the case of log names in
|
||||
'RDLog::RDLog()'.
|
||||
2019-04-30 Fred Gleason <fredg@paravelsystems.com>
|
||||
* Added an appendix containing the 'GNU Free Documentation License'
|
||||
to the Operations Guide.
|
||||
2019-05-01 Fred Gleason <fredg@paravelsystems.com>
|
||||
* Fixed bugs in rd_import(7) that caused corruption of multi-byte
|
||||
UTF-8 characters.
|
||||
2019-05-01 Fred Gleason <fredg@paravelsystems.com>
|
||||
* Fixed bugs in the 'Import' Web API call that caused import of
|
||||
filenames containing multibyte UTF-8 characters to fail.
|
||||
2019-05-02 Fred Gleason <fredg@paravelsystems.com>
|
||||
* Modified the 'rivendell-pypad' RPM package always to use
|
||||
Python 3.6.
|
||||
2019-05-02 Fred Gleason <fredg@paravelsystems.com>
|
||||
* Updated the package version to 3.0.0rc01.
|
||||
2019-05-03 Fred Gleason <fredg@paravelsystems.com>
|
||||
* Fixed a regression that broke audio importation in rdimport(1).
|
||||
2019-05-03 Fred Gleason <fredg@paravelsystems.com>
|
||||
* Cleaned up a compiler warning for rdimport(1).
|
||||
2019-05-03 Fred Gleason <fredg@paravelsystems.com>
|
||||
* Cleaned up a compiler warning for 'RDMacroEvent'.
|
||||
2019-05-03 Fred Gleason <fredg@paravelsystems.com>
|
||||
* Updated the package version to 3.0.0rc02.
|
||||
|
47
NEWS
47
NEWS
@ -1,5 +1,52 @@
|
||||
The NEWS file for the Rivendell package.
|
||||
|
||||
-------------------------------------------------------------------------------
|
||||
v3.0.0rc02 -- 5/3/2019
|
||||
|
||||
Third release candidate for v3.x.
|
||||
|
||||
Please see the file 'UPGRADING' for important information.
|
||||
|
||||
Changes:
|
||||
RDImport Bugfix. Fixed a regression that broke audio importation
|
||||
in rdimport(1)
|
||||
|
||||
Database Update:
|
||||
This version of Rivendell uses database schema version 308, and will
|
||||
automatically upgrade any earlier versions. To see the current schema
|
||||
version prior to upgrade, see RDAdmin->SystemInfo.
|
||||
|
||||
Be sure to run 'rddbmgr --modify' (as root) immediately after upgrading
|
||||
to allow any necessary changes to the database schema to be applied.
|
||||
-------------------------------------------------------------------------------
|
||||
v3.0.0rc01 -- 5/2/2019
|
||||
|
||||
Second release candidate for v3.x.
|
||||
|
||||
Please see the file 'UPGRADING' for important information.
|
||||
|
||||
Changes:
|
||||
SQL Cleanups. Cleaned up date-time handling in SQL calls to allow
|
||||
proper operation with current MySQL/MariaDB releases.
|
||||
|
||||
RDLibrary Reports. Fixed bugs in the 'Cart Data Dump (CSV)' report and
|
||||
removed the 'Cart Data Dump (fixed width)' report.
|
||||
|
||||
Licensing. Changed the licensing of the Rivendell Operations Guide to
|
||||
be the GNU Free Documentation License.
|
||||
|
||||
Python Integration. Modified the 'rivendell-pypad' RPM package to always
|
||||
use Python 3.6.
|
||||
|
||||
Various other bugfixes. See the 'ChangeLog' for details.
|
||||
|
||||
Database Update:
|
||||
This version of Rivendell uses database schema version 308, and will
|
||||
automatically upgrade any earlier versions. To see the current schema
|
||||
version prior to upgrade, see RDAdmin->SystemInfo.
|
||||
|
||||
Be sure to run 'rddbmgr --modify' (as root) immediately after upgrading
|
||||
to allow any necessary changes to the database schema to be applied.
|
||||
-------------------------------------------------------------------------------
|
||||
v3.0.0rc00 -- 3/22/2019
|
||||
|
||||
|
@ -1 +1 @@
|
||||
3.0.0rc00
|
||||
3.0.0rc02
|
@ -111,8 +111,6 @@ int RD_ImportCart(struct rd_cartimport *cartimport[],
|
||||
long response_code;
|
||||
struct curl_httppost *first=NULL;
|
||||
struct curl_httppost *last=NULL;
|
||||
char *arrayptr;
|
||||
char checked_fname[BUFSIZ];
|
||||
int i;
|
||||
char cart_buffer[50];
|
||||
char cut_buffer[50];
|
||||
@ -121,35 +119,12 @@ int RD_ImportCart(struct rd_cartimport *cartimport[],
|
||||
char autotrim_buffer[50];
|
||||
char use_metadata_buffer[50];
|
||||
char create_flag[50];
|
||||
char checked_group_name[50];
|
||||
long userlen = strlen(username);
|
||||
long passwdlen = strlen(passwd);
|
||||
char errbuf[CURL_ERROR_SIZE];
|
||||
CURLcode res;
|
||||
char user_agent_string[255];
|
||||
|
||||
/* Check File name */
|
||||
memset(checked_fname,'\0',sizeof(checked_fname));
|
||||
arrayptr=&checked_fname[0];
|
||||
|
||||
for (i = 0 ; i < strlen(filename) ; i++) {
|
||||
if (filename[i]>32) {
|
||||
strncpy(arrayptr,&filename[i],1);
|
||||
arrayptr++;
|
||||
}
|
||||
}
|
||||
|
||||
/* Check Group Name */
|
||||
memset(checked_group_name,'\0',sizeof(checked_group_name));
|
||||
arrayptr=&checked_group_name[0];
|
||||
|
||||
for (i = 0 ; i < strlen(group) ; i++) {
|
||||
if (group[i]>32) {
|
||||
strncpy(arrayptr,&group[i],1);
|
||||
arrayptr++;
|
||||
}
|
||||
}
|
||||
|
||||
if((curl=curl_easy_init())==NULL) {
|
||||
curl_easy_cleanup(curl);
|
||||
return -1;
|
||||
@ -260,7 +235,7 @@ int RD_ImportCart(struct rd_cartimport *cartimport[],
|
||||
CURLFORM_PTRNAME,
|
||||
"GROUP_NAME",
|
||||
CURLFORM_COPYCONTENTS,
|
||||
checked_group_name,
|
||||
group,
|
||||
CURLFORM_END);
|
||||
|
||||
curl_formadd(&first,
|
||||
@ -276,7 +251,7 @@ int RD_ImportCart(struct rd_cartimport *cartimport[],
|
||||
CURLFORM_PTRNAME,
|
||||
"FILENAME",
|
||||
CURLFORM_FILE,
|
||||
checked_fname,
|
||||
filename,
|
||||
CURLFORM_END);
|
||||
|
||||
|
||||
|
@ -96,9 +96,12 @@ int main(int argc,char *argv[])
|
||||
printf("Please enter the File Name that you want to Import ==> ");
|
||||
if (fgets(filename,sizeof(filename),stdin) != NULL)
|
||||
{
|
||||
if((0xFF&filename[strlen(filename)-1])<32) {
|
||||
filename[strlen(filename)-1]=0;
|
||||
}
|
||||
}
|
||||
|
||||
printf("Do you want to Create Cart If Doesn't Exist - (Yes or No) ==> ");
|
||||
printf("Do you want to Create Cart If Doesn't Exist - (Y/N) ==> ");
|
||||
if (fgets(buf,sizeof(buf),stdin) != NULL)
|
||||
{
|
||||
if (( buf[0] != '\n') && (buf[0] =='Y'))
|
||||
|
@ -20,6 +20,7 @@
|
||||
## Use automake to process this into a Makefile.in
|
||||
|
||||
OPSGUIDE_HTML = appendix.filepath_wildcards.html\
|
||||
appendix.gfdl.html\
|
||||
appendix.gpio_switcher_devices.html\
|
||||
appendix.gplv2.html\
|
||||
appendix.metadata_wildcards.html\
|
||||
@ -279,6 +280,7 @@ OPSGUIDE_DEPS = $(OPSGUIDE_IMAGES) \
|
||||
$(OPSGUIDE_ICONS) \
|
||||
filepath_wildcards.xml\
|
||||
gpio_switcher_devices.xml\
|
||||
gfdl.xml\
|
||||
gplv2.xml\
|
||||
opsguide.xml\
|
||||
overview.xml\
|
||||
|
@ -9,7 +9,16 @@
|
||||
<edition>
|
||||
@VERSION@
|
||||
</edition>
|
||||
<copyright><year>-2003-2019</year><holder>Fred Gleason</holder></copyright>
|
||||
<copyright><year>2003-2019</year><holder>Fred Gleason</holder></copyright>
|
||||
<legalnotice>
|
||||
<para>
|
||||
Permission is granted to copy, distribute and/or modify this document
|
||||
under the terms of the GNU Free Documentation License, Version 1.3
|
||||
or any later version published by the Free Software Foundation;
|
||||
with no Invariant Sections, no Front-Cover Texts, and no Back-Cover Texts.
|
||||
A copy of the license is included in <xref linkend="appendix.gfdl" />.
|
||||
</para>
|
||||
</legalnotice>
|
||||
<mediaobject>
|
||||
<imageobject>
|
||||
<imagedata fileref="../../icons/rivendell-512x512.png" scale="80"/>
|
||||
|
621
docs/opsguide/gfdl.xml
Normal file
621
docs/opsguide/gfdl.xml
Normal file
@ -0,0 +1,621 @@
|
||||
<appendix xmlns="http://docbook.org/ns/docbook" xmlns:xlink="http://www.w3.org/1999/xlink" xml:id="appendix.gfdl">
|
||||
<title>GNU Free Documentation License</title>
|
||||
<sect1 xml:id="sect.gfdl.gnu_free_documentation_license">
|
||||
<title>GNU Free Documentation License</title>
|
||||
<subtitle>Version 1.3, 3 November 2008</subtitle>
|
||||
<para>
|
||||
Copyright © 2000, 2001, 2002, 2007, 2008 Free Software Foundation, Inc.
|
||||
<<link xlink:href="https://fsf.org/">https://fsf.org/</link>>
|
||||
</para>
|
||||
<para>
|
||||
Everyone is permitted to copy and distribute verbatim copies of this
|
||||
license document, but changing it is not allowed.
|
||||
</para>
|
||||
<orderedlist numeration="arabic" continuation="restarts" startingnumber="0">
|
||||
<listitem>
|
||||
<para>
|
||||
PREAMBLE
|
||||
</para>
|
||||
<para>
|
||||
The purpose of this License is to make a manual, textbook, or other
|
||||
functional and useful document "free" in the sense of freedom: to
|
||||
assure everyone the effective freedom to copy and redistribute it,
|
||||
with or without modifying it, either commercially or noncommercially.
|
||||
Secondarily, this License preserves for the author and publisher a
|
||||
way to get credit for their work, while not being considered
|
||||
responsible for modifications made by others.
|
||||
</para>
|
||||
<para>
|
||||
This License is a kind of "copyleft", which means that derivative
|
||||
works of the document must themselves be free in the same sense. It
|
||||
complements the GNU General Public License, which is a copyleft
|
||||
license designed for free software.
|
||||
</para>
|
||||
<para>
|
||||
We have designed this License in order to use it for manuals for free
|
||||
software, because free software needs free documentation: a free
|
||||
program should come with manuals providing the same freedoms that
|
||||
the software does. But this License is not limited to software manuals;
|
||||
it can be used for any textual work, regardless of subject matter or
|
||||
whether it is published as a printed book. We recommend this License
|
||||
principally for works whose purpose is instruction or reference.
|
||||
</para>
|
||||
</listitem>
|
||||
|
||||
<listitem>
|
||||
<para>
|
||||
APPLICABILITY AND DEFINITIONS
|
||||
</para>
|
||||
<para>
|
||||
This License applies to any manual or other work, in any medium, that
|
||||
contains a notice placed by the copyright holder saying it can be
|
||||
distributed under the terms of this License. Such a notice grants a
|
||||
world-wide, royalty-free license, unlimited in duration, to use that
|
||||
work under the conditions stated herein. The "Document", below,
|
||||
refers to any such manual or work. Any member of the public is a
|
||||
licensee, and is addressed as "you". You accept the license if you
|
||||
copy, modify or distribute the work in a way requiring permission
|
||||
under copyright law.
|
||||
</para>
|
||||
<para>
|
||||
A "Modified Version" of the Document means any work containing the
|
||||
Document or a portion of it, either copied verbatim, or with
|
||||
modifications and/or translated into another language.
|
||||
</para>
|
||||
<para>
|
||||
A "Secondary Section" is a named appendix or a front-matter section
|
||||
of the Document that deals exclusively with the relationship of the
|
||||
publishers or authors of the Document to the Document's overall
|
||||
subject (or to related matters) and contains nothing that could fall
|
||||
directly within that overall subject. (Thus, if the Document is in
|
||||
part a textbook of mathematics, a Secondary Section may not explain
|
||||
any mathematics.) The relationship could be a matter of historical
|
||||
connection with the subject or with related matters, or of legal,
|
||||
commercial, philosophical, ethical or political position regarding
|
||||
them.
|
||||
</para>
|
||||
<para>
|
||||
The "Invariant Sections" are certain Secondary Sections whose titles
|
||||
are designated, as being those of Invariant Sections, in the notice
|
||||
that says that the Document is released under this License. If a
|
||||
section does not fit the above definition of Secondary then it is not
|
||||
allowed to be designated as Invariant. The Document may contain zero
|
||||
Invariant Sections. If the Document does not identify any Invariant
|
||||
Sections then there are none.
|
||||
</para>
|
||||
<para>
|
||||
The "Cover Texts" are certain short passages of text that are listed,
|
||||
as Front-Cover Texts or Back-Cover Texts, in the notice that says
|
||||
that the Document is released under this License. A Front-Cover Text
|
||||
may be at most 5 words, and a Back-Cover Text may be at most 25 words.
|
||||
</para>
|
||||
<para>
|
||||
A "Transparent" copy of the Document means a machine-readable copy,
|
||||
represented in a format whose specification is available to the
|
||||
general public, that is suitable for revising the document
|
||||
straightforwardly with generic text editors or (for images composed
|
||||
of pixels) generic paint programs or (for drawings) some widely
|
||||
available drawing editor, and that is suitable for input to text
|
||||
formatters or for automatic translation to a variety of formats
|
||||
suitable for input to text formatters. A copy made in an otherwise
|
||||
Transparent file format whose markup, or absence of markup, has been
|
||||
arranged to thwart or discourage subsequent modification by readers
|
||||
is not Transparent. An image format is not Transparent if used for
|
||||
any substantial amount of text. A copy that is not "Transparent" is
|
||||
called "Opaque".
|
||||
</para>
|
||||
<para>
|
||||
Examples of suitable formats for Transparent copies include plain
|
||||
ASCII without markup, Texinfo input format, LaTeX input format,
|
||||
SGML or XML using a publicly available DTD, and standard-conforming
|
||||
simple HTML, PostScript or PDF designed for human modification.
|
||||
Examples of transparent image formats include PNG, XCF and JPG.
|
||||
Opaque formats include proprietary formats that can be read and
|
||||
edited only by proprietary word processors, SGML or XML for which
|
||||
the DTD and/or processing tools are not generally available, and
|
||||
the machine-generated HTML, PostScript or PDF produced by some word
|
||||
processors for output purposes only.
|
||||
</para>
|
||||
<para>
|
||||
The "Title Page" means, for a printed book, the title page itself,
|
||||
plus such following pages as are needed to hold, legibly, the
|
||||
material this License requires to appear in the title page. For works
|
||||
in formats which do not have any title page as such, "Title Page"
|
||||
means the text near the most prominent appearance of the work's
|
||||
title, preceding the beginning of the body of the text.
|
||||
</para>
|
||||
<para>
|
||||
The "publisher" means any person or entity that distributes copies
|
||||
of the Document to the public.
|
||||
</para>
|
||||
<para>
|
||||
A section "Entitled XYZ" means a named subunit of the Document whose
|
||||
title either is precisely XYZ or contains XYZ in parentheses
|
||||
following text that translates XYZ in another language. (Here XYZ
|
||||
stands for a specific section name mentioned below, such as
|
||||
"Acknowledgements", "Dedications", "Endorsements", or "History".)
|
||||
To "Preserve the Title" of such a section when you modify the
|
||||
Document means that it remains a section "Entitled XYZ" according
|
||||
to this definition.
|
||||
</para>
|
||||
<para>
|
||||
The Document may include Warranty Disclaimers next to the notice
|
||||
which states that this License applies to the Document. These
|
||||
Warranty Disclaimers are considered to be included by reference in
|
||||
this License, but only as regards disclaiming warranties: any other
|
||||
implication that these Warranty Disclaimers may have is void and has
|
||||
no effect on the meaning of this License.
|
||||
</para>
|
||||
</listitem>
|
||||
|
||||
<listitem>
|
||||
<para>
|
||||
VERBATIM COPYING
|
||||
</para>
|
||||
<para>
|
||||
You may copy and distribute the Document in any medium, either
|
||||
commercially or noncommercially, provided that this License, the
|
||||
copyright notices, and the license notice saying this License applies
|
||||
to the Document are reproduced in all copies, and that you add no
|
||||
other conditions whatsoever to those of this License. You may not
|
||||
use technical measures to obstruct or control the reading or further
|
||||
copying of the copies you make or distribute. However, you may accept
|
||||
compensation in exchange for copies. If you distribute a large
|
||||
enough number of copies you must also follow the conditions in
|
||||
section 3.
|
||||
</para>
|
||||
<para>
|
||||
You may also lend copies, under the same conditions stated above,
|
||||
and you may publicly display copies.
|
||||
</para>
|
||||
</listitem>
|
||||
|
||||
<listitem>
|
||||
<para>
|
||||
COPYING IN QUANTITY
|
||||
</para>
|
||||
<para>
|
||||
If you publish printed copies (or copies in media that commonly have
|
||||
printed covers) of the Document, numbering more than 100, and the
|
||||
Document's license notice requires Cover Texts, you must enclose the
|
||||
copies in covers that carry, clearly and legibly, all these Cover
|
||||
Texts: Front-Cover Texts on the front cover, and Back-Cover Texts on
|
||||
the back cover. Both covers must also clearly and legibly identify
|
||||
you as the publisher of these copies. The front cover must present
|
||||
the full title with all words of the title equally prominent and
|
||||
visible. You may add other material on the covers in addition.
|
||||
Copying with changes limited to the covers, as long as they preserve
|
||||
the title of the Document and satisfy these conditions, can be
|
||||
treated as verbatim copying in other respects.
|
||||
</para>
|
||||
<para>
|
||||
If the required texts for either cover are too voluminous to fit
|
||||
legibly, you should put the first ones listed (as many as fit
|
||||
reasonably) on the actual cover, and continue the rest onto adjacent
|
||||
pages.
|
||||
</para>
|
||||
<para>
|
||||
If you publish or distribute Opaque copies of the Document numbering
|
||||
more than 100, you must either include a machine-readable Transparent
|
||||
copy along with each Opaque copy, or state in or with each Opaque
|
||||
copy a computer-network location from which the general network-using
|
||||
public has access to download using public-standard network protocols
|
||||
a complete Transparent copy of the Document, free of added material.
|
||||
If you use the latter option, you must take reasonably prudent steps,
|
||||
when you begin distribution of Opaque copies in quantity, to ensure
|
||||
that this Transparent copy will remain thus accessible at the stated
|
||||
location until at least one year after the last time you distribute
|
||||
an Opaque copy (directly or through your agents or retailers) of that
|
||||
edition to the public.
|
||||
</para>
|
||||
<para>
|
||||
It is requested, but not required, that you contact the authors of
|
||||
the Document well before redistributing any large number of copies,
|
||||
to give them a chance to provide you with an updated version of the
|
||||
Document.
|
||||
</para>
|
||||
</listitem>
|
||||
|
||||
<listitem>
|
||||
<para>
|
||||
MODIFICATIONS
|
||||
</para>
|
||||
<para>
|
||||
You may copy and distribute a Modified Version of the Document under
|
||||
the conditions of sections 2 and 3 above, provided that you release
|
||||
the Modified Version under precisely this License, with the Modified
|
||||
Version filling the role of the Document, thus licensing
|
||||
distribution and modification of the Modified Version to whoever
|
||||
possesses a copy of it. In addition, you must do these things in the
|
||||
Modified Version:
|
||||
</para>
|
||||
<orderedlist numeration="upperalpha" inheritnum="ignore">
|
||||
<listitem>
|
||||
<para>
|
||||
Use in the Title Page (and on the covers, if any) a title
|
||||
distinct from that of the Document, and from those of previous
|
||||
versions (which should, if there were any, be listed in the
|
||||
History section of the Document). You may use the same title as
|
||||
a previous version if the original publisher of that version
|
||||
gives permission.
|
||||
</para>
|
||||
</listitem>
|
||||
<listitem>
|
||||
<para>
|
||||
List on the Title Page, as authors, one or more persons or
|
||||
entities responsible for authorship of the modifications in the
|
||||
Modified Version, together with at least five of the principal
|
||||
authors of the Document (all of its principal authors, if it has
|
||||
fewer than five), unless they release you from this requirement.
|
||||
</para>
|
||||
</listitem>
|
||||
<listitem>
|
||||
<para>
|
||||
State on the Title page the name of the publisher of the
|
||||
Modified Version, as the publisher.
|
||||
</para>
|
||||
</listitem>
|
||||
<listitem>
|
||||
<para>
|
||||
Preserve all the copyright notices of the Document.
|
||||
</para>
|
||||
</listitem>
|
||||
<listitem>
|
||||
<para>
|
||||
Add an appropriate copyright notice for your modifications
|
||||
adjacent to the other copyright notices.
|
||||
</para>
|
||||
</listitem>
|
||||
<listitem>
|
||||
<para>
|
||||
Include, immediately after the copyright notices, a license
|
||||
notice giving the public permission to use the Modified Version
|
||||
under the terms of this License, in the form shown in the
|
||||
Addendum below.
|
||||
</para>
|
||||
</listitem>
|
||||
<listitem>
|
||||
<para>
|
||||
Preserve in that license notice the full lists of Invariant
|
||||
Sections and required Cover Texts given in the Document's
|
||||
license notice.
|
||||
</para>
|
||||
</listitem>
|
||||
<listitem>
|
||||
<para>
|
||||
Include an unaltered copy of this License.
|
||||
</para>
|
||||
</listitem>
|
||||
<listitem>
|
||||
<para>
|
||||
Preserve the section Entitled "History", Preserve its Title,
|
||||
and add to it an item stating at least the title, year, new
|
||||
authors, and publisher of the Modified Version as given on the
|
||||
Title Page. If there is no section Entitled "History" in the
|
||||
Document, create one stating the title, year, authors, and
|
||||
publisher of the Document as given on its Title Page, then add
|
||||
an item describing the Modified Version as stated in the previous
|
||||
sentence.
|
||||
</para>
|
||||
</listitem>
|
||||
<listitem>
|
||||
<para>
|
||||
Preserve the network location, if any, given in the Document
|
||||
for public access to a Transparent copy of the Document, and
|
||||
likewise the network locations given in the Document for previous
|
||||
versions it was based on. These may be placed in the "History"
|
||||
section. You may omit a network location for a work that was
|
||||
published at least four years before the Document itself, or if
|
||||
the original publisher of the version it refers to gives
|
||||
permission.
|
||||
</para>
|
||||
</listitem>
|
||||
<listitem>
|
||||
<para>
|
||||
For any section Entitled "Acknowledgements" or "Dedications",
|
||||
Preserve the Title of the section, and preserve in the section
|
||||
all the substance and tone of each of the contributor
|
||||
acknowledgements and/or dedications given therein.
|
||||
</para>
|
||||
</listitem>
|
||||
<listitem>
|
||||
<para>
|
||||
Preserve all the Invariant Sections of the Document,
|
||||
unaltered in their text and in their titles. Section numbers or
|
||||
the equivalent are not considered part of the section titles.
|
||||
</para>
|
||||
</listitem>
|
||||
<listitem>
|
||||
<para>
|
||||
Delete any section Entitled "Endorsements". Such a section
|
||||
may not be included in the Modified Version.
|
||||
</para>
|
||||
</listitem>
|
||||
<listitem>
|
||||
<para>
|
||||
Do not retitle any existing section to be Entitled
|
||||
"Endorsements" or to conflict in title with any Invariant
|
||||
Section.
|
||||
</para>
|
||||
</listitem>
|
||||
<listitem>
|
||||
<para>
|
||||
Preserve any Warranty Disclaimers.
|
||||
</para>
|
||||
</listitem>
|
||||
</orderedlist>
|
||||
<para>
|
||||
If the Modified Version includes new front-matter sections or
|
||||
appendices that qualify as Secondary Sections and contain no material
|
||||
copied from the Document, you may at your option designate some or
|
||||
all of these sections as invariant. To do this, add their titles to
|
||||
the list of Invariant Sections in the Modified Version's license
|
||||
notice. These titles must be distinct from any other section titles.
|
||||
</para>
|
||||
<para>
|
||||
You may add a section Entitled "Endorsements", provided it contains
|
||||
nothing but endorsements of your Modified Version by various
|
||||
parties—for example, statements of peer review or that the text has
|
||||
been approved by an organization as the authoritative definition of
|
||||
a standard.
|
||||
</para>
|
||||
<para>
|
||||
You may add a passage of up to five words as a Front-Cover Text, and
|
||||
a passage of up to 25 words as a Back-Cover Text, to the end of the
|
||||
list of Cover Texts in the Modified Version. Only one passage of
|
||||
Front-Cover Text and one of Back-Cover Text may be added by (or
|
||||
through arrangements made by) any one entity. If the Document already
|
||||
includes a cover text for the same cover, previously added by you or
|
||||
by arrangement made by the same entity you are acting on behalf of,
|
||||
you may not add another; but you may replace the old one, on explicit
|
||||
permission from the previous publisher that added the old one.
|
||||
</para>
|
||||
<para>
|
||||
The author(s) and publisher(s) of the Document do not by this License
|
||||
give permission to use their names for publicity for or to assert or
|
||||
imply endorsement of any Modified Version.
|
||||
</para>
|
||||
</listitem>
|
||||
|
||||
<listitem>
|
||||
<para>
|
||||
COMBINING DOCUMENTS
|
||||
</para>
|
||||
<para>
|
||||
You may combine the Document with other documents released under this
|
||||
License, under the terms defined in section 4 above for modified
|
||||
versions, provided that you include in the combination all of the
|
||||
Invariant Sections of all of the original documents, unmodified, and
|
||||
list them all as Invariant Sections of your combined work in its
|
||||
license notice, and that you preserve all their Warranty Disclaimers.
|
||||
</para>
|
||||
<para>
|
||||
The combined work need only contain one copy of this License, and
|
||||
multiple identical Invariant Sections may be replaced with a single
|
||||
copy. If there are multiple Invariant Sections with the same name but
|
||||
different contents, make the title of each such section unique by
|
||||
adding at the end of it, in parentheses, the name of the original
|
||||
author or publisher of that section if known, or else a unique
|
||||
number. Make the same adjustment to the section titles in the list
|
||||
of Invariant Sections in the license notice of the combined work.
|
||||
</para>
|
||||
<para>
|
||||
In the combination, you must combine any sections Entitled "History"
|
||||
in the various original documents, forming one section Entitled
|
||||
"History"; likewise combine any sections Entitled "Acknowledgements",
|
||||
and any sections Entitled "Dedications". You must delete all sections
|
||||
Entitled "Endorsements".
|
||||
</para>
|
||||
</listitem>
|
||||
|
||||
<listitem>
|
||||
<para>
|
||||
COLLECTIONS OF DOCUMENTS
|
||||
</para>
|
||||
<para>
|
||||
You may make a collection consisting of the Document and other
|
||||
documents released under this License, and replace the individual
|
||||
copies of this License in the various documents with a single copy
|
||||
that is included in the collection, provided that you follow the
|
||||
rules of this License for verbatim copying of each of the documents
|
||||
in all other respects.
|
||||
</para>
|
||||
<para>
|
||||
You may extract a single document from such a collection, and
|
||||
distribute it individually under this License, provided you insert a
|
||||
copy of this License into the extracted document, and follow this
|
||||
License in all other respects regarding verbatim copying of that
|
||||
document.
|
||||
</para>
|
||||
</listitem>
|
||||
|
||||
<listitem>
|
||||
<para>
|
||||
AGGREGATION WITH EXISTING WORKS
|
||||
</para>
|
||||
<para>
|
||||
A compilation of the Document or its derivatives with other separate
|
||||
and independent documents or works, in or on a volume of a storage
|
||||
or distribution medium, is called an "aggregate" if the copyright
|
||||
resulting from the compilation is not used to limit the legal rights
|
||||
of the compilation's users beyond what the individual works permit.
|
||||
When the Document is included in an aggregate, this License does not
|
||||
apply to the other works in the aggregate which are not themselves
|
||||
derivative works of the Document.
|
||||
</para>
|
||||
<para>
|
||||
If the Cover Text requirement of section 3 is applicable to these
|
||||
copies of the Document, then if the Document is less than one half of
|
||||
the entire aggregate, the Document's Cover Texts may be placed on
|
||||
covers that bracket the Document within the aggregate, or the
|
||||
electronic equivalent of covers if the Document is in electronic
|
||||
form. Otherwise they must appear on printed covers that bracket the
|
||||
whole aggregate.
|
||||
</para>
|
||||
</listitem>
|
||||
|
||||
<listitem>
|
||||
<para>
|
||||
TRANSLATION
|
||||
</para>
|
||||
<para>
|
||||
Translation is considered a kind of modification, so you may
|
||||
distribute translations of the Document under the terms of section 4.
|
||||
Replacing Invariant Sections with translations requires special
|
||||
permission from their copyright holders, but you may include
|
||||
translations of some or all Invariant Sections in addition to the
|
||||
original versions of these Invariant Sections. You may include a
|
||||
translation of this License, and all the license notices in the
|
||||
Document, and any Warranty Disclaimers, provided that you also
|
||||
include the original English version of this License and the original
|
||||
versions of those notices and disclaimers. In case of a disagreement
|
||||
between the translation and the original version of this License or a
|
||||
notice or disclaimer, the original version will prevail.
|
||||
</para>
|
||||
<para>
|
||||
If a section in the Document is Entitled "Acknowledgements",
|
||||
"Dedications", or "History", the requirement (section 4) to Preserve
|
||||
its Title (section 1) will typically require changing the actual
|
||||
title.
|
||||
</para>
|
||||
</listitem>
|
||||
|
||||
<listitem>
|
||||
<para>
|
||||
TERMINATION
|
||||
</para>
|
||||
<para>
|
||||
You may not copy, modify, sublicense, or distribute the Document
|
||||
except as expressly provided under this License. Any attempt
|
||||
otherwise to copy, modify, sublicense, or distribute it is void, and
|
||||
will automatically terminate your rights under this License.
|
||||
</para>
|
||||
<para>
|
||||
However, if you cease all violation of this License, then your
|
||||
license from a particular copyright holder is reinstated (a)
|
||||
provisionally, unless and until the copyright holder explicitly and
|
||||
finally terminates your license, and (b) permanently, if the
|
||||
copyright holder fails to notify you of the violation by some
|
||||
reasonable means prior to 60 days after the cessation.
|
||||
</para>
|
||||
<para>
|
||||
Moreover, your license from a particular copyright holder is
|
||||
reinstated permanently if the copyright holder notifies you of the
|
||||
violation by some reasonable means, this is the first time you have
|
||||
received notice of violation of this License (for any work) from
|
||||
that copyright holder, and you cure the violation prior to 30 days
|
||||
after your receipt of the notice.
|
||||
</para>
|
||||
<para>
|
||||
Termination of your rights under this section does not terminate the
|
||||
licenses of parties who have received copies or rights from you
|
||||
under this License. If your rights have been terminated and not
|
||||
permanently reinstated, receipt of a copy of some or all of the same
|
||||
material does not give you any rights to use it.
|
||||
</para>
|
||||
</listitem>
|
||||
|
||||
<listitem>
|
||||
<para>
|
||||
FUTURE VERSIONS OF THIS LICENSE
|
||||
</para>
|
||||
<para>
|
||||
The Free Software Foundation may publish new, revised versions of
|
||||
the GNU Free Documentation License from time to time. Such new
|
||||
versions will be similar in spirit to the present version, but may
|
||||
differ in detail to address new problems or concerns. See
|
||||
<link xlink:href="https://www.gnu.org/licenses/">
|
||||
https://www.gnu.org/licenses/</link>.
|
||||
</para>
|
||||
<para>
|
||||
Each version of the License is given a distinguishing version number.
|
||||
If the Document specifies that a particular numbered version of this
|
||||
License "or any later version" applies to it, you have the option of
|
||||
following the terms and conditions either of that specified version
|
||||
or of any later version that has been published (not as a draft) by
|
||||
the Free Software Foundation. If the Document does not specify a
|
||||
version number of this License, you may choose any version ever
|
||||
published (not as a draft) by the Free Software Foundation. If the
|
||||
Document specifies that a proxy can decide which future versions of
|
||||
this License can be used, that proxy's public statement of acceptance
|
||||
of a version permanently authorizes you to choose that version for
|
||||
the Document.
|
||||
</para>
|
||||
</listitem>
|
||||
|
||||
<listitem>
|
||||
<para>
|
||||
RELICENSING
|
||||
</para>
|
||||
<para>
|
||||
"Massive Multiauthor Collaboration Site" (or "MMC Site") means any
|
||||
World Wide Web server that publishes copyrightable works and also
|
||||
provides prominent facilities for anybody to edit those works. A
|
||||
public wiki that anybody can edit is an example of such a server. A
|
||||
"Massive Multiauthor Collaboration" (or "MMC") contained in the site
|
||||
means any set of copyrightable works thus published on the MMC site.
|
||||
</para>
|
||||
<para>
|
||||
"CC-BY-SA" means the Creative Commons Attribution-Share Alike 3.0
|
||||
license published by Creative Commons Corporation, a not-for-profit
|
||||
corporation with a principal place of business in San Francisco,
|
||||
California, as well as future copyleft versions of that license
|
||||
published by that same organization.
|
||||
</para>
|
||||
<para>
|
||||
"Incorporate" means to publish or republish a Document, in whole or
|
||||
in part, as part of another Document.
|
||||
</para>
|
||||
<para>
|
||||
An MMC is "eligible for relicensing" if it is licensed under this
|
||||
License, and if all works that were first published under this
|
||||
License somewhere other than this MMC, and subsequently incorporated
|
||||
in whole or in part into the MMC, (1) had no cover texts or
|
||||
invariant sections, and (2) were thus incorporated prior to November
|
||||
1, 2008.
|
||||
</para>
|
||||
<para>
|
||||
The operator of an MMC Site may republish an MMC contained in the
|
||||
site under CC-BY-SA on the same site at any time before August 1,
|
||||
2009, provided the MMC is eligible for relicensing.
|
||||
</para>
|
||||
</listitem>
|
||||
</orderedlist>
|
||||
<sect2 xml:id="sect.gfdl.how_to_use_this_license_for_your_documents">
|
||||
<title>ADDENDUM: How to use this License for your documents</title>
|
||||
<para>
|
||||
To use this License in a document you have written, include a copy of
|
||||
the License in the document and put the following copyright and license
|
||||
notices just after the title page:
|
||||
</para>
|
||||
<literallayout>
|
||||
Copyright (C) YEAR YOUR NAME.
|
||||
Permission is granted to copy, distribute and/or modify this document
|
||||
under the terms of the GNU Free Documentation License, Version 1.3
|
||||
or any later version published by the Free Software Foundation;
|
||||
with no Invariant Sections, no Front-Cover Texts, and no Back-Cover Texts.
|
||||
A copy of the license is included in the section entitled "GNU
|
||||
Free Documentation License".
|
||||
</literallayout>
|
||||
<para>
|
||||
If you have Invariant Sections, Front-Cover Texts and Back-Cover Texts,
|
||||
replace the "with … Texts." line with this:
|
||||
</para>
|
||||
<literallayout>
|
||||
with the Invariant Sections being LIST THEIR TITLES, with the
|
||||
Front-Cover Texts being LIST, and with the Back-Cover Texts being LIST.
|
||||
</literallayout>
|
||||
<para>
|
||||
If you have Invariant Sections without Cover Texts, or some other
|
||||
combination of the three, merge those two alternatives to suit the
|
||||
situation.
|
||||
</para>
|
||||
<para>
|
||||
If your document contains nontrivial examples of program code, we
|
||||
recommend releasing these examples in parallel under your choice of
|
||||
free software license, such as the GNU General Public License, to
|
||||
permit their use in free software.
|
||||
</para>
|
||||
</sect2>
|
||||
</sect1>
|
||||
</appendix>
|
@ -15,6 +15,7 @@
|
||||
<!ENTITY rml SYSTEM "rml.xml">
|
||||
<!ENTITY utilities SYSTEM "utilities.xml">
|
||||
<!ENTITY rdadmin SYSTEM "rdadmin.xml">
|
||||
<!ENTITY gfdl SYSTEM "gfdl.xml">
|
||||
<!ENTITY gplv2 SYSTEM "gplv2.xml">
|
||||
<!ENTITY gpio_switcher_devices SYSTEM "gpio_switcher_devices.xml">
|
||||
<!ENTITY filepath_wildcards SYSTEM "filepath_wildcards.xml">
|
||||
@ -45,6 +46,7 @@
|
||||
&utilities;
|
||||
</part>
|
||||
<part xml:id="part.appendices" xmlns="http://docbook.org/ns/docbook" version="5.0">
|
||||
&gfdl;
|
||||
&gplv2;
|
||||
&gpio_switcher_devices;
|
||||
&filepath_wildcards;
|
||||
|
@ -97,6 +97,7 @@ EXTRA_DIST = audio_cards.txt\
|
||||
services.txt\
|
||||
sources.txt\
|
||||
stack_lines.txt\
|
||||
stack_sched_codes.txt\
|
||||
stations.txt\
|
||||
switcher_nodes.txt\
|
||||
system.txt\
|
||||
|
@ -9,5 +9,4 @@ SCHED_STACK_ID int(10) unsigned
|
||||
SERVICE_NAME varchar(10) From SERVICES.NAME
|
||||
CART int(10) unsigned From CART.NUMBER
|
||||
ARTIST varchar(191) From CART.ARTIST
|
||||
SCHED_CODES varchar(191)
|
||||
SCHEDULED_AT datetime
|
||||
|
11
docs/tables/stack_sched_codes.txt
Normal file
11
docs/tables/stack_sched_codes.txt
Normal file
@ -0,0 +1,11 @@
|
||||
STACK_SCHED_CODES Table Layout for Rivendell
|
||||
|
||||
The STACK_SCHED_CODES table holds the scheduler codes for rows in
|
||||
the 'STACK_LINES' table.
|
||||
|
||||
|
||||
FIELD NAME TYPE REMARKS
|
||||
------------------------------------------------------------------------
|
||||
ID int(10) unsigned Primary key, auto_increment
|
||||
STACK_LINES_ID int(10) unsigned From STACK_LINES.ID
|
||||
SCHED_CODE varchar(10)
|
@ -196,8 +196,10 @@ dist_librd_la_SOURCES = dbversion.h\
|
||||
rdreport.cpp rdreport.h\
|
||||
rdringbuffer.cpp rdringbuffer.h\
|
||||
rdripc.cpp rdripc.h\
|
||||
rdschedcartlist.cpp rdschedcartlist.h\
|
||||
rdschedcode.cpp rdschedcode.h\
|
||||
rdschedcodes_dialog.cpp rdschedcodes_dialog.h\
|
||||
rdschedruleslist.cpp rdschedruleslist.h\
|
||||
rdsegmeter.cpp rdsegmeter.h\
|
||||
rdsettings.cpp rdsettings.h\
|
||||
rdsimpleplayer.cpp rdsimpleplayer.h\
|
||||
@ -237,9 +239,7 @@ dist_librd_la_SOURCES = dbversion.h\
|
||||
rdwavepainter.cpp rdwavepainter.h\
|
||||
rdweb.cpp rdweb.h\
|
||||
rdwebresult.cpp rdwebresult.h\
|
||||
rdxport_interface.h\
|
||||
schedruleslist.cpp schedruleslist.h\
|
||||
schedcartlist.cpp schedcartlist.h
|
||||
rdxport_interface.h
|
||||
|
||||
|
||||
nodist_librd_la_SOURCES = moc_rdadd_cart.cpp\
|
||||
@ -332,8 +332,7 @@ nodist_librd_la_SOURCES = moc_rdadd_cart.cpp\
|
||||
moc_rdunixserver.cpp\
|
||||
moc_rdunixsocket.cpp\
|
||||
moc_rdupload.cpp\
|
||||
moc_rdwavedata_dialog.cpp\
|
||||
moc_schedcartlist.cpp
|
||||
moc_rdwavedata_dialog.cpp
|
||||
|
||||
librd_la_LDFLAGS = -release $(VERSION)
|
||||
|
||||
|
@ -24,7 +24,7 @@
|
||||
/*
|
||||
* Current Database Version
|
||||
*/
|
||||
#define RD_VERSION_DATABASE 307
|
||||
#define RD_VERSION_DATABASE 308
|
||||
|
||||
|
||||
#endif // DBVERSION_H
|
||||
|
@ -160,7 +160,9 @@ RDAudioConvert::ErrorCode RDAudioConvert::convert()
|
||||
if(!RDAudioConvert::settingsValid(conv_settings)) {
|
||||
return RDAudioConvert::ErrorInvalidSettings;
|
||||
}
|
||||
if(!QFile::exists(conv_src_filename)) {
|
||||
struct stat stats;
|
||||
memset(&stats,0,sizeof(stats));
|
||||
if(stat((const char *)conv_src_filename.toUtf8(),&stats)!=0) {
|
||||
return RDAudioConvert::ErrorNoSource;
|
||||
}
|
||||
if(conv_dst_filename.isEmpty()) {
|
||||
@ -338,7 +340,7 @@ RDAudioConvert::ErrorCode RDAudioConvert::Stage1Convert(const QString &srcfile,
|
||||
// Try Libsndfile
|
||||
//
|
||||
memset(&sf_src_info,0,sizeof(sf_src_info));
|
||||
if((sf_src=sf_open(srcfile,SFM_READ,&sf_src_info))!=NULL) {
|
||||
if((sf_src=sf_open(srcfile.toUtf8(),SFM_READ,&sf_src_info))!=NULL) {
|
||||
err=Stage1SndFile(dstfile,sf_src,&sf_src_info);
|
||||
sf_close(sf_src);
|
||||
return RDAudioConvert::ErrorOk;
|
||||
@ -425,7 +427,7 @@ RDAudioConvert::ErrorCode RDAudioConvert::Stage1Vorbis(const QString &dstfile,
|
||||
//
|
||||
// Initialize Decoder
|
||||
//
|
||||
if((fd=open(wave->getName(),O_RDONLY))<0) {
|
||||
if((fd=open(wave->getName().toUtf8(),O_RDONLY))<0) {
|
||||
sf_close(sf_dst);
|
||||
return RDAudioConvert::ErrorNoSource;
|
||||
}
|
||||
@ -718,7 +720,7 @@ RDAudioConvert::ErrorCode RDAudioConvert::Stage1M4A(const QString &dstfile,
|
||||
//
|
||||
// Open source
|
||||
//
|
||||
f = dlmp4.MP4Read(wave->getName());
|
||||
f = dlmp4.MP4Read(wave->getName().toUtf8());
|
||||
if(f == MP4_INVALID_FILE_HANDLE)
|
||||
return RDAudioConvert::ErrorNoSource;
|
||||
|
||||
|
@ -740,7 +740,7 @@ int RDSetTimeLength(const QString &str)
|
||||
return res;
|
||||
}
|
||||
|
||||
|
||||
/*
|
||||
bool RDCopy(const QString &srcfile,const QString &destfile)
|
||||
{
|
||||
int src_fd;
|
||||
@ -777,6 +777,81 @@ bool RDCopy(const QString &srcfile,const QString &destfile)
|
||||
close(dest_fd);
|
||||
return true;
|
||||
}
|
||||
*/
|
||||
|
||||
bool RDCopy(const QString &srcfile,const QString &destfile)
|
||||
{
|
||||
int src_fd;
|
||||
int dest_fd;
|
||||
|
||||
if((src_fd=open((const char *)srcfile,O_RDONLY))<0) {
|
||||
return false;
|
||||
}
|
||||
if((dest_fd=open((const char *)destfile,O_WRONLY|O_CREAT,S_IWUSR))<0) {
|
||||
close(src_fd);
|
||||
return false;
|
||||
}
|
||||
bool ret=RDCopy(src_fd,dest_fd);
|
||||
close(src_fd);
|
||||
close(dest_fd);
|
||||
|
||||
return ret;
|
||||
}
|
||||
|
||||
|
||||
bool RDCopy(const QString &srcfile,int dest_fd)
|
||||
{
|
||||
int src_fd;
|
||||
|
||||
if((src_fd=open((const char *)srcfile,O_RDONLY))<0) {
|
||||
return false;
|
||||
}
|
||||
bool ret=RDCopy(src_fd,dest_fd);
|
||||
close(src_fd);
|
||||
|
||||
return ret;
|
||||
}
|
||||
|
||||
|
||||
bool RDCopy(int src_fd,const QString &destfile)
|
||||
{
|
||||
int dest_fd;
|
||||
|
||||
if((dest_fd=open((const char *)destfile,O_WRONLY|O_CREAT,S_IWUSR))<0) {
|
||||
return false;
|
||||
}
|
||||
bool ret=RDCopy(src_fd,dest_fd);
|
||||
close(dest_fd);
|
||||
|
||||
return ret;
|
||||
}
|
||||
|
||||
|
||||
bool RDCopy(int src_fd,int dest_fd)
|
||||
{
|
||||
struct stat src_stat;
|
||||
struct stat dest_stat;
|
||||
char *buf=NULL;
|
||||
int n;
|
||||
|
||||
if(fstat(src_fd,&src_stat)<0) {
|
||||
return false;
|
||||
}
|
||||
if(fstat(dest_fd,&dest_stat)<0) {
|
||||
return false;
|
||||
}
|
||||
if(fchmod(dest_fd,src_stat.st_mode)<0) {
|
||||
return false;
|
||||
}
|
||||
buf=(char *)malloc(dest_stat.st_blksize);
|
||||
while((n=read(src_fd,buf,dest_stat.st_blksize))==dest_stat.st_blksize) {
|
||||
write(dest_fd,buf,dest_stat.st_blksize);
|
||||
}
|
||||
write(dest_fd,buf,n);
|
||||
free(buf);
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
|
||||
bool RDWritePid(const QString &dirname,const QString &filename,int owner,
|
||||
|
@ -84,6 +84,9 @@ bool RDIsSqlNull(const QString &table,const QString &name,unsigned test,
|
||||
QString RDGetTimeLength(int mseconds,bool leadzero=false,bool tenths=true);
|
||||
int RDSetTimeLength(const QString &string);
|
||||
bool RDCopy(const QString &srcfile,const QString &destfile);
|
||||
bool RDCopy(const QString &srcfile,int dest_fd);
|
||||
bool RDCopy(int src_fd,const QString &destfile);
|
||||
bool RDCopy(int src_fd,int dest_fd);
|
||||
bool RDWritePid(const QString &dirname,const QString &filename,int owner=-1,
|
||||
int group=-1);
|
||||
void RDDeletePid(const QString &dirname,const QString &filename);
|
||||
|
@ -27,7 +27,7 @@
|
||||
#include "rdevent.h"
|
||||
#include "rdevent_line.h"
|
||||
#include "rdeventimportlist.h"
|
||||
#include "schedcartlist.h"
|
||||
#include "rdschedcartlist.h"
|
||||
|
||||
RDEventLine::RDEventLine(RDStation *station)
|
||||
{
|
||||
@ -222,7 +222,7 @@ void RDEventLine::setColor(const QColor &color)
|
||||
}
|
||||
|
||||
|
||||
QString RDEventLine::SchedGroup() const
|
||||
QString RDEventLine::schedGroup() const
|
||||
{
|
||||
return event_sched_group;
|
||||
}
|
||||
@ -633,16 +633,17 @@ bool RDEventLine::generateLog(QString logname,const QString &svcname,
|
||||
sql=QString("select NUMBER,ARTIST,")+
|
||||
"CONCAT(GROUP_CONCAT(RPAD(SC.SCHED_CODE,11,' ') separator ''),'.') as SCHED_CODES"+
|
||||
" from CART LEFT JOIN CART_SCHED_CODES AS SC on (NUMBER=SC.CART_NUMBER)"+
|
||||
" where GROUP_NAME='"+RDEscapeString(SchedGroup())+"'"+
|
||||
" where GROUP_NAME='"+RDEscapeString(schedGroup())+"'"+
|
||||
" group by NUMBER";
|
||||
RDSchedCartList *schedCL=new RDSchedCartList();
|
||||
q=new RDSqlQuery(sql);
|
||||
int querysize=(int)q->size();
|
||||
SchedCartList *schedCL;
|
||||
schedCL=new SchedCartList(querysize);
|
||||
|
||||
for(counter=0;counter<querysize;counter++) {
|
||||
q->seek(counter);
|
||||
schedCL->insertItem(q->value(0).toUInt(),0,0,q->value(1).toString(),q->value(2).toString());
|
||||
while(q->next()) {
|
||||
QStringList codes=q->value(2).toString().split(" ",QString::SkipEmptyParts);
|
||||
if((codes.size()>0)&&(codes.last()==".")) {
|
||||
codes.removeLast();
|
||||
}
|
||||
schedCL->
|
||||
insertItem(q->value(0).toUInt(),0,0,q->value(1).toString(),codes);
|
||||
}
|
||||
delete q;
|
||||
|
||||
@ -748,10 +749,18 @@ bool RDEventLine::generateLog(QString logname,const QString &svcname,
|
||||
QString wstr=q->value(0).toString();
|
||||
wstr+=" ";
|
||||
wstr=wstr.left(11);
|
||||
sql=QString("select STACK_LINES.CART ")+
|
||||
"from STACK_LINES left join STACK_SCHED_CODES "+
|
||||
"on STACK_LINES.ID=STACK_SCHED_CODES.STACK_LINES_ID where "+
|
||||
"STACK_LINES.SERVICE_NAME=\""+RDEscapeString(svcname)+"\" && "+
|
||||
QString().sprintf("STACK_LINES.SCHED_STACK_ID > %d && ",stackid-range)+
|
||||
"STACK_SCHED_CODES.SCHED_CODE=\""+RDEscapeString(wstr)+"\"";
|
||||
/*
|
||||
sql=QString("select CART from STACK_LINES where ")+
|
||||
"SERVICE_NAME=\""+RDEscapeString(svcname)+"\" && "+
|
||||
QString().sprintf("SCHED_STACK_ID > %d && ",stackid-range)+
|
||||
"SCHED_CODES like \"%%"+RDEscapeString(wstr)+"%%\"";
|
||||
*/
|
||||
q1=new RDSqlQuery(sql);
|
||||
if(q1->size()>=allowed || allowed==0) {
|
||||
for(counter=0;counter<schedCL->getNumberOfItems();counter++) {
|
||||
@ -774,10 +783,18 @@ bool RDEventLine::generateLog(QString logname,const QString &svcname,
|
||||
QString wstr=q->value(3).toString();
|
||||
wstr+=" ";
|
||||
wstr=wstr.left(11);
|
||||
sql=QString("select STACK_LINES.CART ")+
|
||||
"from STACK_LINES left join STACK_SCHED_CODES "+
|
||||
"on STACK_LINES.ID=STACK_SCHED_CODES.STACK_LINES_ID where "+
|
||||
"STACK_LINES.SERVICE_NAME=\""+RDEscapeString(svcname)+"\" && "+
|
||||
QString().sprintf("STACK_LINES.SCHED_STACK_ID=%d && ",stackid-1)+
|
||||
"STACK_SCHED_CODES.SCHED_CODE=\""+RDEscapeString(wstr)+"\"";
|
||||
/*
|
||||
sql=QString("select CART from STACK_LINES where ")+
|
||||
"SERVICE_NAME=\""+RDEscapeString(svcname)+"\" && "+
|
||||
QString().sprintf("SCHED_STACK_ID=%d && ",stackid-1)+
|
||||
"SCHED_CODES like \"%"+RDEscapeString(wstr)+"%\"";
|
||||
*/
|
||||
q1=new RDSqlQuery(sql);
|
||||
if(q1->size()>0) {
|
||||
for(counter=0;counter<schedCL->getNumberOfItems();counter++) {
|
||||
@ -801,9 +818,16 @@ bool RDEventLine::generateLog(QString logname,const QString &svcname,
|
||||
QString wstr=q->value(4).toString();
|
||||
wstr+=" ";
|
||||
wstr=wstr.left(11);
|
||||
sql=QString("select STACK_LINES.CART ")+
|
||||
"from STACK_LINES left join STACK_SCHED_CODES "+
|
||||
"on STACK_LINES.ID=STACK_SCHED_CODES.STACK_LINES_ID where "+
|
||||
QString().sprintf("STACK_LINES.SCHED_STACK_ID=%d && ",stackid-1)+
|
||||
"STACK_SCHED_CODES.SCHED_CODE=\""+RDEscapeString(wstr)+"\"";
|
||||
/*
|
||||
sql=QString("select CART from STACK_LINES where ")+
|
||||
QString().sprintf("SCHED_STACK_ID=%d && ",stackid-1)+
|
||||
"SCHED_CODES like \"%"+RDEscapeString(wstr)+"%\"";
|
||||
*/
|
||||
q1=new RDSqlQuery(sql);
|
||||
if(q1->size()>0) {
|
||||
for(counter=0;counter<schedCL->getNumberOfItems();counter++) {
|
||||
@ -827,9 +851,16 @@ bool RDEventLine::generateLog(QString logname,const QString &svcname,
|
||||
QString wstr=q->value(5).toString();
|
||||
wstr+=" ";
|
||||
wstr=wstr.left(11);
|
||||
sql=QString("select STACK_LINES.CART ")+
|
||||
"from STACK_LINES left join STACK_SCHED_CODES "+
|
||||
"on STACK_LINES.ID=STACK_SCHED_CODES.STACK_LINES_ID where "+
|
||||
QString().sprintf("STACK_LINES.SCHED_STACK_ID=%d && ",stackid-1)+
|
||||
"STACK_SCHED_CODES.SCHED_CODE=\""+RDEscapeString(wstr)+"\"";
|
||||
/*
|
||||
sql=QString("select CART from STACK_LINES where ")+
|
||||
QString().sprintf("SCHED_STACK_ID=%d && ",stackid-1)+
|
||||
"SCHED_CODES like \"%"+RDEscapeString(wstr)+"%\"";
|
||||
*/
|
||||
q1=new RDSqlQuery(sql);
|
||||
if(q1->size()>0) {
|
||||
for(counter=0;counter<schedCL->getNumberOfItems();counter++) {
|
||||
@ -880,6 +911,21 @@ bool RDEventLine::generateLog(QString logname,const QString &svcname,
|
||||
|
||||
count++;
|
||||
|
||||
sql=QString("insert into STACK_LINES set ")+
|
||||
"SERVICE_NAME=\""+RDEscapeString(svcname)+"\","+
|
||||
"SCHEDULED_AT=now(),"+
|
||||
QString().sprintf("SCHED_STACK_ID=%u,",stackid)+
|
||||
QString().sprintf("CART=%u,",schedCL->getItemCartNumber(schedpos))+
|
||||
"ARTIST=\""+RDEscapeString(schedCL->getItemArtist(schedpos))+"\"";
|
||||
unsigned line_id=RDSqlQuery::run(sql).toUInt();
|
||||
QStringList codes=schedCL->getItemSchedCodes(schedpos);
|
||||
for(int i=0;i<codes.size();i++) {
|
||||
sql=QString("insert into STACK_SCHED_CODES set ")+
|
||||
QString().sprintf("STACK_LINES_ID=%u,",line_id)+
|
||||
"SCHED_CODE=\""+RDEscapeString(codes.at(i))+"\"";
|
||||
RDSqlQuery::apply(sql);
|
||||
}
|
||||
/*
|
||||
sql=QString("insert into STACK_LINES set ")+
|
||||
"SERVICE_NAME=\""+RDEscapeString(svcname)+"\","+
|
||||
"SCHEDULED_AT=now(),"+
|
||||
@ -890,13 +936,14 @@ bool RDEventLine::generateLog(QString logname,const QString &svcname,
|
||||
"\"";
|
||||
q=new RDSqlQuery(sql);
|
||||
delete q;
|
||||
*/
|
||||
|
||||
delete schedCL;
|
||||
}
|
||||
else {
|
||||
// We don't have any carts to work with
|
||||
*report+=time.toString("hh:mm:ss")+
|
||||
" "+QObject::tr("No carts found in group")+" "+SchedGroup();
|
||||
" "+QObject::tr("No carts found in group")+" "+schedGroup();
|
||||
if(!HaveCode().isEmpty()) {
|
||||
*report+=QObject::tr(" with sched code(s): ")+HaveCode()+" "+HaveCode2();
|
||||
}
|
||||
|
@ -65,7 +65,7 @@ class RDEventLine
|
||||
void setDefaultTransType(RDLogLine::TransType trans);
|
||||
QColor color() const;
|
||||
void setColor(const QColor &color);
|
||||
QString SchedGroup() const;
|
||||
QString schedGroup() const;
|
||||
void setSchedGroup(QString str);
|
||||
QString HaveCode() const;
|
||||
void setHaveCode(QString str);
|
||||
|
@ -45,6 +45,18 @@ RDGroup::RDGroup(QString name,bool create)
|
||||
q=new RDSqlQuery(sql);
|
||||
delete q;
|
||||
}
|
||||
else {
|
||||
//
|
||||
// Normalize case
|
||||
//
|
||||
sql=QString("select NAME from GROUPS where ")+
|
||||
"NAME=\""+RDEscapeString(name)+"\"";
|
||||
q=new RDSqlQuery(sql);
|
||||
if(q->first()) {
|
||||
group_name=q->value(0).toString();
|
||||
}
|
||||
delete q;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
@ -32,6 +32,17 @@
|
||||
RDLog::RDLog(const QString &name)
|
||||
{
|
||||
log_name=name;
|
||||
|
||||
//
|
||||
// Normalize case
|
||||
//
|
||||
QString sql=QString("select NAME from LOGS where ")+
|
||||
"NAME=\""+RDEscapeString(name)+"\"";
|
||||
RDSqlQuery *q=new RDSqlQuery(sql);
|
||||
if(q->first()) {
|
||||
log_name=q->value(0).toString();
|
||||
}
|
||||
delete q;
|
||||
}
|
||||
|
||||
|
||||
|
@ -84,7 +84,9 @@ QString RDLogEvent::logName() const
|
||||
|
||||
void RDLogEvent::setLogName(QString logname)
|
||||
{
|
||||
log_name=logname;
|
||||
RDLog *log=new RDLog(logname);
|
||||
log_name=log->name(); // So we normalize the case
|
||||
delete log;
|
||||
}
|
||||
|
||||
|
||||
|
@ -1004,7 +1004,7 @@ void RDLogPlay::move(int from_line,int to_line)
|
||||
}
|
||||
if(to_line<size()) {
|
||||
if(logLine(to_line)->hasCustomTransition()) {
|
||||
if(to_line>to_line) {
|
||||
if(from_line>to_line) {
|
||||
mod_line[1]=to_line;
|
||||
}
|
||||
else {
|
||||
|
@ -225,7 +225,6 @@ void RDMacroEvent::exec(int line)
|
||||
RDMacro rml;
|
||||
RDStation *station;
|
||||
QHostAddress addr;
|
||||
RDMacro::Command cmd;
|
||||
emit started(line);
|
||||
switch(event_cmds[line]->command()) {
|
||||
case RDMacro::SP: // Sleep
|
||||
|
139
lib/rdschedcartlist.cpp
Normal file
139
lib/rdschedcartlist.cpp
Normal file
@ -0,0 +1,139 @@
|
||||
// rdschedcartlist.cpp
|
||||
//
|
||||
// A class for handling carts to be used in scheduler
|
||||
//
|
||||
// Copyright (C) 2005 Stefan Gabriel <stg@st-gabriel.de>
|
||||
// Copyright (C) 2019 Fred Gleason <fredg@paravelsystems.com>
|
||||
//
|
||||
// This program is free software; you can redistribute it and/or modify
|
||||
// it under the terms of the GNU General Public License version 2 as
|
||||
// published by the Free Software Foundation.
|
||||
//
|
||||
// This program is distributed in the hope that it will be useful,
|
||||
// but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
// GNU General Public License for more details.
|
||||
//
|
||||
// You should have received a copy of the GNU General Public
|
||||
// License along with this program; if not, write to the Free Software
|
||||
// Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
|
||||
//
|
||||
|
||||
#include <stdio.h>
|
||||
#include "rdschedcartlist.h"
|
||||
|
||||
RDSchedCartList::RDSchedCartList()
|
||||
{
|
||||
}
|
||||
|
||||
|
||||
void RDSchedCartList::insertItem(unsigned cartnumber,int cartlength,int stack_id,
|
||||
const QString &stack_artist,
|
||||
const QStringList &stack_schedcodes)
|
||||
{
|
||||
list_cartnum.push_back(cartnumber);
|
||||
list_cartlen.push_back(cartlength);
|
||||
list_stackid.push_back(stack_id);
|
||||
list_artist.push_back(stack_artist.lower().replace(" ",""));
|
||||
list_schedcodes.push_back(stack_schedcodes);
|
||||
}
|
||||
|
||||
|
||||
void RDSchedCartList::removeItem(int itemnumber)
|
||||
{
|
||||
list_cartnum.removeAt(itemnumber);
|
||||
list_cartlen.removeAt(itemnumber);
|
||||
list_stackid.removeAt(itemnumber);
|
||||
list_artist.removeAt(itemnumber);
|
||||
list_schedcodes.removeAt(itemnumber);
|
||||
}
|
||||
|
||||
bool RDSchedCartList::removeIfCode(int itemnumber,const QString &test_code)
|
||||
{
|
||||
bool matched=false;
|
||||
|
||||
for(int i=list_schedcodes.size()-1;i>=0;i--) {
|
||||
if(list_schedcodes.at(i).contains(test_code)) {
|
||||
list_cartnum.removeAt(i);
|
||||
list_cartlen.removeAt(i);
|
||||
list_stackid.removeAt(i);
|
||||
list_artist.removeAt(i);
|
||||
list_schedcodes.removeAt(i);
|
||||
matched=true;
|
||||
}
|
||||
}
|
||||
|
||||
return matched;
|
||||
}
|
||||
|
||||
bool RDSchedCartList::itemHasCode(int itemnumber,const QString &test_code)
|
||||
{
|
||||
return list_schedcodes.at(itemnumber).contains(test_code);
|
||||
}
|
||||
|
||||
|
||||
bool RDSchedCartList::itemHasCodes(int itemnumber,const QStringList &test_codes)
|
||||
{
|
||||
for(int i=0;i<test_codes.size();i++) {
|
||||
if(itemHasCode(itemnumber,test_codes.at(i))) {
|
||||
return true;
|
||||
}
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
|
||||
void RDSchedCartList::save(void)
|
||||
{
|
||||
list_savecartnum=list_cartnum;
|
||||
list_savecartlen=list_cartlen;
|
||||
list_savestackid=list_stackid;
|
||||
list_saveartist=list_artist;
|
||||
list_saveschedcodes=list_schedcodes;
|
||||
}
|
||||
|
||||
|
||||
void RDSchedCartList::restore(void)
|
||||
{
|
||||
list_cartnum=list_savecartnum;
|
||||
list_cartlen=list_savecartlen;
|
||||
list_stackid=list_savestackid;
|
||||
list_artist=list_saveartist;
|
||||
list_schedcodes=list_saveschedcodes;
|
||||
}
|
||||
|
||||
|
||||
unsigned RDSchedCartList::getItemCartNumber(int itemnumber)
|
||||
{
|
||||
return list_cartnum.at(itemnumber);
|
||||
}
|
||||
|
||||
|
||||
int RDSchedCartList::getItemStackid(int itemnumber)
|
||||
{
|
||||
return list_stackid.at(itemnumber);
|
||||
}
|
||||
|
||||
|
||||
QString RDSchedCartList::getItemArtist(int itemnumber)
|
||||
{
|
||||
return list_artist.at(itemnumber);
|
||||
}
|
||||
|
||||
|
||||
QStringList RDSchedCartList::getItemSchedCodes(int itemnumber)
|
||||
{
|
||||
return list_schedcodes.at(itemnumber);
|
||||
}
|
||||
|
||||
|
||||
int RDSchedCartList::getItemCartLength(int itemnumber)
|
||||
{
|
||||
return list_cartlen.at(itemnumber);
|
||||
}
|
||||
|
||||
|
||||
int RDSchedCartList::getNumberOfItems(void)
|
||||
{
|
||||
return list_cartnum.size();
|
||||
}
|
@ -1,8 +1,9 @@
|
||||
// schedcartlist.h
|
||||
// rdschedcartlist.h
|
||||
//
|
||||
// A class for handling carts to be used in scheduler
|
||||
//
|
||||
// Stefan Gabriel <stg@st-gabriel.de>
|
||||
// Copyright (C) 2005 Stefan Gabriel <stg@st-gabriel.de>
|
||||
// Copyright (C) 2019 Fred Gleason <fredg@paravelsystems.com>
|
||||
//
|
||||
// This program is free software; you can redistribute it and/or modify
|
||||
// it under the terms of the GNU General Public License version 2 as
|
||||
@ -18,45 +19,44 @@
|
||||
// Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
|
||||
//
|
||||
|
||||
#ifndef SCHEDCARTLIST_H
|
||||
#define SCHEDCARTLIST_H
|
||||
#ifndef RDSCHEDCARTLIST_H
|
||||
#define RDSCHEDCARTLIST_H
|
||||
|
||||
#include <qsqldatabase.h>
|
||||
#include <qlist.h>
|
||||
#include <qstringlist.h>
|
||||
|
||||
class SchedCartList
|
||||
class RDSchedCartList
|
||||
{
|
||||
public:
|
||||
SchedCartList(int listsize);
|
||||
~SchedCartList();
|
||||
void insertItem(unsigned cartnumber,int cartlength,int stack_id,QString stack_artist,QString stack_schedcodes);
|
||||
RDSchedCartList();
|
||||
void insertItem(unsigned cartnumber,int cartlength,int stack_id,
|
||||
const QString &stack_artist,
|
||||
const QStringList &stack_schedcodes);
|
||||
void removeItem(int itemnumber);
|
||||
bool removeIfCode(int itemnumber,QString test_code);
|
||||
bool itemHasCode(int itemnumber,QString test_code);
|
||||
bool itemHasCodes(int itemnumber,QStringList test_codes);
|
||||
bool removeIfCode(int itemnumber,const QString &test_code);
|
||||
bool itemHasCode(int itemnumber,const QString &test_code);
|
||||
bool itemHasCodes(int itemnumber,const QStringList &test_codes);
|
||||
unsigned getItemCartNumber(int itemnumber);
|
||||
int getItemCartLength(int itemnumber);
|
||||
int getItemStackid(int itemnumber);
|
||||
QString getItemArtist(int itemnumber);
|
||||
QString getItemSchedCodes(int itemnumber);
|
||||
QStringList getItemSchedCodes(int itemnumber);
|
||||
int getNumberOfItems(void);
|
||||
void save(void);
|
||||
void restore(void);
|
||||
|
||||
private:
|
||||
int itemcounter;
|
||||
int saveitemcounter;
|
||||
unsigned* cartnum;
|
||||
unsigned* savecartnum;
|
||||
int* cartlen;
|
||||
int* savecartlen;
|
||||
int* stackid;
|
||||
int* savestackid;
|
||||
QString* saveartist;
|
||||
QString* artist;
|
||||
QString* sched_codes;
|
||||
QString* save_sched_codes;
|
||||
QList<unsigned> list_cartnum;
|
||||
QList<unsigned> list_savecartnum;
|
||||
QList<int> list_cartlen;
|
||||
QList<int> list_savecartlen;
|
||||
QList<int> list_stackid;
|
||||
QList<int> list_savestackid;
|
||||
QStringList list_artist;
|
||||
QStringList list_saveartist;
|
||||
QList<QStringList> list_schedcodes;
|
||||
QList<QStringList> list_saveschedcodes;
|
||||
};
|
||||
|
||||
|
||||
#endif
|
||||
#endif // RDSCHEDCARTLIST_H
|
@ -1,8 +1,9 @@
|
||||
// schedruleslist.cpp
|
||||
// rdschedruleslist.cpp
|
||||
//
|
||||
// A class for handling the scheduling rules for rdlogmanager/edit clocks
|
||||
//
|
||||
// Stefan Gabriel <stg@st-gabriel.de>
|
||||
// (C) Copyright 2005 Stefan Gabriel <stg@st-gabriel.de>
|
||||
// (C) Copyright 2019 Fred Gleason <fredg@paravelsystems.com>
|
||||
//
|
||||
// This program is free software; you can redistribute it and/or modify
|
||||
// it under the terms of the GNU General Public License version 2 as
|
||||
@ -20,12 +21,12 @@
|
||||
|
||||
#include <qmessagebox.h>
|
||||
|
||||
#include <rdclock.h>
|
||||
#include <rddb.h>
|
||||
#include <rdescape_string.h>
|
||||
#include <schedruleslist.h>
|
||||
#include "rdclock.h"
|
||||
#include "rddb.h"
|
||||
#include "rdescape_string.h"
|
||||
#include "rdschedruleslist.h"
|
||||
|
||||
SchedRulesList::SchedRulesList(QString clockname,RDConfig *config)
|
||||
RDSchedRulesList::RDSchedRulesList(QString clockname,RDConfig *config)
|
||||
{
|
||||
QString sql;
|
||||
RDSqlQuery *q;
|
||||
@ -77,7 +78,7 @@ SchedRulesList::SchedRulesList(QString clockname,RDConfig *config)
|
||||
delete q;
|
||||
}
|
||||
|
||||
SchedRulesList::~SchedRulesList()
|
||||
RDSchedRulesList::~RDSchedRulesList()
|
||||
{
|
||||
delete []sched_code;
|
||||
delete []max_row;
|
||||
@ -88,7 +89,7 @@ SchedRulesList::~SchedRulesList()
|
||||
delete []description;
|
||||
}
|
||||
|
||||
void SchedRulesList::insertItem(int pos,int maxrow,int minwait,QString notafter,QString orafter,QString orafterii)
|
||||
void RDSchedRulesList::insertItem(int pos,int maxrow,int minwait,QString notafter,QString orafter,QString orafterii)
|
||||
{
|
||||
max_row[pos] = maxrow;
|
||||
min_wait[pos] = minwait;
|
||||
@ -97,47 +98,47 @@ void SchedRulesList::insertItem(int pos,int maxrow,int minwait,QString notafter,
|
||||
or_after_II[pos] = orafterii;
|
||||
}
|
||||
|
||||
QString SchedRulesList::getItemSchedCode(int pos)
|
||||
QString RDSchedRulesList::getItemSchedCode(int pos)
|
||||
{
|
||||
return sched_code[pos];
|
||||
}
|
||||
|
||||
int SchedRulesList::getItemMaxRow(int pos)
|
||||
int RDSchedRulesList::getItemMaxRow(int pos)
|
||||
{
|
||||
return max_row[pos];
|
||||
}
|
||||
|
||||
int SchedRulesList::getItemMinWait(int pos)
|
||||
int RDSchedRulesList::getItemMinWait(int pos)
|
||||
{
|
||||
return min_wait[pos];
|
||||
}
|
||||
|
||||
QString SchedRulesList::getItemNotAfter(int pos)
|
||||
QString RDSchedRulesList::getItemNotAfter(int pos)
|
||||
{
|
||||
return not_after[pos];
|
||||
}
|
||||
|
||||
QString SchedRulesList::getItemOrAfter(int pos)
|
||||
QString RDSchedRulesList::getItemOrAfter(int pos)
|
||||
{
|
||||
return or_after[pos];
|
||||
}
|
||||
|
||||
QString SchedRulesList::getItemOrAfterII(int pos)
|
||||
QString RDSchedRulesList::getItemOrAfterII(int pos)
|
||||
{
|
||||
return or_after_II[pos];
|
||||
}
|
||||
|
||||
QString SchedRulesList::getItemDescription(int pos)
|
||||
QString RDSchedRulesList::getItemDescription(int pos)
|
||||
{
|
||||
return description[pos];
|
||||
}
|
||||
|
||||
int SchedRulesList::getNumberOfItems(void)
|
||||
int RDSchedRulesList::getNumberOfItems(void)
|
||||
{
|
||||
return itemcounter;
|
||||
}
|
||||
|
||||
void SchedRulesList::Save(QString clockname)
|
||||
void RDSchedRulesList::Save(QString clockname)
|
||||
{
|
||||
QString sql;
|
||||
|
56
lib/rdschedruleslist.h
Normal file
56
lib/rdschedruleslist.h
Normal file
@ -0,0 +1,56 @@
|
||||
// rdschedruleslist.h
|
||||
//
|
||||
// A class for handling the scheduling rules for rdlogmanager/edit clocks
|
||||
//
|
||||
// (C) Copyright Stefan Gabriel <stg@st-gabriel.de>
|
||||
// (C) Copyright 2019 Fred Gleason <fredg@paravelsystems.com>
|
||||
//
|
||||
// This program is free software; you can redistribute it and/or modify
|
||||
// it under the terms of the GNU General Public License version 2 as
|
||||
// published by the Free Software Foundation.
|
||||
//
|
||||
// This program is distributed in the hope that it will be useful,
|
||||
// but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
// GNU General Public License for more details.
|
||||
//
|
||||
// You should have received a copy of the GNU General Public
|
||||
// License along with this program; if not, write to the Free Software
|
||||
// Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
|
||||
//
|
||||
|
||||
#ifndef RDSCHEDRULESLIST_H
|
||||
#define RDSCHEDRULESLIST_H
|
||||
|
||||
#include <rdconfig.h>
|
||||
|
||||
class RDSchedRulesList
|
||||
{
|
||||
public:
|
||||
RDSchedRulesList(QString clockname,RDConfig *config);
|
||||
~RDSchedRulesList();
|
||||
void insertItem(int pos,int maxrow,int minwait,QString notafter,
|
||||
QString orafter,QString orafterii);
|
||||
QString getItemSchedCode(int pos);
|
||||
int getItemMaxRow(int pos);
|
||||
int getItemMinWait(int pos);
|
||||
int getNumberOfItems(void);
|
||||
QString getItemNotAfter(int pos);
|
||||
QString getItemOrAfter(int pos);
|
||||
QString getItemOrAfterII(int pos);
|
||||
QString getItemDescription(int pos);
|
||||
void Save(QString clockname);
|
||||
|
||||
private:
|
||||
int itemcounter;
|
||||
QString* sched_code;
|
||||
int* max_row;
|
||||
int* min_wait;
|
||||
QString* not_after;
|
||||
QString* or_after;
|
||||
QString* or_after_II;
|
||||
QString* description;
|
||||
};
|
||||
|
||||
|
||||
#endif // RDSCHEDRULESLIST_H
|
@ -1410,6 +1410,15 @@ void RDSvc::remove(const QString &name)
|
||||
}
|
||||
delete q;
|
||||
|
||||
sql=QString("select ID from STACK_LINES where ")+
|
||||
"SERVICE_NAME=\""+RDEscapeString(name)+"\"";
|
||||
q=new RDSqlQuery(sql);
|
||||
while(q->next()) {
|
||||
sql=QString("delete from STACK_SCHED_CODES where ")+
|
||||
QString().sprintf("STACK_LINES_ID=%u",q->value(0).toUInt());
|
||||
RDSqlQuery::apply(sql);
|
||||
}
|
||||
delete q;
|
||||
sql=QString("delete from STACK_LINES where ")+
|
||||
"SERVICE_NAME=\""+RDEscapeString(name)+"\"";
|
||||
RDSqlQuery::apply(sql);
|
||||
|
@ -70,6 +70,7 @@ RDWaveFile::RDWaveFile(QString file_name)
|
||||
//
|
||||
// Initialize Class Structures
|
||||
//
|
||||
wave_file_name=file_name;
|
||||
wave_file.setName(file_name);
|
||||
wave_data=NULL;
|
||||
recordable=false;
|
||||
@ -213,6 +214,7 @@ void RDWaveFile::nameWave(QString file_name)
|
||||
return;
|
||||
}
|
||||
wave_file.setName(file_name);
|
||||
wave_file_name=file_name;
|
||||
}
|
||||
|
||||
|
||||
@ -223,12 +225,15 @@ bool RDWaveFile::openWave(RDWaveData *data)
|
||||
vorbis_info *vorbis_info;
|
||||
#endif // HAVE_VORBIS
|
||||
unsigned char tmc_buffer[4];
|
||||
int fd=-1;
|
||||
|
||||
wave_data=data;
|
||||
if(!wave_file.open(QIODevice::ReadOnly)) {
|
||||
if((fd=open(wave_file_name.toUtf8(),O_RDONLY))<0) {
|
||||
return false;
|
||||
}
|
||||
if(!wave_file.open(fd,QIODevice::ReadOnly)) {
|
||||
return false;
|
||||
}
|
||||
|
||||
switch(GetType(wave_file.handle())) {
|
||||
case RDWaveFile::Wave:
|
||||
if(GetFmt(wave_file.handle())) {
|
||||
@ -401,7 +406,6 @@ bool RDWaveFile::openWave(RDWaveData *data)
|
||||
}
|
||||
|
||||
dlmp4.MP4Close(f, 0);
|
||||
|
||||
return true;
|
||||
|
||||
#else
|
||||
@ -428,7 +432,7 @@ bool RDWaveFile::openWave(RDWaveData *data)
|
||||
data_chunk=true;
|
||||
format_chunk=true;
|
||||
wave_type=RDWaveFile::Ogg;
|
||||
ReadNormalizeLevel(wave_file.name());
|
||||
ReadNormalizeLevel(wave_file_name);
|
||||
ValidateMetadata();
|
||||
return true;
|
||||
#else
|
||||
@ -550,7 +554,7 @@ bool RDWaveFile::createWave(RDWaveData *data,unsigned ptr_offset)
|
||||
}
|
||||
prev_mask = umask(0113); // Set umask so files are user and group writable.
|
||||
rc=wave_file.open(QIODevice::ReadWrite|QIODevice::Truncate);
|
||||
unlink((wave_file.name()+".energy").ascii());
|
||||
unlink((wave_file_name+".energy").ascii());
|
||||
umask(prev_mask);
|
||||
if(rc==false) {
|
||||
return false;
|
||||
@ -911,7 +915,7 @@ void RDWaveFile::resetWave()
|
||||
|
||||
QString RDWaveFile::getName() const
|
||||
{
|
||||
return wave_file.name();
|
||||
return wave_file_name;
|
||||
}
|
||||
|
||||
|
||||
@ -1337,10 +1341,8 @@ int RDWaveFile::seekWave(int offset,int whence)
|
||||
switch(whence) {
|
||||
case SEEK_SET:
|
||||
if(ov_pcm_seek(&vorbis_file,offset/(2*channels))==0) {
|
||||
//printf("RDWaveFile::seekWave() = %d\n",offset);
|
||||
return offset;
|
||||
}
|
||||
//printf("RDWaveFile::seekWave() = -1\n");
|
||||
return -1;
|
||||
break;
|
||||
|
||||
@ -2442,7 +2444,7 @@ bool RDWaveFile::IsFlac(int fd)
|
||||
#ifdef HAVE_FLAC
|
||||
char buffer[5];
|
||||
|
||||
ID3_Tag id3_tag(Q3CString().sprintf("%s",(const char *)wave_file.name().utf8()));
|
||||
ID3_Tag id3_tag(Q3CString().sprintf("%s",(const char *)wave_file_name.utf8()));
|
||||
lseek(fd,id3_tag.GetPrependedBytes(),SEEK_SET);
|
||||
if(read(fd,buffer,4)!=4) {
|
||||
return false;
|
||||
@ -3488,10 +3490,10 @@ void RDWaveFile::ReadId3Metadata()
|
||||
return;
|
||||
}
|
||||
bool using_rdxl=false;
|
||||
TagLib::FileRef tagref(wave_file.name().toUtf8());
|
||||
TagLib::FileRef tagref(wave_file_name.toUtf8());
|
||||
if(tagref.file()==NULL) { // Take another look with ID3Lib
|
||||
ID3_Frame *frame=NULL;
|
||||
ID3_Tag id3_tag(wave_file.name().toUtf8());
|
||||
ID3_Tag id3_tag(wave_file_name.toUtf8());
|
||||
if((frame=id3_tag.Find(ID3FID_USERTEXT,ID3FN_DESCRIPTION,"rdxl"))!=NULL) {
|
||||
rdxl_contents=ID3_GetString(frame,ID3FN_TEXT);
|
||||
if(wave_data!=NULL) {
|
||||
@ -3515,7 +3517,7 @@ void RDWaveFile::ReadId3Metadata()
|
||||
if(name==QString::fromUtf8("牤硬")) { // Mangled RD v2.x RDXL Frame
|
||||
using_rdxl=true;
|
||||
ID3_Frame *frame=NULL;
|
||||
ID3_Tag id3_tag(wave_file.name().toUtf8());
|
||||
ID3_Tag id3_tag(wave_file_name.toUtf8());
|
||||
if((frame=id3_tag.Find(ID3FID_USERTEXT,ID3FN_DESCRIPTION,"rdxl"))!=NULL) {
|
||||
rdxl_contents=ID3_GetString(frame,ID3FN_TEXT);
|
||||
if(wave_data!=NULL) {
|
||||
@ -4177,7 +4179,7 @@ bool RDWaveFile::GetFlacStreamInfo()
|
||||
{
|
||||
#if HAVE_FLAC
|
||||
FLAC__StreamMetadata sinfo;
|
||||
if(!FLAC__metadata_get_streaminfo(Q3CString().sprintf("%s",(const char *)wave_file.name().utf8()),&sinfo)) {
|
||||
if(!FLAC__metadata_get_streaminfo(Q3CString().sprintf("%s",(const char *)wave_file_name.utf8()),&sinfo)) {
|
||||
return false;
|
||||
}
|
||||
samples_per_sec=sinfo.data.stream_info.sample_rate;
|
||||
@ -4200,7 +4202,7 @@ void RDWaveFile::ReadFlacMetadata()
|
||||
QString composer;
|
||||
FLAC__StreamMetadata* tags;
|
||||
if(!FLAC__metadata_get_tags(Q3CString().
|
||||
sprintf("%s",(const char *)wave_file.name().utf8()),&tags)) {
|
||||
sprintf("%s",(const char *)wave_file_name.utf8()),&tags)) {
|
||||
return;
|
||||
}
|
||||
for(unsigned iCommentIndex=0;
|
||||
@ -4653,7 +4655,7 @@ void RDWaveFile::GetEnergy()
|
||||
{
|
||||
int file_ptr;
|
||||
|
||||
ReadEnergyFile(wave_file.name());
|
||||
ReadEnergyFile(wave_file_name);
|
||||
|
||||
if(!levl_chunk) {
|
||||
GetLevl(wave_file.handle());
|
||||
|
@ -1076,6 +1076,7 @@ class RDWaveFile
|
||||
#endif // HAVE_VORBIS
|
||||
int WriteOggBuffer(char *buf,int size);
|
||||
unsigned FrameOffset(int msecs) const;
|
||||
QString wave_file_name;
|
||||
QFile wave_file;
|
||||
RDWaveData *wave_data;
|
||||
bool recordable; // Allow DATA chunk writes?
|
||||
|
@ -1,188 +0,0 @@
|
||||
// schedcartlist.cpp
|
||||
//
|
||||
// A class for handling carts to be used in scheduler
|
||||
//
|
||||
// Stefan Gabriel <stg@st-gabriel.de>
|
||||
//
|
||||
// This program is free software; you can redistribute it and/or modify
|
||||
// it under the terms of the GNU General Public License version 2 as
|
||||
// published by the Free Software Foundation.
|
||||
//
|
||||
// This program is distributed in the hope that it will be useful,
|
||||
// but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
// GNU General Public License for more details.
|
||||
//
|
||||
// You should have received a copy of the GNU General Public
|
||||
// License along with this program; if not, write to the Free Software
|
||||
// Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
|
||||
//
|
||||
|
||||
#include <stdio.h>
|
||||
#include "schedcartlist.h"
|
||||
|
||||
SchedCartList::SchedCartList(int listsize)
|
||||
{
|
||||
cartnum=new unsigned[listsize];
|
||||
cartlen=new int[listsize];
|
||||
stackid=new int[listsize];
|
||||
artist=new QString[listsize];
|
||||
sched_codes=new QString[listsize];
|
||||
itemcounter=0;
|
||||
}
|
||||
|
||||
SchedCartList::~SchedCartList()
|
||||
{
|
||||
delete []cartnum;
|
||||
delete []cartlen;
|
||||
delete []stackid;
|
||||
delete []artist;
|
||||
delete []sched_codes;
|
||||
}
|
||||
|
||||
void SchedCartList::insertItem(unsigned cartnumber,int cartlength,int stack_id,QString stack_artist,QString stack_schedcodes)
|
||||
{
|
||||
cartnum[itemcounter]=cartnumber;
|
||||
cartlen[itemcounter]=cartlength;
|
||||
stackid[itemcounter]=stack_id;
|
||||
artist[itemcounter]=stack_artist.lower().replace(" ","");
|
||||
if(stack_schedcodes=="") {
|
||||
stack_schedcodes=".";
|
||||
}
|
||||
sched_codes[itemcounter]=stack_schedcodes;
|
||||
itemcounter++;
|
||||
}
|
||||
|
||||
|
||||
void SchedCartList::removeItem(int itemnumber)
|
||||
{
|
||||
for(int i=itemnumber;i<(itemcounter-1);i++) {
|
||||
cartnum[i]=cartnum[i+1];
|
||||
cartlen[i]=cartlen[i+1];
|
||||
stackid[i]=stackid[i+1];
|
||||
artist[i]=artist[i+1];
|
||||
sched_codes[i]=sched_codes[i+1];
|
||||
}
|
||||
itemcounter--;
|
||||
}
|
||||
|
||||
bool SchedCartList::removeIfCode(int itemnumber,QString test_code)
|
||||
{
|
||||
QString test = test_code;
|
||||
test+=" ";
|
||||
test=test.left(11);
|
||||
|
||||
if (sched_codes[itemnumber].find(test)!=-1) {
|
||||
for(int i=itemnumber;i<(itemcounter-1);i++) {
|
||||
cartnum[i]=cartnum[i+1];
|
||||
cartlen[i]=cartlen[i+1];
|
||||
stackid[i]=stackid[i+1];
|
||||
artist[i]=artist[i+1];
|
||||
sched_codes[i]=sched_codes[i+1];
|
||||
}
|
||||
itemcounter--;
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
bool SchedCartList::itemHasCode(int itemnumber,QString test_code)
|
||||
{
|
||||
QString test=test_code;
|
||||
test+=" ";
|
||||
test=test.left(11);
|
||||
|
||||
if (sched_codes[itemnumber].find(test)!=-1) {
|
||||
return true;
|
||||
}
|
||||
else {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
bool SchedCartList::itemHasCodes(int itemnumber,QStringList test_codes)
|
||||
{
|
||||
for (int i=0;i<test_codes.size();i++) {
|
||||
QString test=test_codes.at(i);
|
||||
test+=" ";
|
||||
test=test.left(11);
|
||||
|
||||
if (sched_codes[itemnumber].find(test)!=-1) {
|
||||
return true;
|
||||
}
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
void SchedCartList::save(void)
|
||||
{
|
||||
savecartnum=new unsigned[itemcounter];
|
||||
savecartlen=new int[itemcounter];
|
||||
savestackid=new int[itemcounter];
|
||||
saveartist=new QString[itemcounter];
|
||||
save_sched_codes=new QString[itemcounter];
|
||||
|
||||
saveitemcounter=itemcounter;
|
||||
for(int i=0;i<saveitemcounter;i++) {
|
||||
savecartnum[i]=cartnum[i];
|
||||
savecartlen[i]=cartlen[i];
|
||||
savestackid[i]=stackid[i];
|
||||
saveartist[i]=artist[i];
|
||||
save_sched_codes[i]=sched_codes[i];
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
void SchedCartList::restore(void)
|
||||
{
|
||||
if(itemcounter==0) {
|
||||
for(int i=0;i<saveitemcounter;i++) {
|
||||
cartnum[i]=savecartnum[i];
|
||||
cartlen[i]=savecartlen[i];
|
||||
stackid[i]=savestackid[i];
|
||||
artist[i]=saveartist[i];
|
||||
sched_codes[i]=save_sched_codes[i];
|
||||
}
|
||||
itemcounter=saveitemcounter;
|
||||
}
|
||||
delete []savecartnum;
|
||||
delete []savecartlen;
|
||||
delete []savestackid;
|
||||
delete []saveartist;
|
||||
delete []save_sched_codes;
|
||||
}
|
||||
|
||||
|
||||
|
||||
unsigned SchedCartList::getItemCartNumber(int itemnumber)
|
||||
{
|
||||
return cartnum[itemnumber];
|
||||
}
|
||||
|
||||
int SchedCartList::getItemStackid(int itemnumber)
|
||||
{
|
||||
return stackid[itemnumber];
|
||||
}
|
||||
|
||||
QString SchedCartList::getItemArtist(int itemnumber)
|
||||
{
|
||||
return artist[itemnumber];
|
||||
}
|
||||
|
||||
QString SchedCartList::getItemSchedCodes(int itemnumber)
|
||||
{
|
||||
return sched_codes[itemnumber];
|
||||
}
|
||||
|
||||
int SchedCartList::getItemCartLength(int itemnumber)
|
||||
{
|
||||
return cartlen[itemnumber];
|
||||
}
|
||||
|
||||
|
||||
int SchedCartList::getNumberOfItems(void)
|
||||
{
|
||||
return itemcounter;
|
||||
}
|
||||
|
@ -1,57 +0,0 @@
|
||||
// schedruleslist.h
|
||||
//
|
||||
// A class for handling the scheduling rules for rdlogmanager/edit clocks
|
||||
//
|
||||
// Stefan Gabriel <stg@st-gabriel.de>
|
||||
//
|
||||
// This program is free software; you can redistribute it and/or modify
|
||||
// it under the terms of the GNU General Public License version 2 as
|
||||
// published by the Free Software Foundation.
|
||||
//
|
||||
// This program is distributed in the hope that it will be useful,
|
||||
// but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
// GNU General Public License for more details.
|
||||
//
|
||||
// You should have received a copy of the GNU General Public
|
||||
// License along with this program; if not, write to the Free Software
|
||||
// Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
|
||||
//
|
||||
|
||||
#ifndef SCHEDRULESLIST_H
|
||||
#define SCHEDRULESLIST_H
|
||||
|
||||
#include <rdconfig.h>
|
||||
|
||||
class SchedRulesList
|
||||
{
|
||||
public:
|
||||
SchedRulesList(QString clockname,RDConfig *config);
|
||||
~SchedRulesList();
|
||||
void insertItem(int pos,int maxrow,int minwait,QString notafter,QString orafter,QString orafterii);
|
||||
QString getItemSchedCode(int pos);
|
||||
int getItemMaxRow(int pos);
|
||||
int getItemMinWait(int pos);
|
||||
int getNumberOfItems(void);
|
||||
QString getItemNotAfter(int pos);
|
||||
QString getItemOrAfter(int pos);
|
||||
QString getItemOrAfterII(int pos);
|
||||
QString getItemDescription(int pos);
|
||||
void Save(QString clockname);
|
||||
|
||||
|
||||
private:
|
||||
int itemcounter;
|
||||
QString* sched_code;
|
||||
int* max_row;
|
||||
int* min_wait;
|
||||
QString* not_after;
|
||||
QString* or_after;
|
||||
QString* or_after_II;
|
||||
QString* description;
|
||||
|
||||
};
|
||||
|
||||
|
||||
#endif
|
||||
|
@ -240,7 +240,7 @@ EditClock::EditClock(QString clockname,bool new_clock,
|
||||
//
|
||||
// Populate Data
|
||||
//
|
||||
sched_rules_list = new SchedRulesList(clockname,rda->config());
|
||||
sched_rules_list = new RDSchedRulesList(clockname,rda->config());
|
||||
edit_clock=new RDClock(rda->station());
|
||||
edit_clock->setName(clockname);
|
||||
edit_clock->load();
|
||||
|
@ -31,7 +31,7 @@
|
||||
#include <q3textedit.h>
|
||||
|
||||
#include <rdclock.h>
|
||||
#include <schedruleslist.h>
|
||||
#include <rdschedruleslist.h>
|
||||
|
||||
#include "clock_listview.h"
|
||||
|
||||
@ -93,7 +93,7 @@ class EditClock : public QDialog
|
||||
QString edit_name;
|
||||
bool edit_new_clock;
|
||||
std::vector<QString> *edit_new_clocks;
|
||||
SchedRulesList* sched_rules_list;
|
||||
RDSchedRulesList* sched_rules_list;
|
||||
Q3TextEdit *edit_remarks_edit;
|
||||
};
|
||||
|
||||
|
@ -31,12 +31,11 @@
|
||||
#include <qcombobox.h>
|
||||
|
||||
#include <rd.h>
|
||||
#include <schedruleslist.h>
|
||||
|
||||
#include "edit_schedcoderules.h"
|
||||
|
||||
editSchedCodeRules::editSchedCodeRules(Q3ListViewItem *item,
|
||||
SchedRulesList *sched_rules_list,
|
||||
RDSchedRulesList *sched_rules_list,
|
||||
QWidget* parent)
|
||||
: QDialog(parent)
|
||||
{
|
||||
|
@ -3,7 +3,7 @@
|
||||
// Change rules for scheduler codes dialog
|
||||
//
|
||||
// (C) Copyright Stefan Gabriel <stg@st-gabriel.de>
|
||||
// (C) Copyright 2002-2018 Fred Gleason <fredg@paravelsystems.com>
|
||||
// (C) Copyright 2002-2019 Fred Gleason <fredg@paravelsystems.com>
|
||||
//
|
||||
// This program is free software; you can redistribute it and/or modify
|
||||
// it under the terms of the GNU General Public License version 2 as
|
||||
@ -28,7 +28,7 @@
|
||||
#include <qcombobox.h>
|
||||
#include <qvariant.h>
|
||||
|
||||
#include <schedruleslist.h>
|
||||
#include <rdschedruleslist.h>
|
||||
|
||||
#include "clock_listview.h"
|
||||
|
||||
@ -38,7 +38,7 @@ class editSchedCodeRules : public QDialog
|
||||
{
|
||||
Q_OBJECT
|
||||
public:
|
||||
editSchedCodeRules(Q3ListViewItem *item, SchedRulesList *sched_rules_list,
|
||||
editSchedCodeRules(Q3ListViewItem *item, RDSchedRulesList *sched_rules_list,
|
||||
QWidget *parent=0);
|
||||
~editSchedCodeRules();
|
||||
QSize sizeHint() const;
|
||||
|
@ -37,9 +37,8 @@
|
||||
#include "edit_schedcoderules.h"
|
||||
#include "globals.h"
|
||||
#include "list_clocks.h"
|
||||
#include "schedruleslist.h"
|
||||
|
||||
EditSchedRules::EditSchedRules(QString clock,unsigned *artistsep,SchedRulesList *schedruleslist,bool *rules_modified,QWidget *parent)
|
||||
EditSchedRules::EditSchedRules(QString clock,unsigned *artistsep,RDSchedRulesList *schedruleslist,bool *rules_modified,QWidget *parent)
|
||||
: QDialog(parent)
|
||||
{
|
||||
setModal(true);
|
||||
@ -231,7 +230,7 @@ void EditSchedRules::importData()
|
||||
return;
|
||||
}
|
||||
delete listclocks;
|
||||
SchedRulesList *import_list=new SchedRulesList(clockname,rda->config());
|
||||
RDSchedRulesList *import_list=new RDSchedRulesList(clockname,rda->config());
|
||||
|
||||
list_schedCodes_view->clear();
|
||||
for (int i=0; i<import_list->getNumberOfItems(); i++)
|
||||
|
@ -29,7 +29,7 @@
|
||||
#include <qvariant.h>
|
||||
|
||||
#include <rdlistview.h>
|
||||
#include <schedruleslist.h>
|
||||
#include <rdschedruleslist.h>
|
||||
|
||||
class QSpinBox;
|
||||
|
||||
@ -38,7 +38,7 @@ class EditSchedRules : public QDialog
|
||||
Q_OBJECT
|
||||
public:
|
||||
EditSchedRules(QString clock,unsigned *artistsep,
|
||||
SchedRulesList *schedruleslist,bool *rules_modified,
|
||||
RDSchedRulesList *schedruleslist,bool *rules_modified,
|
||||
QWidget *parent=0);
|
||||
~EditSchedRules();
|
||||
QSize sizeHint() const;
|
||||
@ -63,7 +63,7 @@ class EditSchedRules : public QDialog
|
||||
QString clockname;
|
||||
unsigned* edit_artistsep;
|
||||
bool* edit_rules_modified;
|
||||
SchedRulesList* sched_rules_list;
|
||||
RDSchedRulesList* sched_rules_list;
|
||||
bool edit_modified;
|
||||
};
|
||||
|
||||
|
@ -19,7 +19,7 @@
|
||||
##
|
||||
|
||||
# So python bytecompilation works correctly
|
||||
%define __python /usr/bin/python3.4
|
||||
%define __python /usr/bin/python3.6
|
||||
|
||||
Summary: Radio Broadcast Automation System
|
||||
Name: rivendell
|
||||
@ -51,7 +51,7 @@ Requires: rivendell = @VERSION@, rivendell-webapi = @VERSION@
|
||||
|
||||
%package pypad
|
||||
Summary: PyPAD Program Associated Data script system for Rivendell
|
||||
Requires: python34, python34-pycurl, python34-requests, python34-pyserial, python34-mysql
|
||||
Requires: python36, python36-pycurl, python36-requests, python36-pyserial, python36-mysql
|
||||
|
||||
%package select
|
||||
Summary: The RDSelect system selector tool for Rivendell.
|
||||
@ -109,7 +109,7 @@ associated with.
|
||||
|
||||
|
||||
%build
|
||||
export PYTHON=/usr/bin/python3.4
|
||||
export PYTHON=/usr/bin/python3.6
|
||||
%configure --libexecdir=@libexecdir@ --sysconfdir=@sysconfdir@ @RDXPORTDEBUG@
|
||||
make -j 10
|
||||
|
||||
@ -157,7 +157,7 @@ cp scripts/engine_conv.py $RPM_BUILD_ROOT/@DOC_PATH@
|
||||
cp scripts/init_template_host.py $RPM_BUILD_ROOT/@DOC_PATH@
|
||||
rm -f $RPM_BUILD_ROOT/etc/auto.rd.audiostore
|
||||
rm -rf $RPM_BUILD_ROOT%{_libdir}/rivendell/pypad/__pycache__
|
||||
rm -rf $RPM_BUILD_ROOT%{_libdir}/python3.4/site-packages/__pycache__
|
||||
rm -rf $RPM_BUILD_ROOT%{_libdir}/python3.6/site-packages/__pycache__
|
||||
|
||||
%post
|
||||
/sbin/ldconfig
|
||||
@ -484,8 +484,8 @@ rm -rf $RPM_BUILD_ROOT
|
||||
|
||||
%files pypad
|
||||
%{_libdir}/rivendell/pypad/*
|
||||
%{_libdir}/python3.4/site-packages/pypad*
|
||||
%{_libdir}/python3.4/site-packages/__pycache__/pypad*
|
||||
%{_libdir}/python3.6/site-packages/pypad*
|
||||
%{_libdir}/python3.6/site-packages/__pycache__/pypad*
|
||||
|
||||
|
||||
%post pypad
|
||||
|
@ -434,6 +434,14 @@ bool MainObject::DropColumn(const QString &tbl_name,const QString &col_name,
|
||||
}
|
||||
|
||||
|
||||
bool MainObject::DropIndex(const QString &tbl_name,const QString &idx_name,
|
||||
QString *err_msg) const
|
||||
{
|
||||
QString sql=QString("alter table `")+tbl_name+"` drop index `"+idx_name+"`";
|
||||
return RDSqlQuery::apply(sql,err_msg);
|
||||
}
|
||||
|
||||
|
||||
int main(int argc,char *argv[])
|
||||
{
|
||||
QApplication a(argc,argv,false);
|
||||
|
@ -120,6 +120,8 @@ class MainObject : public QObject
|
||||
bool ColumnExists(const QString &tbl_name,const QString &col_name) const;
|
||||
bool DropColumn(const QString &tbl_name,const QString &col_name,
|
||||
QString *err_msg=NULL) const;
|
||||
bool DropIndex(const QString &tbl_name,const QString &idx_name,
|
||||
QString *err_msg=NULL) const;
|
||||
Command db_command;
|
||||
QString db_mysql_hostname;
|
||||
QString db_mysql_loginname;
|
||||
|
@ -40,6 +40,58 @@ bool MainObject::RevertSchema(int cur_schema,int set_schema,QString *err_msg)
|
||||
|
||||
// NEW SCHEMA REVERSIONS GO HERE...
|
||||
|
||||
//
|
||||
// Revert 308
|
||||
//
|
||||
if((cur_schema==308)&&(set_schema<cur_schema)) {
|
||||
sql=QString("alter table STACK_LINES add column ")+
|
||||
"SCHED_CODES varchar(191) not null after ARTIST";
|
||||
if(!RDSqlQuery::apply(sql,err_msg)) {
|
||||
return false;
|
||||
}
|
||||
/*
|
||||
sql=QString("create index SCHED_STACK_ID_IDX on STACK_LINES ")+
|
||||
"(SERVICE_NAME,SCHED_STACK_ID,SCHED_CODES)";
|
||||
if(!RDSqlQuery::apply(sql,err_msg)) {
|
||||
return false;
|
||||
}
|
||||
*/
|
||||
QString codes="";
|
||||
sql=QString("select ")+
|
||||
"ID " // 00
|
||||
"from STACK_LINES";
|
||||
q=new RDSqlQuery(sql,false);
|
||||
while(q->next()) {
|
||||
sql=QString("select ")+
|
||||
"SCHED_CODE " // 00
|
||||
"from STACK_SCHED_CODES where "+
|
||||
QString().sprintf("STACK_LINES_ID=%u",q->value(0).toUInt());
|
||||
q1=new RDSqlQuery(sql,false);
|
||||
while(q1->next()) {
|
||||
codes+=q1->value(0).toString();
|
||||
while((codes.length()%10)!=0) {
|
||||
codes+=" ";
|
||||
}
|
||||
}
|
||||
delete q1;
|
||||
codes+=".";
|
||||
sql=QString("update STACK_LINES set ")+
|
||||
"SCHED_CODES=\""+RDEscapeString(codes)+"\" where "+
|
||||
QString().sprintf("ID=%u",q->value(0).toUInt());
|
||||
if(!RDSqlQuery::apply(sql,err_msg)) {
|
||||
return false;
|
||||
}
|
||||
codes="";
|
||||
}
|
||||
delete q;
|
||||
DropTable("STACK_SCHED_CODES",err_msg);
|
||||
|
||||
WriteSchemaVersion(--cur_schema);
|
||||
}
|
||||
|
||||
//
|
||||
// Revert 307
|
||||
//
|
||||
if((cur_schema==307)&&(set_schema<cur_schema)) {
|
||||
DropColumn("EVENTS","ARTIST_SEP");
|
||||
sql="alter table `EVENTS` modify column `TITLE_SEP` int(10) unsigned";
|
||||
|
@ -156,7 +156,7 @@ void MainObject::InitializeSchemaMap() {
|
||||
global_version_map["2.17"]=268;
|
||||
global_version_map["2.18"]=272;
|
||||
global_version_map["2.19"]=275;
|
||||
global_version_map["3.0"]=307;
|
||||
global_version_map["3.0"]=308;
|
||||
}
|
||||
|
||||
|
||||
|
@ -2,7 +2,7 @@
|
||||
//
|
||||
// Update Rivendell DB schema.
|
||||
//
|
||||
// (C) Copyright 2018 Fred Gleason <fredg@paravelsystems.com>
|
||||
// (C) Copyright 2018-2019 Fred Gleason <fredg@paravelsystems.com>
|
||||
//
|
||||
// This program is free software; you can redistribute it and/or modify
|
||||
// it under the terms of the GNU General Public License version 2 as
|
||||
@ -9700,6 +9700,40 @@ bool MainObject::UpdateSchema(int cur_schema,int set_schema,QString *err_msg)
|
||||
WriteSchemaVersion(++cur_schema);
|
||||
}
|
||||
|
||||
if((cur_schema<308)&&(set_schema>cur_schema)) {
|
||||
sql=QString("create table if not exists STACK_SCHED_CODES (")+
|
||||
"ID int auto_increment not null primary key,"+
|
||||
"STACK_LINES_ID int unsigned,"+
|
||||
"SCHED_CODE varchar(10),"+
|
||||
"index SCHED_CODE_IDX(SCHED_CODE))"+
|
||||
" charset utf8mb4 collate utf8mb4_general_ci"+
|
||||
db_table_create_postfix;
|
||||
if(!RDSqlQuery::apply(sql,err_msg)) {
|
||||
return false;
|
||||
}
|
||||
sql=QString("select ")+
|
||||
"ID,"+ // 00
|
||||
"SCHED_CODES " // 01
|
||||
"from STACK_LINES";
|
||||
q=new RDSqlQuery(sql,false);
|
||||
while(q->next()) {
|
||||
QStringList f0=q->value(1).toString().split(" ",QString::SkipEmptyParts);
|
||||
for(int i=0;i<f0.size();i++) {
|
||||
if((!f0.at(i).trimmed().isEmpty())&&(f0.at(i).trimmed()!=".")) {
|
||||
sql=QString("insert into STACK_SCHED_CODES set ")+
|
||||
QString().sprintf("STACK_LINES_ID=%u,",q->value(0).toUInt())+
|
||||
"SCHED_CODE=\""+RDEscapeString(f0.at(i).trimmed())+"\"";
|
||||
RDSqlQuery::apply(sql,err_msg);
|
||||
}
|
||||
}
|
||||
}
|
||||
delete q;
|
||||
DropColumn("STACK_LINES","SCHED_CODES",err_msg);
|
||||
|
||||
WriteSchemaVersion(++cur_schema);
|
||||
}
|
||||
|
||||
|
||||
// NEW SCHEMA UPDATES GO HERE...
|
||||
|
||||
//
|
||||
|
@ -1480,14 +1480,18 @@ RDWaveFile *MainObject::FixFile(const QString &filename,RDWaveData *wavedata)
|
||||
//
|
||||
// Copy File
|
||||
//
|
||||
import_temp_fix_filename=
|
||||
QString(tempnam(RDTempDirectory::basePath(),"rdfix"))+QString(".wav");
|
||||
if(import_temp_fix_filename.isNull()) {
|
||||
char tempfile[PATH_MAX];
|
||||
strncpy(tempfile,RDTempDirectory::basePath()+
|
||||
QString().sprintf("/rdimport%dXXXXXX",getpid()),PATH_MAX);
|
||||
int dest_fd=mkstemp(tempfile);
|
||||
if(dest_fd<0) {
|
||||
return NULL;
|
||||
}
|
||||
if(!RDCopy(filename,import_temp_fix_filename)) {
|
||||
import_temp_fix_filename=tempfile;
|
||||
if(!RDCopy(filename,dest_fd)) {
|
||||
return NULL;
|
||||
}
|
||||
close(dest_fd);
|
||||
|
||||
//
|
||||
// Apply Fix
|
||||
|
@ -327,6 +327,16 @@ void MainObject::PurgeStacks()
|
||||
if (q1->next()) {
|
||||
stackid=q1->value(0).toUInt();
|
||||
if (stackid-stacksize > 0) {
|
||||
sql=QString("select ID from STACK_LINES where ")+
|
||||
"SERVICE_NAME=\""+RDEscapeString(q->value(0).toString())+"\" && "+
|
||||
QString().sprintf("SCHED_STACK_ID<=%d",stackid-stacksize);
|
||||
q2=new RDSqlQuery(sql);
|
||||
while(q2->next()) {
|
||||
sql=QString("delete from STACK_SCHED_CODES where ")+
|
||||
QString().sprintf("STACK_LINES_ID=%u",q2->value(0).toUInt());
|
||||
RDSqlQuery::apply(sql);
|
||||
}
|
||||
delete q2;
|
||||
sql=QString("delete from STACK_LINES where ")+
|
||||
"SERVICE_NAME=\""+RDEscapeString(q->value(0).toString())+"\" && "+
|
||||
QString().sprintf("SCHED_STACK_ID<=%d",stackid-stacksize);
|
||||
|
Loading…
x
Reference in New Issue
Block a user