Jellyfin Qt
QML Library for interacting with the Jellyfin multimedia server
Loading...
Searching...
No Matches
lyricmetadata.h
Go to the documentation of this file.
1/*
2 * Sailfin: a Jellyfin client written using Qt
3 * Copyright (C) 2021 Chris Josten and the Sailfin Contributors.
4 *
5 * This library is free software; you can redistribute it and/or
6 * modify it under the terms of the GNU Lesser General Public
7 * License as published by the Free Software Foundation; either
8 * version 2.1 of the License, or (at your option) any later version.
9 *
10 * This library is distributed in the hope that it will be useful,
11 * but WITHOUT ANY WARRANTY; without even the implied warranty of
12 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
13 * Lesser General Public License for more details.
14 *
15 * You should have received a copy of the GNU Lesser General Public
16 * License along with this library; if not, write to the Free Software
17 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
18 */
19/*
20 * WARNING: THIS IS AN AUTOMATICALLY GENERATED FILE! PLEASE DO NOT EDIT THIS, AS YOUR EDITS WILL GET
21 * OVERWRITTEN AT SOME POINT!
22 *
23 * If there is a bug in this file, please fix the code generator used to generate this file found in
24 * core/openapigenerator.d.
25 *
26 * This file is generated based on Jellyfin's OpenAPI description, "openapi.json". Please update that
27 * file with a newer file if needed instead of manually updating the files.
28 */
29
30#ifndef JELLYFIN_DTO_LYRICMETADATA_H
31#define JELLYFIN_DTO_LYRICMETADATA_H
32
33#include <QJsonObject>
34#include <QJsonValue>
35#include <QString>
36#include <optional>
37
39
40namespace Jellyfin {
41// Forward declaration
42class ApiClient;
43}
44namespace Jellyfin {
45namespace DTO {
46
47
49public: LyricMetadata();
50 LyricMetadata(const LyricMetadata &other);
51
55 void replaceData(LyricMetadata &other);
56
57 static LyricMetadata fromJson(QJsonObject source);
58 void setFromJson(QJsonObject source);
59 QJsonObject toJson() const;
60
61 // Properties
65 QString artist() const;
69 void setArtist(QString newArtist);
70 bool artistNull() const;
71 void setArtistNull();
72
76 QString album() const;
80 void setAlbum(QString newAlbum);
81 bool albumNull() const;
82 void setAlbumNull();
83
87 QString title() const;
91 void setTitle(QString newTitle);
92 bool titleNull() const;
93 void setTitleNull();
94
98 QString author() const;
102 void setAuthor(QString newAuthor);
103 bool authorNull() const;
104 void setAuthorNull();
105
109 std::optional<qint64> length() const;
113 void setLength(std::optional<qint64> newLength);
114 bool lengthNull() const;
115 void setLengthNull();
116
120 QString by() const;
124 void setBy(QString newBy);
125 bool byNull() const;
126 void setByNull();
127
131 std::optional<qint64> offset() const;
135 void setOffset(std::optional<qint64> newOffset);
136 bool offsetNull() const;
137 void setOffsetNull();
138
142 QString creator() const;
146 void setCreator(QString newCreator);
147 bool creatorNull() const;
148 void setCreatorNull();
149
153 QString version() const;
157 void setVersion(QString newVersion);
158 bool versionNull() const;
159 void setVersionNull();
160
164 std::optional<bool> isSynced() const;
168 void setIsSynced(std::optional<bool> newIsSynced);
169 bool isSyncedNull() const;
170 void setIsSyncedNull();
171
172
173protected:
174 QString m_artist;
175 QString m_album;
176 QString m_title;
177 QString m_author;
178 std::optional<qint64> m_length = std::nullopt;
179 QString m_by;
180 std::optional<qint64> m_offset = std::nullopt;
181 QString m_creator;
182 QString m_version;
183 std::optional<bool> m_isSynced = std::nullopt;
184
185
186};
187
188
189} // NS DTO
190
191namespace Support {
192
194
195template <>
197
198template<>
199QJsonValue toJsonValue(const LyricMetadata &source, convertType<LyricMetadata>);
200
201} // NS DTO
202} // NS Jellyfin
203
204#endif // JELLYFIN_DTO_LYRICMETADATA_H
An Api client for Jellyfin. Handles requests and authentication.
Definition apiclient.h:90
Definition lyricmetadata.h:48
void setByNull()
Definition lyricmetadata.cpp:215
QString m_creator
Definition lyricmetadata.h:181
bool versionNull() const
Definition lyricmetadata.cpp:250
bool byNull() const
Definition lyricmetadata.cpp:211
void setArtistNull()
Definition lyricmetadata.cpp:150
std::optional< qint64 > offset() const
Gets or sets the lyric offset compared to audio in ticks.
Definition lyricmetadata.cpp:219
void setCreatorNull()
Definition lyricmetadata.cpp:241
void setIsSyncedNull()
Definition lyricmetadata.cpp:267
void setTitle(QString newTitle)
Gets or sets the title of the song.
Definition lyricmetadata.cpp:169
QString m_album
Definition lyricmetadata.h:175
QString m_by
Definition lyricmetadata.h:179
QString artist() const
Gets or sets the song artist.
Definition lyricmetadata.cpp:141
void setBy(QString newBy)
Gets or sets who the LRC file was created by.
Definition lyricmetadata.cpp:208
static LyricMetadata fromJson(QJsonObject source)
Definition lyricmetadata.cpp:64
bool lengthNull() const
Definition lyricmetadata.cpp:198
void setVersion(QString newVersion)
Gets or sets the version of the creator used.
Definition lyricmetadata.cpp:247
void replaceData(LyricMetadata &other)
Definition lyricmetadata.cpp:51
QString m_author
Definition lyricmetadata.h:177
void setAuthorNull()
Definition lyricmetadata.cpp:189
std::optional< bool > isSynced() const
Gets or sets a value indicating whether this lyric is synced.
Definition lyricmetadata.cpp:258
std::optional< qint64 > m_offset
Definition lyricmetadata.h:180
QString by() const
Gets or sets who the LRC file was created by.
Definition lyricmetadata.cpp:206
void setOffsetNull()
Definition lyricmetadata.cpp:228
void setIsSynced(std::optional< bool > newIsSynced)
Gets or sets a value indicating whether this lyric is synced.
Definition lyricmetadata.cpp:260
bool albumNull() const
Definition lyricmetadata.cpp:159
QString m_title
Definition lyricmetadata.h:176
std::optional< bool > m_isSynced
Definition lyricmetadata.h:183
QString album() const
Gets or sets the album this song is on.
Definition lyricmetadata.cpp:154
void setCreator(QString newCreator)
Gets or sets the software used to create the LRC file.
Definition lyricmetadata.cpp:234
void setAlbumNull()
Definition lyricmetadata.cpp:163
std::optional< qint64 > length() const
Gets or sets the length of the song in ticks.
Definition lyricmetadata.cpp:193
std::optional< qint64 > m_length
Definition lyricmetadata.h:178
void setAlbum(QString newAlbum)
Gets or sets the album this song is on.
Definition lyricmetadata.cpp:156
void setTitleNull()
Definition lyricmetadata.cpp:176
bool offsetNull() const
Definition lyricmetadata.cpp:224
bool authorNull() const
Definition lyricmetadata.cpp:185
bool isSyncedNull() const
Definition lyricmetadata.cpp:263
void setLength(std::optional< qint64 > newLength)
Gets or sets the length of the song in ticks.
Definition lyricmetadata.cpp:195
QString creator() const
Gets or sets the software used to create the LRC file.
Definition lyricmetadata.cpp:232
QString m_version
Definition lyricmetadata.h:182
LyricMetadata()
Definition lyricmetadata.cpp:35
void setAuthor(QString newAuthor)
Gets or sets the author of the lyric data.
Definition lyricmetadata.cpp:182
bool creatorNull() const
Definition lyricmetadata.cpp:237
void setFromJson(QJsonObject source)
Definition lyricmetadata.cpp:71
void setLengthNull()
Definition lyricmetadata.cpp:202
bool titleNull() const
Definition lyricmetadata.cpp:172
bool artistNull() const
Definition lyricmetadata.cpp:146
void setVersionNull()
Definition lyricmetadata.cpp:254
void setOffset(std::optional< qint64 > newOffset)
Gets or sets the lyric offset compared to audio in ticks.
Definition lyricmetadata.cpp:221
QString version() const
Gets or sets the version of the creator used.
Definition lyricmetadata.cpp:245
QString m_artist
Definition lyricmetadata.h:174
QString title() const
Gets or sets the title of the song.
Definition lyricmetadata.cpp:167
void setArtist(QString newArtist)
Gets or sets the song artist.
Definition lyricmetadata.cpp:143
QJsonObject toJson() const
Definition lyricmetadata.cpp:85
QString author() const
Gets or sets the author of the lyric data.
Definition lyricmetadata.cpp:180
Contains auto-generated Data Transfer Objects for the Jellyfin HTTP API.
Definition accessschedule.h:128
AccessSchedule fromJsonValue(const QJsonValue &source, convertType< AccessSchedule >)
Definition accessschedule.cpp:133
Jellyfin::DTO::LyricMetadata LyricMetadata
Definition lyricmetadata.h:193
QJsonValue toJsonValue(const AccessSchedule &source, convertType< AccessSchedule >)
Definition accessschedule.cpp:139
Definition jsonconvimpl.h:45