1
0
Fork 0
mirror of https://github.com/HenkKalkwater/harbour-sailfin.git synced 2024-05-18 12:02:41 +00:00

Compare commits

...

56 commits

Author SHA1 Message Date
Chris Josten 5328e63e2c Update outdated PlaybackState enums in QML
With the refractor in f91e9f8, an abstraction over QtMultiMedia was
implemented. New enums for the PlaybackState were created, to not make
the application depend on QtMultiMedia. However, not all code was
updated to make proper use of these new enums.

This in turn caused the screen turned off while playing a video and the
HUD not showing when the video started buffering. This commit fixes
that.

Closes #51
2024-05-08 20:33:01 +02:00
Chris Josten 19efba457c docs: replace absolute paths by relative
This way, Doxygen also works in GitHub actions
2024-04-27 23:46:45 +02:00
Chris Josten fbe8f5631c actions: skip set up python step
Pip is hopefully installed by default on ubuntu
2024-04-27 23:23:18 +02:00
Chris Josten 22046a654a actions: Hopefully fix it this time 2024-04-27 23:21:27 +02:00
Chris Josten 7bf7b4039a actions: Fix actions hopefully again 2024-04-27 23:20:42 +02:00
Chris Josten 982e5c2825 actions: Hopefully fix actions 2024-04-27 23:19:57 +02:00
Chris Josten 0329f31db0
Merge pull request #49 from heartfin/48-doxygen
docs: Add Doxygen and project-related documentation
2024-04-27 23:16:45 +02:00
Chris Josten 720a1ed5ff docs: Add Doxygen and project-related documentation 2024-04-27 23:16:06 +02:00
Chris Josten c5541b0b16 bump version 0.5.0, update changelog 2024-01-02 23:40:30 +01:00
Chris Josten 5e62fe7624 sailfish: display backdrop instead of poster on film page
This simply looks better, since the backdrop has a more suitable aspect
ratio.
2024-01-02 22:42:35 +01:00
Chris Josten a35d8026be sailfish: allow configuring the startup page
A setting has been added to allow users to select which page should be
opened first. This allows for using Sailfin as a music player
exclusively, as proposed in #34

Special care has been taken to avoid the user being locked out from the
app, for when the library selected as home has been deleted on the
server side. It is real tricky to guide the user to delete dconf keys.

Therefore, a pulley menu with access to settings has been added to all
collection pages and to the unknown page. Additionally, when the setting
is changed, it throws away the entire pagestack and replaces it with the
new home page + the settings page, so the user can always navigate back.
The navigation history of the user will get lost, but otherwise the
implementation gets to complex for a feature that is expected to be used
not that often.

This uses more timers than I hoped for, because otherwise things are
undefined for some reason which I do not know and using timers solves
it. :(
2024-01-02 22:28:34 +01:00
Chris Josten 3c02985990 core/MPRIS: change track id to String
For some reason, the track id was a QDbusObjectPath, but somehow that
caused issues, so I'm breaking the spec and simply changing it to a
string. Now SailfishOS does display the MPRIS controls on the
lockscreen.
2024-01-02 20:09:23 +01:00
Chris Josten a66434afa8 QuickConnect: init
This adds a page in the settings page that allows the user to enter a
quick connect code to allow another device to log in.
2024-01-02 19:56:07 +01:00
Chris Josten 13786f01c9 sailfish: add contributors list and update info page
- Add list of contributors
- Add link to GitHub repository
- Update copyright year
2024-01-02 16:44:07 +01:00
Chris Josten 5cd0b10b73 Make film posters 9:16 again
This was broken due to the collectionType property of BaseItemDTO
not being exposed to QML.

Also update the changelog
2024-01-02 16:01:45 +01:00
Chris Josten bb45637d0b core/WebSocket: Delay websocket initialisation
Workaround for #16.
2024-01-02 15:36:19 +01:00
Chris Josten 3fb373a8ef
Merge pull request #37 from heartfin/36-control-remote-jellyfin-sessions
Control remote jellyfin sessions
2024-01-02 15:24:00 +01:00
Chris Josten f0328e2c80 Update changelog 2024-01-02 15:23:39 +01:00
Chris Josten 9266f65c2f Guess device icons
Device icons for the local device is now determined by looking at what
the value of the deviceType property of the ApiClient is. This property
was newly introduced, so that applications using JellyfinQt can set
their own device type.

For other devices, a guess is made based on the client name. This guess
has been derived from what Jellyfin Web does.
2024-01-02 15:14:23 +01:00
Chris Josten 1b27847c94 core/RemoteJellyfinPlaybackManager: send media source id
If the mediaSourceId is not sent, Jellyfin Web will simply not take the
audioStreamIndex and subtitleStreamIndex in account when playing the
media.

A bug also surfaced where the application would crash when playing a
video, playing audio afterwards and then clicking on an item in the now
playing queue. This has also been fixed.
2024-01-02 13:02:59 +01:00
Chris Josten 6ed623d0f8 core/RemoteJellyfinPlaybackManager: keep queue in sync
The playback queue is now kept in sync with the playback queue of the
remote jellyfin instance the manager is controlling.

Some additional guards were added in place in the shuffle and playlist
algorithm, since the situation can occur where the now playing index
falls outside of the playing playlist. This happens because when the
an playlist update is received, we need to do another HTTP request
before we know which items are in the queue, while the now playing index
has been updated.

This is a not-optimal way to fix that, but it works well enough for now
and a better solution can be implemented later. (Hello, person in the
future reading the git blame output!)
2024-01-02 00:19:13 +01:00
Chris Josten d7910faed5
Merge pull request #40 from handydevcom/Fix_localization_and_add_Russian_localization
Fix translation settings in CMake; add Russian translation.
2024-01-01 15:21:35 +01:00
Mikhail Barashkov 8b81fae67f Complete Russian translations 2023-12-23 17:13:53 +03:00
Mikhail Barashkov 8b94a2dd30 Fix translation settings in CMake; add Russian translation. 2023-12-23 17:06:36 +03:00
Chris Josten 61a7eaf52e core: emit signals when playbackmanager changed 2023-01-11 23:55:53 +01:00
Chris Josten 7c6d8486de ui: improve empty state, add remote playback indicator 2023-01-11 23:11:02 +01:00
Chris Josten 3783de9ce7 core: send start index when playing on remote session 2023-01-05 15:53:52 +01:00
Chris Josten 7a7ddc7717 core: remote playback send commands and update state 2023-01-04 21:32:27 +01:00
Chris Josten 77cb5d5957 openapigen: support for 204 No Content endpoints 2023-01-02 20:24:40 +01:00
Chris Josten b257fe60aa Discover remote sessions
Adds a way of discovering remote sessions and in Jellyfin the UI.
2023-01-02 20:05:41 +01:00
Chris Josten b1bd15f2c1
Merge pull request #35 from heartfin/32-abstract-media-playback-implementation-from-viewmodel-playbackmanager
Abstract media playback implementation from ViewModel::PlaybackManager
2022-11-05 18:31:49 +01:00
Chris Josten c72c10bad4
core: Split PlaybackManager up into smaller parts
The PlaybackManager was a giant class that handled UI bindings, fetching
stream URLS, playback logic.

It now has been split up into:

- ViewModel::PlaybackManager, which handles UI interfacing and allowing
  to swap out the Model::Playback implementation on the fly.
- Model::PlaybackManager, which is an interface for what a
  PlaybackManager must do, handling queues/playlists, and controlling a
  player.
- Model::LocalPlaybackManager, which is an Model::PlaybackManager
  implementation for playing back Jellyfin media within the application.
- Model::PlaybackReporter, which reports the current playback state to
  the Jellyfin server, for keeping track of played items.
- Model::Player, which handles playing back media from an URL and
  the usual play/pause et cetera.

In a future commit, this would allow for introducing a
Model::RemoteJellyfinPlaybackManager, to control other Jellyfin
instances.
2022-11-05 18:20:23 +01:00
Chris Josten f91e9f88e7
Merge pull request #31 from heartfin/30-deduplicate-qobject-wrapping-code
Move QObject-wrapping code into templates
2022-08-24 17:14:58 +02:00
Chris Josten b8933ddca4 Move QObject-wrapping code into templates
Previously, this pattern was copy-pasted in a few places. This is
undesirable, so the code has been moved into templates.

Fixes #30
2022-08-24 17:00:14 +02:00
Chris Josten 0fafb19c7d Add navigation to artists from tracks
I'm not to happy about the C++ sides. If anyone from the future finds
this commit with "git blame" while debugging this code: I apologise
2022-07-30 01:24:31 +02:00
Chris Josten 3f9661ccb5 Update changelog 2022-07-29 14:30:38 +02:00
Chris Josten fb81913eab
Merge pull request #28 from heartfin/25-music-player-more-specialised-folder-pages
Add more specialised pages
2022-07-29 14:28:00 +02:00
Chris Josten dc9c3ea1b8 Add music library page 2022-07-29 14:26:25 +02:00
Chris Josten 0c0b91dc4b Add artist overview page 2022-07-29 11:45:23 +02:00
Chris Josten 2398cc2997
Merge pull request #23 from heartfin/22-music-player-album-art-with-a-non-11-aspect-ratio-breaks-the-narrow-header
Code deduplication and bug fix in the album cover
2022-07-23 20:04:17 +02:00
Chris Josten 985a65154a
Code deduplication and bug fix
Deduplicated code in the NarrowAlbumCover and WideAlbumCover.

Additionally, this fixes a bug where the NarrowAlbumCover would behave
wrongly with album covers with an aspect ratio not equal to 1.0.

Resolves #22
2022-07-23 20:01:23 +02:00
Chris Josten 4a178ee227
Add better playlist view
I reused the AlbumDetailPage for playlists, as both are very similar. If
they end up being too different, I might want to look into splitting
them up, but for now it will do.
2022-07-23 01:52:26 +02:00
Chris Josten c1e402f411
Fix linebreak in README 2022-07-23 01:31:39 +02:00
Chris Josten 818443dbae
Add Matrix badge 2022-07-23 01:26:40 +02:00
Chris Josten eecebc4ec6
Bump version 0.4.2 2022-07-23 00:50:51 +02:00
Chris Josten ade8866303
Merge pull request #20 from heartfin/19-collections-with-more-than-100-items-loop-back
setRequestStartIndex: actually set start index
2022-07-23 00:42:15 +02:00
Chris Josten dd34e1a087
setRequestStartIndex: actually set start index
It previously modified the limit for some template instances. That
obviously does not work.

Additionally, setRequestStartIndex and setRequestLimit have been
implemented for GetNextUpParams.

Fixes #19
2022-07-23 00:38:15 +02:00
Chris Josten 7ae204bf87
Create FUNDING.yml 2022-07-22 22:38:20 +02:00
Chris Josten 62d9b9a73c
Fix user list not displaying 2022-07-20 23:13:57 +02:00
Chris Josten f34f3484f3
Fix authentication 2022-07-20 23:13:42 +02:00
Chris Josten 69ddb18046
Bump version v0.4.1 2022-04-27 11:07:23 +02:00
Chris Josten 748e5bdf13
Sailfish: do not crash when opening an audio folders
The QML side attempted to simply pass all items of type 'Audio' to the
PlaybackManager.playItem(). This does not work for folders and it will
crash. This does not fix the presentation of audio folders/playlists,
but it does fix the crash.
2022-04-27 11:07:06 +02:00
Chris Josten cab5f20469
Sailfish: Fix freeze when connecting via HTTPS 2022-04-26 20:02:29 +02:00
Chris Josten deada4f635 core: Use the public constructor of ClientCapabilitiesDTO
In the ApiClient, the constructor without arguments was used to create a
ClientCapabilitiesDTO. Since this constructor has been made private,
ApiClient now uses the other public constructor to allow the code to
compile once again.
2021-10-25 16:11:10 +02:00
Chris Josten 852e3e928f core: correctly serialize JSON objects
On startup, the DeviceProfile would not be serialized properly to a false
assumption that QJsonValue.toString() returns the JSON representation of
the given value. This now has been fixed by creating a QJsonDocument
converting it to a string.
2021-10-25 16:10:36 +02:00
Chris Josten 90db983c30 Replace not-fully-initializing DTO constructors
There were some constructors in the DTOs which allowed construction of
DTO which weren't fully initialized. These constructors have been made
private, as they are still used in the 'fromJson' methods. Additionally,
a constructor with all required parameters to fully initialize the
class has been added.

Additionally, the Loader class has been modified, since it no longer can
assume it is able to default construct the parameter type. The parameter
is now stored as an optional.

Closes #15
2021-09-25 17:07:12 +02:00
513 changed files with 20024 additions and 1392 deletions

13
.github/FUNDING.yml vendored Normal file
View file

@ -0,0 +1,13 @@
# These are supported funding model platforms
github: # Replace with up to 4 GitHub Sponsors-enabled usernames e.g., [user1, user2]
patreon: # Replace with a single Patreon username
open_collective: # Replace with a single Open Collective username
ko_fi: # Replace with a single Ko-fi username
tidelift: # Replace with a single Tidelift platform-name/package-name e.g., npm/babel
community_bridge: # Replace with a single Community Bridge project-name e.g., cloud-foundry
liberapay: heartfin # Replace with a single Liberapay username
issuehunt: # Replace with a single IssueHunt username
otechie: # Replace with a single Otechie username
lfx_crowdfunding: # Replace with a single LFX Crowdfunding project-name e.g., cloud-foundry
custom: # Replace with up to 4 custom sponsorship URLs e.g., ['link1', 'link2']

40
.github/workflows/doxygen.yaml vendored Normal file
View file

@ -0,0 +1,40 @@
name: doxygen
run-name: Generate and deploy Doxygen documentation
on:
push:
branches:
- "master"
workflow_dispatch: {}
permissions:
contents: read
pages: write
id-token: write
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
with:
submodules: true
- name: Configure pages
uses: actions/configure-pages@v3
- name: Install the doxyqml filter
run: pip install doxyqml
- name: Doxygen
uses: mattnotmitt/doxygen-action@edge
- name: Upload GitHub pages artifact
uses: "actions/upload-pages-artifact@v2"
with:
path: "doxygen/html/"
deploy:
runs-on: ubuntu-latest
needs: build
environment:
name: github-pages
url: ${{ steps.deployment.outputs.page_url }}
steps:
- name: Deploy to GitHub Pages
id: deployment
uses: "actions/deploy-pages@v2"

2
.gitignore vendored
View file

@ -5,7 +5,9 @@ rpm/*.spec
build/
build-*/
.dub/
doxygen/
# IDE files
*.user
CMakeLists.txt.user.*
compile_commands.json

6
.gitmodules vendored
View file

@ -0,0 +1,6 @@
[submodule "core/doc/doxygen-awesome-css"]
path = core/doc/doxygen-awesome-css
url = https://github.com/jothepro/doxygen-awesome-css.git
[submodule "3rdparty/doxygen-awesome-css"]
path = 3rdparty/doxygen-awesome-css
url = https://github.com/jothepro/doxygen-awesome-css.git

1
3rdparty/doxygen-awesome-css vendored Submodule

@ -0,0 +1 @@
Subproject commit 5b27b3a747ca1e559fa54149762cca0bad6036fb

View file

@ -4,7 +4,6 @@ set (CMAKE_CXX_STANDARD 17)
set(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} "${CMAKE_SOURCE_DIR}/cmake/")
set(CMAKE_AUTOMOC ON)
cmake_policy(SET CMP0048 NEW)
set(CMAKE_CXX_STANDARD 17)
# Options
option(PLATFORM_SAILFISHOS "Build SailfishOS version of application" OFF)

2896
Doxyfile Normal file

File diff suppressed because it is too large Load diff

View file

@ -1,8 +1,51 @@
# Sailfin
[!["Chat via Matrix"](https://img.shields.io/matrix/sailfin:netsoj.nl?label=Chat%20via%20Matrix&logo=matrix&server_fqdn=meetriks.netsoj.nl&style=for-the-badge)](https://matrix.to/#/#sailfin:netsoj.nl)
Sailfin is a [Sailfish OS](https://sailfishos.org) client for [Jellyfin](https://jellyfin.org), a media server, written in C++ and qml.
## Download
This application can be found on [OpenRepos.net](https://openrepos.net/content/ahappyhuman/sailfin)
## Screenshots (running on Sailfish OS)
<img alt="Screenshot showing the library root" src="graphics/screenshot-sailfish-1.png" width="33%" /> <img alt="Screenshot showing TV show page" src="graphics/screenshot-sailfish-2.png" width="33%" /> <img alt="Screenshot showing the video player" src="graphics/screenshot-sailfish-3.png" width="33%" />
<img alt="Screenshot showing the library root" src="graphics/screenshot-sailfish-1.png" width="33%" /> <img alt="Screenshot showing TV show page" src="graphics/screenshot-sailfish-2.png" width="33%" />
## Contributing
Please [see this page for how the Jellyfin Qt library works](https://heartfin.github.io/harbour-sailfin/guides.html).
and [see this page for contribution guidelines](https://heartfin.github.io/harbour-sailfin/contributing.html).
## Code layout
```
├── 3rdparty 3rd-party libraries
├── cmake Additional CMake modules
├── core The core Qt library named Jellyfin-Qt
│   ├── codegen Template files for code generation based on the OpenAPI spec
│   ├── dbus DBus interface description files
│   ├── doc Extra documentation files for the generated documentation
│   ├── include Publically includable files
│   ├── qrc Resources for the library
│   └── src C++ source code
├── graphics Source graphics files, meant to be edited
│   └── qtquick-theme Custom graphics for the QtQuick theme
├── qtquick QtQuick application for testing, based on the core library
│   ├── assets Custom assets
│   ├── qml QML UI files
│   ├── SailfinStyle QtQuick theme files
│   └── src C++ code
├── rpm Files for packaging the application
└── sailfish The Sailfish OS app based on the core library
├── icons Launcher icons
├── qml QML UI files
│   ├── components Reusable QML components
│   ├── cover Cover pages
│   ├── licenses Licence texts for libraries
│   └── pages Application pages
├── src C++ source code
└── translations UI translation files
```
## License
This application is licensed under the LGPLv2.1 license, although you may opt to choose a newer version of the LGPL if you want so.

View file

@ -13,9 +13,14 @@ include(GNUInstallDirs)
include(GeneratedSources.cmake)
set(JellyfinQt_SOURCES
src/model/controllablesession.cpp
src/model/deviceprofile.cpp
src/model/item.cpp
src/model/player.cpp
src/model/playbackmanager.cpp
src/model/playbackreporter.cpp
src/model/playlist.cpp
src/model/remotejellyfinplayback.cpp
src/model/shuffle.cpp
src/model/user.cpp
@ -29,6 +34,7 @@ set(JellyfinQt_SOURCES
src/viewmodel/modelstatus.cpp
src/viewmodel/playbackmanager.cpp
src/viewmodel/playlist.cpp
src/viewmodel/remotedevice.cpp
src/viewmodel/settings.cpp
src/viewmodel/userdata.cpp
src/viewmodel/usermodel.cpp
@ -46,37 +52,44 @@ set(JellyfinQt_SOURCES
list(APPEND JellyfinQt_SOURCES ${openapi_SOURCES})
set(JellyfinQt_HEADERS
include/JellyfinQt/model/deviceprofile.h
include/JellyfinQt/model/item.h
include/JellyfinQt/model/playlist.h
include/JellyfinQt/model/shuffle.h
include/JellyfinQt/model/user.h
include/JellyfinQt/support/jsonconv.h
include/JellyfinQt/support/jsonconvimpl.h
include/JellyfinQt/support/loader.h
include/JellyfinQt/support/parseexception.h
include/JellyfinQt/viewmodel/item.h
include/JellyfinQt/viewmodel/itemmodel.h
include/JellyfinQt/viewmodel/loader.h
include/JellyfinQt/viewmodel/mediastream.h
include/JellyfinQt/viewmodel/modelstatus.h
include/JellyfinQt/viewmodel/propertyhelper.h
include/JellyfinQt/viewmodel/playbackmanager.h
include/JellyfinQt/viewmodel/platformmediacontrol.h
include/JellyfinQt/viewmodel/playlist.h
include/JellyfinQt/viewmodel/settings.h
include/JellyfinQt/viewmodel/userdata.h
include/JellyfinQt/viewmodel/usermodel.h
include/JellyfinQt/viewmodel/user.h
include/JellyfinQt/apiclient.h
include/JellyfinQt/apimodel.h
include/JellyfinQt/credentialmanager.h
include/JellyfinQt/eventbus.h
include/JellyfinQt/jellyfin.h
include/JellyfinQt/jsonhelper.h
include/JellyfinQt/qobjectsettingswrapper.h
include/JellyfinQt/serverdiscoverymodel.h
include/JellyfinQt/websocket.h)
include/JellyfinQt/model/controllablesession.h
include/JellyfinQt/model/deviceprofile.h
include/JellyfinQt/model/item.h
include/JellyfinQt/model/player.h
include/JellyfinQt/model/playbackmanager.h
include/JellyfinQt/model/playbackreporter.h
include/JellyfinQt/model/playlist.h
include/JellyfinQt/model/remotejellyfinplayback.h
include/JellyfinQt/model/shuffle.h
include/JellyfinQt/model/user.h
include/JellyfinQt/support/jsonconv.h
include/JellyfinQt/support/jsonconvimpl.h
include/JellyfinQt/support/loader.h
include/JellyfinQt/support/parseexception.h
include/JellyfinQt/viewmodel/item.h
include/JellyfinQt/viewmodel/itemmodel.h
include/JellyfinQt/viewmodel/loader.h
include/JellyfinQt/viewmodel/mediastream.h
include/JellyfinQt/viewmodel/modelstatus.h
include/JellyfinQt/viewmodel/propertyhelper.h
include/JellyfinQt/viewmodel/playbackmanager.h
include/JellyfinQt/viewmodel/platformmediacontrol.h
include/JellyfinQt/viewmodel/playlist.h
include/JellyfinQt/viewmodel/remotedevice.h
include/JellyfinQt/viewmodel/settings.h
include/JellyfinQt/viewmodel/userdata.h
include/JellyfinQt/viewmodel/usermodel.h
include/JellyfinQt/viewmodel/user.h
include/JellyfinQt/viewmodel/utils.h
include/JellyfinQt/apiclient.h
include/JellyfinQt/apimodel.h
include/JellyfinQt/credentialmanager.h
include/JellyfinQt/eventbus.h
include/JellyfinQt/jellyfin.h
include/JellyfinQt/jsonhelper.h
include/JellyfinQt/qobjectsettingswrapper.h
include/JellyfinQt/serverdiscoverymodel.h
include/JellyfinQt/websocket.h)
if (FREEDESKTOP_INTEGRATION)
list(APPEND JellyfinQt_SOURCES

View file

@ -7,9 +7,22 @@ class {{className}};
class {{className}} {
public:
{{#if hasRequiredProperties}}
{{className}}(
{{#each properties as |p|}}
{{#if p.isNotNullable}}
{{p.typeNameWithQualifiers}} {{p.name}}{{#if p.isLastNonNullable}}{{else}},{{/if}}
{{/if}}
{{/each}}
);
{{else}}
{{className}}();
{{/if}}
{{className}}(const {{className}} &other);
/**
@ -60,8 +73,18 @@ protected:
{{/if}}
{{/each}}
{{#if hasRequiredProperties}}
private:
// Private constructor which generates an invalid object, for use withing {{className}}::fromJson();
{{className}}();
{{/if}}
};
} // NS DTO
namespace Support {

View file

@ -1,5 +1,32 @@
{{className}}::{{className}}() {}
{{#if hasRequiredProperties}}
{{className}}::{{className}} (
{{#each properties as |property|}}
{{#if property.isNotNullable}}
{{property.typeNameWithQualifiers}} {{property.name}}{{#if property.isLastNonNullable}} {{else}}, {{/if}}
{{/if}}
{{/each}}
) :
{{#each properties as |property|}}
{{#if property.isNotNullable}}
{{property.memberName}}({{property.name}})
{{#if property.isLastNonNullable}}
{ }
{{else}}
,
{{/if}}
{{/if}}
{{/each}}
{{/if}}
{{className}}::{{className}}(const {{className}} &other) :

77
core/doc/contributing.md Normal file
View file

@ -0,0 +1,77 @@
\page contributing Contributing
\brief All resources for (potential) contributors
This page should contain all resources for people who'd like to contribute to the project.
If that happens to be you, thank you for considering to contribute to this project!
This page will describe how the process goes, what code style this project uses and more useful information.
# Development process
Development happens at [GitHub](https://github.com/heartfin/harbour-sailfin).
Currently, both the library Jellyfin-Qt and the [Sailfish OS](https://sailfishos.org) app named Sailfin are developed in the same repository.
## Create or find an issue to work on
If you want to contribute code, please check if an issue exists.
Otherwise, create an issue describing what feature you'd like to develop before creating a merge request.
## Start working on your code
Clone the git repo and create a new branch.
If you have commit access to the repository, please create a branch in the form of `<issue-number>-<issue-title>`.
For example, `36-control-remote-jellyfin-sessions`.
Now you can start writing your code and create commits.
Please create focussed commits, that is, do not commit anything not related to the issue you are working on.
Also state what you're changing in the commit message and add an entry in the file `rpm/harbour-sailfin.changes`.
If this is your first time contributing to the project, don't be shy and feel free to add your name to the contributors list in `sailfish/qml/pages/AboutPage.qml`!
## Submit a merge request
Now that you have finalised your commit, you can create a merge request on the repository.
Make sure that you have followed the contribution guidelines on this page.
Someone will review it and if all is good, they will merge it in.
Congratulations on your contribution!
# Code style guidelines
The code should follow the [Sailfish OS Code Conventions](https://docs.sailfishos.org/Develop/Apps/Coding_Conventions/) with the following exceptions:
## Exceptions for C++
- Put curly braces on the same line as the declaration, example:
```cpp
int foo() {
// implementation
}
```
instead of
```cpp
int foo()
{
// implementation
}
```
Rationale: I hate pressing enter and am used to the former. Moreover, it is already all over the place. Bad rationale, I know.
- Close namespace brackets with a comment in the form `// NS Jellyfin`, example:
```cpp
namespace Jellyfin {
namespace Nested {
// Content
} // NS Nested
} // NS Jellyfin
```
Rationale: Easy to know what namespace the bracket closes, since namespaces tend to span over large portions of a file.
- Use include guards in the form of `NAMESPACE_CLASSNAME_H`. Example:
```cpp
#ifndef JELLYFIN_MODEL_USER_H
#define JELLYFIN_MODEL_USER_H
namespace Jellyfin {
namespace Model {
class User {
// Methods etc
};
} // NS Model
} // NS Jellyfin
```

15
core/doc/custom.css Normal file
View file

@ -0,0 +1,15 @@
html {
--primary-color: #be48d6;
--primary-dark-color: #7a2e89;
--primary-light-color #e256ff;
}
@media (prefers-color-scheme: dark) {
html:not(.light-mode) {
--primary-color: #be48d6;
--primary-dark-color: #7a2e89;
--primary-light-color #e256ff;
}
}

View file

@ -0,0 +1,5 @@
\page guide-apimodel-loader ApiModel and Loaders
\brief This will give an overview of how the ApiModel and Loaders interact.
\todo
This guide should still be written

View file

@ -0,0 +1,73 @@
\page guide-getting-started Getting Started
\brief Installation procedure and first application using this library
This is a tutorial on how to use Jellyfin Qt library.
## Project setup
The library works as [a QML plugin](https://doc.qt.io/archives/qt-5.6/qqmlextensionplugin.html).
Compile the library, install it in the QML plugin path and add a qmldir file like this:
```
module nl.netsoj.chris.Jellyfin
plugin JellyfinQt
```
You should then be able to import it in your QML files.
```qml
import nl.netsoj.chris.Jellyfin
```
\note
In the documentation, the URI nl.netsoj.chris.Jellyfin will be used.
If you deviate from this, make sure to put the plugin in the correct location,
as well as using the correct import statements in QML.
## Hello Jellyfin!
The first step for interacting with the library is setting up an \ref Jellyfin::ApiClient.
This object handles authentication.
\warning
The way authentication works using ApiClient will change before the next major release to support multiple accounts! See \issue{4}
Lets create an instance of ApiClient that is reachable from everywhere, by putting it in the ApplicationWindow:
```qml
import nl.netsoj.chris.Jellyfin as JF
import QtQuick 2.0 as QQ
QQ.ApplicationWindow {
readonly property JF.ApiClient apiClient: _apiClient
JF.ApiClient {
id: _apiClient
appName: "The name of your client"
}
}
```
\note
As an alternative, you could create a QML file only containing the ApiClient and [declaring it as a Singleton](https://doc.qt.io/archives/qt-5.6/qtqml-modules-qmldir.html#contents-of-a-module-definition-qmldir-file)
## Authentication
If the user already has logged in and the credentials are stored, this is quite easy:
the \ref Jellyfin::ApiClient::authenticated "authenticated" property will change to true and the corresponding signal will fire.
You don't have to do anything else!
When the user never has logged in, the signal \ref Jellyfin::ApiClient::setupRequired "setupRequired()" will be fired.
When this happens, you should let the user enter a server URL and set it as the \ref Jellyfin::ApiClient::baseUrl "baseUrl" property.
You can get a list model of servers in the local network using the \ref Jellyfin::ServerDiscoveryModel.
After the \ref Jellyfin::ApiClient::baseUrl "baseUrl" property has been set, the slot \ref Jellyfin::ApiClient::authenticate "authenticate" should be called with an username and password.
When authentication was successful, the property \ref Jellyfin::ApiClient::authenticated "authenticated" will be changed to true.
Otherwise, the signal \ref Jellyfin::ApiClient::authenticationError "authenticationError" will be fired.
\note
To show a list of available users, one can use the \ref Jellyfin::ViewModel::UserModel "UserModel" and \ref Jellyfin::ViewModel::PublicUsersLoader "PublicUsersLoader".
However, this requires knowledge of the Loader and Model system, which will be explained in the next chapter \ref guide-apimodel-loader

10
core/doc/guides.md Normal file
View file

@ -0,0 +1,10 @@
\page guides Usage guides
\brief All guides intended for developers working with this library.
All guides assume familiarity with QML. If you aren't, [the free online QML book](https://www.qt.io/product/qt6/qml-book) is a great place to start.
Note that this book is written for Qt 6 QML, while this project is using Qt 5 QML.
The differences between those versions are not large, so it still is a valuable resource.
* \subpage guide-getting-started
* \subpage guide-apimodel-loader

11
core/doc/mainpage.md Normal file
View file

@ -0,0 +1,11 @@
\mainpage
\note
This page is aimed at developers. If you are interested in using a Jellyfin application, please visit the [main website](https://heartfin.github.io/).
This is the documentation page for the Jellyfin Qt library, a library for the [Qt framework](https://qt.io/) for interacting with the [Jellyfin media server](https://jellyfin.org).
This project is not affiliated with the Jellyfin project.
If you are planning on using this projects, see \ref guides for usage instructions and the reference documentation in the sidebar.
If you'd like to contribute code, see \ref contributing for the process and style guidelines.

View file

@ -0,0 +1,4 @@
/**
* \namespace Jellyfin::DTO
* \brief Contains auto-generated Data Transfer Objects for the Jellyfin HTTP API
*/

View file

@ -0,0 +1,4 @@
/**
* \namespace Jellyfin::ViewModel
* \brief Contains all types exposed to QML
*/

View file

@ -41,6 +41,7 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
#include "dto/generalcommandtype.h"
#include "credentialmanager.h"
#include "model/controllablesession.h"
#include "model/deviceprofile.h"
#include "eventbus.h"
@ -96,6 +97,8 @@ public:
explicit ApiClient(QObject *parent = nullptr);
virtual ~ApiClient();
Q_PROPERTY(QString baseUrl READ baseUrl WRITE setBaseUrl NOTIFY baseUrlChanged)
Q_PROPERTY(QString appName READ appName WRITE setAppName NOTIFY appNameChanged)
Q_PROPERTY(Jellyfin::Model::DeviceTypeClass::Value deviceType READ deviceType WRITE setDeviceType NOTIFY deviceTypeChanged)
Q_PROPERTY(bool authenticated READ authenticated WRITE setAuthenticated NOTIFY authenticatedChanged)
Q_PROPERTY(QString userId READ userId NOTIFY userIdChanged)
Q_PROPERTY(QJsonObject deviceProfile READ deviceProfileJson NOTIFY deviceProfileChanged)
@ -114,6 +117,9 @@ public:
bool authenticated() const;
void setBaseUrl(const QString &url);
void setAppName(const QString &appName);
void setDeviceType(Model::DeviceType deviceType);
QNetworkReply *get(const QString &path, const QUrlQuery &params = QUrlQuery());
QNetworkReply *post(const QString &path, const QJsonDocument &data, const QUrlQuery &params = QUrlQuery());
QNetworkReply *post(const QString &path, const QByteArray &data = QByteArray(), const QUrlQuery &params = QUrlQuery());
@ -127,8 +133,10 @@ public:
Q_ENUM(ApiError)
const QString &baseUrl() const;
const QString &appName() const;
const QString &userId() const;
const QString &deviceId() const;
Model::DeviceType deviceType() const;
/**
* @brief QML applications can set this type to indicate which commands they support.
*
@ -185,6 +193,7 @@ signals:
void authenticatedChanged(bool authenticated);
void baseUrlChanged(const QString &baseUrl);
void appNameChanged(const QString &newAppName);
void settingsChanged();
/**
@ -196,9 +205,18 @@ signals:
void userIdChanged(QString userId);
void deviceProfileChanged();
void deviceTypeChanged();
void supportedCommandsChanged();
void onlineChanged();
/**
* @brief Emitted after submitQuickConnectCode succeeded
*/
void quickConnectAccepted();
/**
* @brief Emitted after submitQuickConnectCode failed
*/
void quickConnectRejected();
/**
* @brief onUserDataChanged Emitted when the user data of an item is changed on the server.
@ -223,6 +241,7 @@ public slots:
*/
void setupConnection();
void authenticate(QString username, QString password, bool storeCredentials = false);
void submitQuickConnectCode(const QString &code);
/**
* @brief Logs the user out and clears the session.

View file

@ -249,6 +249,12 @@ extern template void setRequestLimit(Loader::GetItemsByUserIdParams &params, int
extern template bool setRequestStartIndex(Loader::GetItemsByUserIdParams &params, int offset);
extern template void setRequestLimit(Loader::GetResumeItemsParams &params, int limit);
extern template bool setRequestStartIndex(Loader::GetResumeItemsParams &params, int offset);
extern template void setRequestLimit(Loader::GetPublicUsersParams &params, int limit);
extern template bool setRequestStartIndex(Loader::GetPublicUsersParams &params, int offset);
extern template void setRequestLimit(Loader::GetNextUpParams &params, int limit);
extern template bool setRequestStartIndex(Loader::GetNextUpParams &params, int offset);
extern template void setRequestLimit(Loader::GetAlbumArtistsParams &params, int limit);
extern template bool setRequestStartIndex(Loader::GetAlbumArtistsParams &params, int offset);
extern template QList<DTO::UserDto> extractRecords(const QList<DTO::UserDto> &result);
extern template int extractTotalRecordCount(const QList<DTO::UserDto> &result);
@ -483,6 +489,10 @@ public:
this->endResetModel();
}
const QList<QSharedPointer<T>> &toList() {
return m_array;
}
// From AbstractListModel, gets implemented in ApiModel<T>
//virtual QHash<int, QByteArray> roleNames() const override = 0;
/*virtual QVariant data(const QModelIndex &index, int role = Qt::DisplayRole) const override = 0;*/

View file

@ -48,7 +48,14 @@ namespace DTO {
class AccessSchedule {
public:
AccessSchedule();
AccessSchedule(
qint32 jellyfinId,
QString userId,
DynamicDayOfWeek dayOfWeek,
double startHour,
double endHour
);
AccessSchedule(const AccessSchedule &other);
/**
@ -109,8 +116,13 @@ protected:
DynamicDayOfWeek m_dayOfWeek;
double m_startHour;
double m_endHour;
private:
// Private constructor which generates an invalid object, for use withing AccessSchedule::fromJson();
AccessSchedule();
};
} // NS DTO
namespace Support {

View file

@ -49,7 +49,13 @@ namespace DTO {
class ActivityLogEntry {
public:
ActivityLogEntry();
ActivityLogEntry(
qint64 jellyfinId,
QDateTime date,
QString userId,
LogLevel severity
);
ActivityLogEntry(const ActivityLogEntry &other);
/**
@ -172,8 +178,13 @@ protected:
QString m_userId;
QString m_userPrimaryImageTag;
LogLevel m_severity;
private:
// Private constructor which generates an invalid object, for use withing ActivityLogEntry::fromJson();
ActivityLogEntry();
};
} // NS DTO
namespace Support {

View file

@ -49,7 +49,11 @@ namespace DTO {
class ActivityLogEntryQueryResult {
public:
ActivityLogEntryQueryResult();
ActivityLogEntryQueryResult(
qint32 totalRecordCount,
qint32 startIndex
);
ActivityLogEntryQueryResult(const ActivityLogEntryQueryResult &other);
/**
@ -96,8 +100,13 @@ protected:
QList<ActivityLogEntry> m_items;
qint32 m_totalRecordCount;
qint32 m_startIndex;
private:
// Private constructor which generates an invalid object, for use withing ActivityLogEntryQueryResult::fromJson();
ActivityLogEntryQueryResult();
};
} // NS DTO
namespace Support {

View file

@ -48,7 +48,10 @@ namespace DTO {
class AddVirtualFolderDto {
public:
AddVirtualFolderDto();
AddVirtualFolderDto(
QSharedPointer<LibraryOptions> libraryOptions
);
AddVirtualFolderDto(const AddVirtualFolderDto &other);
/**
@ -69,8 +72,13 @@ public:
protected:
QSharedPointer<LibraryOptions> m_libraryOptions = QSharedPointer<LibraryOptions>();
private:
// Private constructor which generates an invalid object, for use withing AddVirtualFolderDto::fromJson();
AddVirtualFolderDto();
};
} // NS DTO
namespace Support {

View file

@ -51,7 +51,10 @@ namespace DTO {
class AlbumInfo {
public:
AlbumInfo();
AlbumInfo(
bool isAutomated
);
AlbumInfo(const AlbumInfo &other);
/**
@ -200,8 +203,13 @@ protected:
QStringList m_albumArtists;
QJsonObject m_artistProviderIds;
QList<SongInfo> m_songInfos;
private:
// Private constructor which generates an invalid object, for use withing AlbumInfo::fromJson();
AlbumInfo();
};
} // NS DTO
namespace Support {

View file

@ -49,7 +49,12 @@ namespace DTO {
class AlbumInfoRemoteSearchQuery {
public:
AlbumInfoRemoteSearchQuery();
AlbumInfoRemoteSearchQuery(
QSharedPointer<AlbumInfo> searchInfo,
QString itemId,
bool includeDisabledProviders
);
AlbumInfoRemoteSearchQuery(const AlbumInfoRemoteSearchQuery &other);
/**
@ -98,8 +103,13 @@ protected:
QString m_itemId;
QString m_searchProviderName;
bool m_includeDisabledProviders;
private:
// Private constructor which generates an invalid object, for use withing AlbumInfoRemoteSearchQuery::fromJson();
AlbumInfoRemoteSearchQuery();
};
} // NS DTO
namespace Support {

View file

@ -48,7 +48,12 @@ namespace DTO {
class AllThemeMediaResult {
public:
AllThemeMediaResult();
AllThemeMediaResult(
QSharedPointer<ThemeMediaResult> themeVideosResult,
QSharedPointer<ThemeMediaResult> themeSongsResult,
QSharedPointer<ThemeMediaResult> soundtrackSongsResult
);
AllThemeMediaResult(const AllThemeMediaResult &other);
/**
@ -81,8 +86,13 @@ protected:
QSharedPointer<ThemeMediaResult> m_themeVideosResult = QSharedPointer<ThemeMediaResult>();
QSharedPointer<ThemeMediaResult> m_themeSongsResult = QSharedPointer<ThemeMediaResult>();
QSharedPointer<ThemeMediaResult> m_soundtrackSongsResult = QSharedPointer<ThemeMediaResult>();
private:
// Private constructor which generates an invalid object, for use withing AllThemeMediaResult::fromJson();
AllThemeMediaResult();
};
} // NS DTO
namespace Support {

View file

@ -51,7 +51,10 @@ namespace DTO {
class ArtistInfo {
public:
ArtistInfo();
ArtistInfo(
bool isAutomated
);
ArtistInfo(const ArtistInfo &other);
/**
@ -176,8 +179,13 @@ protected:
QDateTime m_premiereDate;
bool m_isAutomated;
QList<SongInfo> m_songInfos;
private:
// Private constructor which generates an invalid object, for use withing ArtistInfo::fromJson();
ArtistInfo();
};
} // NS DTO
namespace Support {

View file

@ -49,7 +49,12 @@ namespace DTO {
class ArtistInfoRemoteSearchQuery {
public:
ArtistInfoRemoteSearchQuery();
ArtistInfoRemoteSearchQuery(
QSharedPointer<ArtistInfo> searchInfo,
QString itemId,
bool includeDisabledProviders
);
ArtistInfoRemoteSearchQuery(const ArtistInfoRemoteSearchQuery &other);
/**
@ -98,8 +103,13 @@ protected:
QString m_itemId;
QString m_searchProviderName;
bool m_includeDisabledProviders;
private:
// Private constructor which generates an invalid object, for use withing ArtistInfoRemoteSearchQuery::fromJson();
ArtistInfoRemoteSearchQuery();
};
} // NS DTO
namespace Support {

View file

@ -46,8 +46,7 @@ namespace DTO {
class AuthenticateUserByName {
public:
AuthenticateUserByName();
public: AuthenticateUserByName();
AuthenticateUserByName(const AuthenticateUserByName &other);
/**
@ -98,8 +97,11 @@ protected:
QString m_username;
QString m_pw;
QString m_password;
};
} // NS DTO
namespace Support {

View file

@ -48,7 +48,14 @@ namespace DTO {
class AuthenticationInfo {
public:
AuthenticationInfo();
AuthenticationInfo(
qint64 jellyfinId,
QString userId,
bool isActive,
QDateTime dateCreated,
QDateTime dateLastActivity
);
AuthenticationInfo(const AuthenticationInfo &other);
/**
@ -189,8 +196,13 @@ protected:
QDateTime m_dateRevoked;
QDateTime m_dateLastActivity;
QString m_userName;
private:
// Private constructor which generates an invalid object, for use withing AuthenticationInfo::fromJson();
AuthenticationInfo();
};
} // NS DTO
namespace Support {

View file

@ -49,7 +49,11 @@ namespace DTO {
class AuthenticationInfoQueryResult {
public:
AuthenticationInfoQueryResult();
AuthenticationInfoQueryResult(
qint32 totalRecordCount,
qint32 startIndex
);
AuthenticationInfoQueryResult(const AuthenticationInfoQueryResult &other);
/**
@ -96,8 +100,13 @@ protected:
QList<AuthenticationInfo> m_items;
qint32 m_totalRecordCount;
qint32 m_startIndex;
private:
// Private constructor which generates an invalid object, for use withing AuthenticationInfoQueryResult::fromJson();
AuthenticationInfoQueryResult();
};
} // NS DTO
namespace Support {

View file

@ -50,7 +50,11 @@ namespace DTO {
class AuthenticationResult {
public:
AuthenticationResult();
AuthenticationResult(
QSharedPointer<UserDto> user,
QSharedPointer<SessionInfo> sessionInfo
);
AuthenticationResult(const AuthenticationResult &other);
/**
@ -93,8 +97,13 @@ protected:
QSharedPointer<SessionInfo> m_sessionInfo = QSharedPointer<SessionInfo>();
QString m_accessToken;
QString m_serverId;
private:
// Private constructor which generates an invalid object, for use withing AuthenticationResult::fromJson();
AuthenticationResult();
};
} // NS DTO
namespace Support {

View file

@ -51,7 +51,15 @@ namespace DTO {
class BaseItem {
public:
BaseItem();
BaseItem(
QDateTime dateLastSaved,
bool isHD,
bool isShortcut,
qint32 width,
qint32 height,
bool supportsExternalTransfer
);
BaseItem(const BaseItem &other);
/**
@ -146,8 +154,13 @@ protected:
qint32 m_height;
QStringList m_extraIds;
bool m_supportsExternalTransfer;
private:
// Private constructor which generates an invalid object, for use withing BaseItem::fromJson();
BaseItem();
};
} // NS DTO
namespace Support {

View file

@ -69,7 +69,20 @@ namespace DTO {
class BaseItemDto {
public:
BaseItemDto();
BaseItemDto(
QString jellyfinId,
Video3DFormat video3DFormat,
PlayAccess playAccess,
QSharedPointer<UserItemDataDto> userData,
VideoType videoType,
LocationType locationType,
IsoType isoType,
ImageOrientation imageOrientation,
ChannelType channelType,
ProgramAudio audio,
QSharedPointer<BaseItemDto> currentProgram
);
BaseItemDto(const BaseItemDto &other);
/**
@ -1700,8 +1713,13 @@ protected:
std::optional<bool> m_isPremiere = std::nullopt;
QString m_timerId;
QSharedPointer<BaseItemDto> m_currentProgram = QSharedPointer<BaseItemDto>();
private:
// Private constructor which generates an invalid object, for use withing BaseItemDto::fromJson();
BaseItemDto();
};
} // NS DTO
namespace Support {

View file

@ -49,7 +49,11 @@ namespace DTO {
class BaseItemDtoQueryResult {
public:
BaseItemDtoQueryResult();
BaseItemDtoQueryResult(
qint32 totalRecordCount,
qint32 startIndex
);
BaseItemDtoQueryResult(const BaseItemDtoQueryResult &other);
/**
@ -96,8 +100,13 @@ protected:
QList<BaseItemDto> m_items;
qint32 m_totalRecordCount;
qint32 m_startIndex;
private:
// Private constructor which generates an invalid object, for use withing BaseItemDtoQueryResult::fromJson();
BaseItemDtoQueryResult();
};
} // NS DTO
namespace Support {

View file

@ -46,8 +46,7 @@ namespace DTO {
class BaseItemPerson {
public:
BaseItemPerson();
public: BaseItemPerson();
BaseItemPerson(const BaseItemPerson &other);
/**
@ -134,8 +133,11 @@ protected:
QString m_type;
QString m_primaryImageTag;
QJsonObject m_imageBlurHashes;
};
} // NS DTO
namespace Support {

View file

@ -48,7 +48,10 @@ namespace DTO {
class BookInfo {
public:
BookInfo();
BookInfo(
bool isAutomated
);
BookInfo(const BookInfo &other);
/**
@ -173,8 +176,13 @@ protected:
QDateTime m_premiereDate;
bool m_isAutomated;
QString m_seriesName;
private:
// Private constructor which generates an invalid object, for use withing BookInfo::fromJson();
BookInfo();
};
} // NS DTO
namespace Support {

View file

@ -49,7 +49,12 @@ namespace DTO {
class BookInfoRemoteSearchQuery {
public:
BookInfoRemoteSearchQuery();
BookInfoRemoteSearchQuery(
QSharedPointer<BookInfo> searchInfo,
QString itemId,
bool includeDisabledProviders
);
BookInfoRemoteSearchQuery(const BookInfoRemoteSearchQuery &other);
/**
@ -98,8 +103,13 @@ protected:
QString m_itemId;
QString m_searchProviderName;
bool m_includeDisabledProviders;
private:
// Private constructor which generates an invalid object, for use withing BookInfoRemoteSearchQuery::fromJson();
BookInfoRemoteSearchQuery();
};
} // NS DTO
namespace Support {

View file

@ -48,7 +48,10 @@ namespace DTO {
class BoxSetInfo {
public:
BoxSetInfo();
BoxSetInfo(
bool isAutomated
);
BoxSetInfo(const BoxSetInfo &other);
/**
@ -165,8 +168,13 @@ protected:
std::optional<qint32> m_parentIndexNumber = std::nullopt;
QDateTime m_premiereDate;
bool m_isAutomated;
private:
// Private constructor which generates an invalid object, for use withing BoxSetInfo::fromJson();
BoxSetInfo();
};
} // NS DTO
namespace Support {

View file

@ -49,7 +49,12 @@ namespace DTO {
class BoxSetInfoRemoteSearchQuery {
public:
BoxSetInfoRemoteSearchQuery();
BoxSetInfoRemoteSearchQuery(
QSharedPointer<BoxSetInfo> searchInfo,
QString itemId,
bool includeDisabledProviders
);
BoxSetInfoRemoteSearchQuery(const BoxSetInfoRemoteSearchQuery &other);
/**
@ -98,8 +103,13 @@ protected:
QString m_itemId;
QString m_searchProviderName;
bool m_includeDisabledProviders;
private:
// Private constructor which generates an invalid object, for use withing BoxSetInfoRemoteSearchQuery::fromJson();
BoxSetInfoRemoteSearchQuery();
};
} // NS DTO
namespace Support {

View file

@ -46,8 +46,7 @@ namespace DTO {
class BrandingOptions {
public:
BrandingOptions();
public: BrandingOptions();
BrandingOptions(const BrandingOptions &other);
/**
@ -86,8 +85,11 @@ public:
protected:
QString m_loginDisclaimer;
QString m_customCss;
};
} // NS DTO
namespace Support {

View file

@ -48,7 +48,13 @@ namespace DTO {
class BufferRequestDto {
public:
BufferRequestDto();
BufferRequestDto(
QDateTime when,
qint64 positionTicks,
bool isPlaying,
QString playlistItemId
);
BufferRequestDto(const BufferRequestDto &other);
/**
@ -103,8 +109,13 @@ protected:
qint64 m_positionTicks;
bool m_isPlaying;
QString m_playlistItemId;
private:
// Private constructor which generates an invalid object, for use withing BufferRequestDto::fromJson();
BufferRequestDto();
};
} // NS DTO
namespace Support {

View file

@ -52,7 +52,14 @@ namespace DTO {
class ChannelFeatures {
public:
ChannelFeatures();
ChannelFeatures(
bool canSearch,
bool supportsSortOrderToggle,
bool supportsLatestMedia,
bool canFilter,
bool supportsContentDownloading
);
ChannelFeatures(const ChannelFeatures &other);
/**
@ -201,8 +208,13 @@ protected:
bool m_supportsLatestMedia;
bool m_canFilter;
bool m_supportsContentDownloading;
private:
// Private constructor which generates an invalid object, for use withing ChannelFeatures::fromJson();
ChannelFeatures();
};
} // NS DTO
namespace Support {

View file

@ -51,8 +51,7 @@ namespace DTO {
class ChannelMappingOptionsDto {
public:
ChannelMappingOptionsDto();
public: ChannelMappingOptionsDto();
ChannelMappingOptionsDto(const ChannelMappingOptionsDto &other);
/**
@ -115,8 +114,11 @@ protected:
QList<NameIdPair> m_providerChannels;
QList<NameValuePair> m_mappings;
QString m_providerName;
};
} // NS DTO
namespace Support {

View file

@ -48,7 +48,11 @@ namespace DTO {
class ChapterInfo {
public:
ChapterInfo();
ChapterInfo(
qint64 startPositionTicks,
QDateTime imageDateModified
);
ChapterInfo(const ChapterInfo &other);
/**
@ -111,8 +115,13 @@ protected:
QString m_imagePath;
QDateTime m_imageDateModified;
QString m_imageTag;
private:
// Private constructor which generates an invalid object, for use withing ChapterInfo::fromJson();
ChapterInfo();
};
} // NS DTO
namespace Support {

View file

@ -52,7 +52,14 @@ namespace DTO {
class ClientCapabilities {
public:
ClientCapabilities();
ClientCapabilities(
bool supportsMediaControl,
bool supportsContentUploading,
bool supportsPersistentIdentifier,
bool supportsSync,
QSharedPointer<DeviceProfile> deviceProfile
);
ClientCapabilities(const ClientCapabilities &other);
/**
@ -137,8 +144,13 @@ protected:
QSharedPointer<DeviceProfile> m_deviceProfile = QSharedPointer<DeviceProfile>();
QString m_appStoreUrl;
QString m_iconUrl;
private:
// Private constructor which generates an invalid object, for use withing ClientCapabilities::fromJson();
ClientCapabilities();
};
} // NS DTO
namespace Support {

View file

@ -52,7 +52,14 @@ namespace DTO {
class ClientCapabilitiesDto {
public:
ClientCapabilitiesDto();
ClientCapabilitiesDto(
bool supportsMediaControl,
bool supportsContentUploading,
bool supportsPersistentIdentifier,
bool supportsSync,
QSharedPointer<DeviceProfile> deviceProfile
);
ClientCapabilitiesDto(const ClientCapabilitiesDto &other);
/**
@ -173,8 +180,13 @@ protected:
QSharedPointer<DeviceProfile> m_deviceProfile = QSharedPointer<DeviceProfile>();
QString m_appStoreUrl;
QString m_iconUrl;
private:
// Private constructor which generates an invalid object, for use withing ClientCapabilitiesDto::fromJson();
ClientCapabilitiesDto();
};
} // NS DTO
namespace Support {

View file

@ -51,7 +51,10 @@ namespace DTO {
class CodecProfile {
public:
CodecProfile();
CodecProfile(
CodecType type
);
CodecProfile(const CodecProfile &other);
/**
@ -104,8 +107,13 @@ protected:
QList<ProfileCondition> m_applyConditions;
QString m_codec;
QString m_container;
private:
// Private constructor which generates an invalid object, for use withing CodecProfile::fromJson();
CodecProfile();
};
} // NS DTO
namespace Support {

View file

@ -47,7 +47,10 @@ namespace DTO {
class CollectionCreationResult {
public:
CollectionCreationResult();
CollectionCreationResult(
QString jellyfinId
);
CollectionCreationResult(const CollectionCreationResult &other);
/**
@ -68,8 +71,13 @@ public:
protected:
QString m_jellyfinId;
private:
// Private constructor which generates an invalid object, for use withing CollectionCreationResult::fromJson();
CollectionCreationResult();
};
} // NS DTO
namespace Support {

View file

@ -48,7 +48,11 @@ namespace DTO {
class ConfigurationPageInfo {
public:
ConfigurationPageInfo();
ConfigurationPageInfo(
bool enableInMainMenu,
ConfigurationPageType configurationPageType
);
ConfigurationPageInfo(const ConfigurationPageInfo &other);
/**
@ -139,8 +143,13 @@ protected:
QString m_displayName;
ConfigurationPageType m_configurationPageType;
QString m_pluginId;
private:
// Private constructor which generates an invalid object, for use withing ConfigurationPageInfo::fromJson();
ConfigurationPageInfo();
};
} // NS DTO
namespace Support {

View file

@ -51,7 +51,10 @@ namespace DTO {
class ContainerProfile {
public:
ContainerProfile();
ContainerProfile(
DlnaProfileType type
);
ContainerProfile(const ContainerProfile &other);
/**
@ -88,8 +91,13 @@ protected:
DlnaProfileType m_type;
QList<ProfileCondition> m_conditions;
QString m_container;
private:
// Private constructor which generates an invalid object, for use withing ContainerProfile::fromJson();
ContainerProfile();
};
} // NS DTO
namespace Support {

View file

@ -47,7 +47,10 @@ namespace DTO {
class ControlResponse {
public:
ControlResponse();
ControlResponse(
bool isSuccessful
);
ControlResponse(const ControlResponse &other);
/**
@ -84,8 +87,13 @@ protected:
QJsonObject m_headers;
QString m_xml;
bool m_isSuccessful;
private:
// Private constructor which generates an invalid object, for use withing ControlResponse::fromJson();
ControlResponse();
};
} // NS DTO
namespace Support {

View file

@ -46,8 +46,7 @@ namespace DTO {
class CountryInfo {
public:
CountryInfo();
public: CountryInfo();
CountryInfo(const CountryInfo &other);
/**
@ -110,8 +109,11 @@ protected:
QString m_displayName;
QString m_twoLetterISORegionName;
QString m_threeLetterISORegionName;
};
} // NS DTO
namespace Support {

View file

@ -48,8 +48,7 @@ namespace DTO {
class CreatePlaylistDto {
public:
CreatePlaylistDto();
public: CreatePlaylistDto();
CreatePlaylistDto(const CreatePlaylistDto &other);
/**
@ -112,8 +111,11 @@ protected:
QStringList m_ids;
QString m_userId;
QString m_mediaType;
};
} // NS DTO
namespace Support {

View file

@ -46,8 +46,7 @@ namespace DTO {
class CreateUserByName {
public:
CreateUserByName();
public: CreateUserByName();
CreateUserByName(const CreateUserByName &other);
/**
@ -86,8 +85,11 @@ public:
protected:
QString m_name;
QString m_password;
};
} // NS DTO
namespace Support {

View file

@ -48,8 +48,7 @@ namespace DTO {
class CultureDto {
public:
CultureDto();
public: CultureDto();
CultureDto(const CultureDto &other);
/**
@ -120,8 +119,11 @@ protected:
QString m_twoLetterISOLanguageName;
QString m_threeLetterISOLanguageName;
QStringList m_threeLetterISOLanguageNames;
};
} // NS DTO
namespace Support {

View file

@ -46,8 +46,7 @@ namespace DTO {
class DefaultDirectoryBrowserInfoDto {
public:
DefaultDirectoryBrowserInfoDto();
public: DefaultDirectoryBrowserInfoDto();
DefaultDirectoryBrowserInfoDto(const DefaultDirectoryBrowserInfoDto &other);
/**
@ -74,8 +73,11 @@ public:
protected:
QString m_path;
};
} // NS DTO
namespace Support {

View file

@ -49,8 +49,7 @@ namespace DTO {
class DeviceIdentification {
public:
DeviceIdentification();
public: DeviceIdentification();
DeviceIdentification(const DeviceIdentification &other);
/**
@ -173,8 +172,11 @@ protected:
QString m_manufacturer;
QString m_manufacturerUrl;
QList<HttpHeaderInfo> m_headers;
};
} // NS DTO
namespace Support {

View file

@ -50,7 +50,12 @@ namespace DTO {
class DeviceInfo {
public:
DeviceInfo();
DeviceInfo(
QString lastUserId,
QDateTime dateLastActivity,
QSharedPointer<ClientCapabilities> capabilities
);
DeviceInfo(const DeviceInfo &other);
/**
@ -155,8 +160,13 @@ protected:
QDateTime m_dateLastActivity;
QSharedPointer<ClientCapabilities> m_capabilities = QSharedPointer<ClientCapabilities>();
QString m_iconUrl;
private:
// Private constructor which generates an invalid object, for use withing DeviceInfo::fromJson();
DeviceInfo();
};
} // NS DTO
namespace Support {

View file

@ -49,7 +49,11 @@ namespace DTO {
class DeviceInfoQueryResult {
public:
DeviceInfoQueryResult();
DeviceInfoQueryResult(
qint32 totalRecordCount,
qint32 startIndex
);
DeviceInfoQueryResult(const DeviceInfoQueryResult &other);
/**
@ -96,8 +100,13 @@ protected:
QList<DeviceInfo> m_items;
qint32 m_totalRecordCount;
qint32 m_startIndex;
private:
// Private constructor which generates an invalid object, for use withing DeviceInfoQueryResult::fromJson();
DeviceInfoQueryResult();
};
} // NS DTO
namespace Support {

View file

@ -46,8 +46,7 @@ namespace DTO {
class DeviceOptions {
public:
DeviceOptions();
public: DeviceOptions();
DeviceOptions(const DeviceOptions &other);
/**
@ -70,8 +69,11 @@ public:
protected:
QString m_customName;
};
} // NS DTO
namespace Support {

View file

@ -58,7 +58,20 @@ namespace DTO {
class DeviceProfile {
public:
DeviceProfile();
DeviceProfile(
QSharedPointer<DeviceIdentification> identification,
bool enableAlbumArtInDidl,
bool enableSingleAlbumArtLimit,
bool enableSingleSubtitleLimit,
qint32 maxAlbumArtWidth,
qint32 maxAlbumArtHeight,
qint32 timelineOffsetSeconds,
bool requiresPlainVideoItems,
bool requiresPlainFolders,
bool enableMSMediaReceiverRegistrar,
bool ignoreTranscodeByteRangeRequests
);
DeviceProfile(const DeviceProfile &other);
/**
@ -515,8 +528,13 @@ protected:
QList<CodecProfile> m_codecProfiles;
QList<ResponseProfile> m_responseProfiles;
QList<SubtitleProfile> m_subtitleProfiles;
private:
// Private constructor which generates an invalid object, for use withing DeviceProfile::fromJson();
DeviceProfile();
};
} // NS DTO
namespace Support {

View file

@ -48,7 +48,10 @@ namespace DTO {
class DeviceProfileInfo {
public:
DeviceProfileInfo();
DeviceProfileInfo(
DeviceProfileType type
);
DeviceProfileInfo(const DeviceProfileInfo &other);
/**
@ -93,8 +96,13 @@ protected:
QString m_jellyfinId;
QString m_name;
DeviceProfileType m_type;
private:
// Private constructor which generates an invalid object, for use withing DeviceProfileInfo::fromJson();
DeviceProfileInfo();
};
} // NS DTO
namespace Support {

View file

@ -48,7 +48,10 @@ namespace DTO {
class DirectPlayProfile {
public:
DirectPlayProfile();
DirectPlayProfile(
DlnaProfileType type
);
DirectPlayProfile(const DirectPlayProfile &other);
/**
@ -93,8 +96,13 @@ protected:
QString m_audioCodec;
QString m_videoCodec;
DlnaProfileType m_type;
private:
// Private constructor which generates an invalid object, for use withing DirectPlayProfile::fromJson();
DirectPlayProfile();
};
} // NS DTO
namespace Support {

View file

@ -49,7 +49,17 @@ namespace DTO {
class DisplayPreferencesDto {
public:
DisplayPreferencesDto();
DisplayPreferencesDto(
bool rememberIndexing,
qint32 primaryImageHeight,
qint32 primaryImageWidth,
ScrollDirection scrollDirection,
bool showBackdrop,
bool rememberSorting,
SortOrder sortOrder,
bool showSidebar
);
DisplayPreferencesDto(const DisplayPreferencesDto &other);
/**
@ -208,8 +218,13 @@ protected:
SortOrder m_sortOrder;
bool m_showSidebar;
QString m_client;
private:
// Private constructor which generates an invalid object, for use withing DisplayPreferencesDto::fromJson();
DisplayPreferencesDto();
};
} // NS DTO
namespace Support {

View file

@ -46,7 +46,11 @@ namespace DTO {
class EndPointInfo {
public:
EndPointInfo();
EndPointInfo(
bool isLocal,
bool isInNetwork
);
EndPointInfo(const EndPointInfo &other);
/**
@ -73,8 +77,13 @@ public:
protected:
bool m_isLocal;
bool m_isInNetwork;
private:
// Private constructor which generates an invalid object, for use withing EndPointInfo::fromJson();
EndPointInfo();
};
} // NS DTO
namespace Support {

View file

@ -48,7 +48,10 @@ namespace DTO {
class ExternalIdInfo {
public:
ExternalIdInfo();
ExternalIdInfo(
ExternalIdMediaType type
);
ExternalIdInfo(const ExternalIdInfo &other);
/**
@ -105,8 +108,13 @@ protected:
QString m_key;
ExternalIdMediaType m_type;
QString m_urlFormatString;
private:
// Private constructor which generates an invalid object, for use withing ExternalIdInfo::fromJson();
ExternalIdInfo();
};
} // NS DTO
namespace Support {

View file

@ -46,8 +46,7 @@ namespace DTO {
class ExternalUrl {
public:
ExternalUrl();
public: ExternalUrl();
ExternalUrl(const ExternalUrl &other);
/**
@ -86,8 +85,11 @@ public:
protected:
QString m_name;
QString m_url;
};
} // NS DTO
namespace Support {

View file

@ -48,7 +48,10 @@ namespace DTO {
class FileSystemEntryInfo {
public:
FileSystemEntryInfo();
FileSystemEntryInfo(
FileSystemEntryType type
);
FileSystemEntryInfo(const FileSystemEntryInfo &other);
/**
@ -93,8 +96,13 @@ protected:
QString m_name;
QString m_path;
FileSystemEntryType m_type;
private:
// Private constructor which generates an invalid object, for use withing FileSystemEntryInfo::fromJson();
FileSystemEntryInfo();
};
} // NS DTO
namespace Support {

View file

@ -48,7 +48,12 @@ namespace DTO {
class FontFile {
public:
FontFile();
FontFile(
qint64 size,
QDateTime dateCreated,
QDateTime dateModified
);
FontFile(const FontFile &other);
/**
@ -105,8 +110,13 @@ protected:
qint64 m_size;
QDateTime m_dateCreated;
QDateTime m_dateModified;
private:
// Private constructor which generates an invalid object, for use withing FontFile::fromJson();
FontFile();
};
} // NS DTO
namespace Support {

View file

@ -47,7 +47,10 @@ namespace DTO {
class ForgotPasswordDto {
public:
ForgotPasswordDto();
ForgotPasswordDto(
QString enteredUsername
);
ForgotPasswordDto(const ForgotPasswordDto &other);
/**
@ -72,8 +75,13 @@ public:
protected:
QString m_enteredUsername;
private:
// Private constructor which generates an invalid object, for use withing ForgotPasswordDto::fromJson();
ForgotPasswordDto();
};
} // NS DTO
namespace Support {

View file

@ -49,7 +49,10 @@ namespace DTO {
class ForgotPasswordResult {
public:
ForgotPasswordResult();
ForgotPasswordResult(
ForgotPasswordAction action
);
ForgotPasswordResult(const ForgotPasswordResult &other);
/**
@ -94,8 +97,13 @@ protected:
ForgotPasswordAction m_action;
QString m_pinFile;
QDateTime m_pinExpirationDate;
private:
// Private constructor which generates an invalid object, for use withing ForgotPasswordResult::fromJson();
ForgotPasswordResult();
};
} // NS DTO
namespace Support {

View file

@ -48,7 +48,11 @@ namespace DTO {
class GeneralCommand {
public:
GeneralCommand();
GeneralCommand(
GeneralCommandType name,
QString controllingUserId
);
GeneralCommand(const GeneralCommand &other);
/**
@ -83,8 +87,13 @@ protected:
GeneralCommandType m_name;
QString m_controllingUserId;
QJsonObject m_arguments;
private:
// Private constructor which generates an invalid object, for use withing GeneralCommand::fromJson();
GeneralCommand();
};
} // NS DTO
namespace Support {

View file

@ -52,7 +52,12 @@ namespace DTO {
class GetProgramsDto {
public:
GetProgramsDto();
GetProgramsDto(
QString userId,
bool enableTotalRecordCount,
QString librarySeriesId
);
GetProgramsDto(const GetProgramsDto &other);
/**
@ -427,8 +432,13 @@ protected:
QString m_seriesTimerId;
QString m_librarySeriesId;
QList<ItemFields> m_fields;
private:
// Private constructor which generates an invalid object, for use withing GetProgramsDto::fromJson();
GetProgramsDto();
};
} // NS DTO
namespace Support {

View file

@ -51,7 +51,12 @@ namespace DTO {
class GroupInfoDto {
public:
GroupInfoDto();
GroupInfoDto(
QString groupId,
GroupStateType state,
QDateTime lastUpdatedAt
);
GroupInfoDto(const GroupInfoDto &other);
/**
@ -116,8 +121,13 @@ protected:
GroupStateType m_state;
QStringList m_participants;
QDateTime m_lastUpdatedAt;
private:
// Private constructor which generates an invalid object, for use withing GroupInfoDto::fromJson();
GroupInfoDto();
};
} // NS DTO
namespace Support {

View file

@ -47,7 +47,11 @@ namespace DTO {
class GuideInfo {
public:
GuideInfo();
GuideInfo(
QDateTime startDate,
QDateTime endDate
);
GuideInfo(const GuideInfo &other);
/**
@ -82,8 +86,13 @@ public:
protected:
QDateTime m_startDate;
QDateTime m_endDate;
private:
// Private constructor which generates an invalid object, for use withing GuideInfo::fromJson();
GuideInfo();
};
} // NS DTO
namespace Support {

View file

@ -48,7 +48,10 @@ namespace DTO {
class HttpHeaderInfo {
public:
HttpHeaderInfo();
HttpHeaderInfo(
HeaderMatchType match
);
HttpHeaderInfo(const HttpHeaderInfo &other);
/**
@ -85,8 +88,13 @@ protected:
QString m_name;
QString m_value;
HeaderMatchType m_match;
private:
// Private constructor which generates an invalid object, for use withing HttpHeaderInfo::fromJson();
HttpHeaderInfo();
};
} // NS DTO
namespace Support {

View file

@ -46,7 +46,10 @@ namespace DTO {
class IgnoreWaitRequestDto {
public:
IgnoreWaitRequestDto();
IgnoreWaitRequestDto(
bool ignoreWait
);
IgnoreWaitRequestDto(const IgnoreWaitRequestDto &other);
/**
@ -71,8 +74,13 @@ public:
protected:
bool m_ignoreWait;
private:
// Private constructor which generates an invalid object, for use withing IgnoreWaitRequestDto::fromJson();
IgnoreWaitRequestDto();
};
} // NS DTO
namespace Support {

View file

@ -47,7 +47,10 @@ namespace DTO {
class ImageByNameInfo {
public:
ImageByNameInfo();
ImageByNameInfo(
qint64 fileLength
);
ImageByNameInfo(const ImageByNameInfo &other);
/**
@ -120,8 +123,13 @@ protected:
QString m_context;
qint64 m_fileLength;
QString m_format;
private:
// Private constructor which generates an invalid object, for use withing ImageByNameInfo::fromJson();
ImageByNameInfo();
};
} // NS DTO
namespace Support {

View file

@ -48,7 +48,11 @@ namespace DTO {
class ImageInfo {
public:
ImageInfo();
ImageInfo(
ImageType imageType,
qint64 size
);
ImageInfo(const ImageInfo &other);
/**
@ -151,8 +155,13 @@ protected:
std::optional<qint32> m_height = std::nullopt;
std::optional<qint32> m_width = std::nullopt;
qint64 m_size;
private:
// Private constructor which generates an invalid object, for use withing ImageInfo::fromJson();
ImageInfo();
};
} // NS DTO
namespace Support {

View file

@ -47,7 +47,12 @@ namespace DTO {
class ImageOption {
public:
ImageOption();
ImageOption(
ImageType type,
qint32 limit,
qint32 minWidth
);
ImageOption(const ImageOption &other);
/**
@ -88,8 +93,13 @@ protected:
ImageType m_type;
qint32 m_limit;
qint32 m_minWidth;
private:
// Private constructor which generates an invalid object, for use withing ImageOption::fromJson();
ImageOption();
};
} // NS DTO
namespace Support {

View file

@ -49,8 +49,7 @@ namespace DTO {
class ImageProviderInfo {
public:
ImageProviderInfo();
public: ImageProviderInfo();
ImageProviderInfo(const ImageProviderInfo &other);
/**
@ -89,8 +88,11 @@ public:
protected:
QString m_name;
QList<ImageType> m_supportedImages;
};
} // NS DTO
namespace Support {

View file

@ -49,7 +49,11 @@ namespace DTO {
class InstallationInfo {
public:
InstallationInfo();
InstallationInfo(
QString guid,
QSharedPointer<Version> version
);
InstallationInfo(const InstallationInfo &other);
/**
@ -128,8 +132,13 @@ protected:
QString m_changelog;
QString m_sourceUrl;
QString m_checksum;
private:
// Private constructor which generates an invalid object, for use withing InstallationInfo::fromJson();
InstallationInfo();
};
} // NS DTO
namespace Support {

View file

@ -49,7 +49,12 @@ namespace DTO {
class IPlugin {
public:
IPlugin();
IPlugin(
QString jellyfinId,
QSharedPointer<Version> version,
bool canUninstall
);
IPlugin(const IPlugin &other);
/**
@ -138,8 +143,13 @@ protected:
QString m_assemblyFilePath;
bool m_canUninstall;
QString m_dataFolderPath;
private:
// Private constructor which generates an invalid object, for use withing IPlugin::fromJson();
IPlugin();
};
} // NS DTO
namespace Support {

View file

@ -46,7 +46,21 @@ namespace DTO {
class ItemCounts {
public:
ItemCounts();
ItemCounts(
qint32 movieCount,
qint32 seriesCount,
qint32 episodeCount,
qint32 artistCount,
qint32 programCount,
qint32 trailerCount,
qint32 songCount,
qint32 albumCount,
qint32 musicVideoCount,
qint32 boxSetCount,
qint32 bookCount,
qint32 itemCount
);
ItemCounts(const ItemCounts &other);
/**
@ -181,8 +195,13 @@ protected:
qint32 m_boxSetCount;
qint32 m_bookCount;
qint32 m_itemCount;
private:
// Private constructor which generates an invalid object, for use withing ItemCounts::fromJson();
ItemCounts();
};
} // NS DTO
namespace Support {

View file

@ -47,7 +47,10 @@ namespace DTO {
class JoinGroupRequestDto {
public:
JoinGroupRequestDto();
JoinGroupRequestDto(
QString groupId
);
JoinGroupRequestDto(const JoinGroupRequestDto &other);
/**
@ -72,8 +75,13 @@ public:
protected:
QString m_groupId;
private:
// Private constructor which generates an invalid object, for use withing JoinGroupRequestDto::fromJson();
JoinGroupRequestDto();
};
} // NS DTO
namespace Support {

View file

@ -47,7 +47,10 @@ namespace DTO {
class LibraryOptionInfoDto {
public:
LibraryOptionInfoDto();
LibraryOptionInfoDto(
bool defaultEnabled
);
LibraryOptionInfoDto(const LibraryOptionInfoDto &other);
/**
@ -84,8 +87,13 @@ public:
protected:
QString m_name;
bool m_defaultEnabled;
private:
// Private constructor which generates an invalid object, for use withing LibraryOptionInfoDto::fromJson();
LibraryOptionInfoDto();
};
} // NS DTO
namespace Support {

View file

@ -51,7 +51,23 @@ namespace DTO {
class LibraryOptions {
public:
LibraryOptions();
LibraryOptions(
bool enablePhotos,
bool enableRealtimeMonitor,
bool enableChapterImageExtraction,
bool extractChapterImagesDuringLibraryScan,
bool saveLocalMetadata,
bool enableInternetProviders,
bool enableAutomaticSeriesGrouping,
bool enableEmbeddedTitles,
bool enableEmbeddedEpisodeInfos,
qint32 automaticRefreshIntervalDays,
bool skipSubtitlesIfEmbeddedSubtitlesPresent,
bool skipSubtitlesIfAudioTrackMatches,
bool requirePerfectSubtitleMatch,
bool saveSubtitlesWithMedia
);
LibraryOptions(const LibraryOptions &other);
/**
@ -246,8 +262,13 @@ protected:
bool m_requirePerfectSubtitleMatch;
bool m_saveSubtitlesWithMedia;
QList<TypeOptions> m_typeOptions;
private:
// Private constructor which generates an invalid object, for use withing LibraryOptions::fromJson();
LibraryOptions();
};
} // NS DTO
namespace Support {

View file

@ -49,8 +49,7 @@ namespace DTO {
class LibraryOptionsResultDto {
public:
LibraryOptionsResultDto();
public: LibraryOptionsResultDto();
LibraryOptionsResultDto(const LibraryOptionsResultDto &other);
/**
@ -113,8 +112,11 @@ protected:
QList<LibraryOptionInfoDto> m_metadataReaders;
QList<LibraryOptionInfoDto> m_subtitleFetchers;
QList<LibraryTypeOptionsDto> m_typeOptions;
};
} // NS DTO
namespace Support {

View file

@ -51,8 +51,7 @@ namespace DTO {
class LibraryTypeOptionsDto {
public:
LibraryTypeOptionsDto();
public: LibraryTypeOptionsDto();
LibraryTypeOptionsDto(const LibraryTypeOptionsDto &other);
/**
@ -127,8 +126,11 @@ protected:
QList<LibraryOptionInfoDto> m_imageFetchers;
QList<ImageType> m_supportedImageTypes;
QList<ImageOption> m_defaultImageOptions;
};
} // NS DTO
namespace Support {

View file

@ -49,7 +49,10 @@ namespace DTO {
class LibraryUpdateInfo {
public:
LibraryUpdateInfo();
LibraryUpdateInfo(
bool isEmpty
);
LibraryUpdateInfo(const LibraryUpdateInfo &other);
/**
@ -138,8 +141,13 @@ protected:
QStringList m_itemsUpdated;
QStringList m_collectionFolders;
bool m_isEmpty;
private:
// Private constructor which generates an invalid object, for use withing LibraryUpdateInfo::fromJson();
LibraryUpdateInfo();
};
} // NS DTO
namespace Support {

View file

@ -50,7 +50,10 @@ namespace DTO {
class ListingsProviderInfo {
public:
ListingsProviderInfo();
ListingsProviderInfo(
bool enableAllTuners
);
ListingsProviderInfo(const ListingsProviderInfo &other);
/**
@ -207,8 +210,13 @@ protected:
QString m_moviePrefix;
QString m_preferredLanguage;
QString m_userAgent;
private:
// Private constructor which generates an invalid object, for use withing ListingsProviderInfo::fromJson();
ListingsProviderInfo();
};
} // NS DTO
namespace Support {

View file

@ -48,7 +48,10 @@ namespace DTO {
class LiveStreamResponse {
public:
LiveStreamResponse();
LiveStreamResponse(
QSharedPointer<MediaSourceInfo> mediaSource
);
LiveStreamResponse(const LiveStreamResponse &other);
/**
@ -69,8 +72,13 @@ public:
protected:
QSharedPointer<MediaSourceInfo> m_mediaSource = QSharedPointer<MediaSourceInfo>();
private:
// Private constructor which generates an invalid object, for use withing LiveStreamResponse::fromJson();
LiveStreamResponse();
};
} // NS DTO
namespace Support {

View file

@ -49,7 +49,10 @@ namespace DTO {
class LiveTvInfo {
public:
LiveTvInfo();
LiveTvInfo(
bool isEnabled
);
LiveTvInfo(const LiveTvInfo &other);
/**
@ -98,8 +101,13 @@ protected:
QList<LiveTvServiceInfo> m_services;
bool m_isEnabled;
QStringList m_enabledUsers;
private:
// Private constructor which generates an invalid object, for use withing LiveTvInfo::fromJson();
LiveTvInfo();
};
} // NS DTO
namespace Support {

View file

@ -50,7 +50,12 @@ namespace DTO {
class LiveTvServiceInfo {
public:
LiveTvServiceInfo();
LiveTvServiceInfo(
LiveTvServiceStatus status,
bool hasUpdateAvailable,
bool isVisible
);
LiveTvServiceInfo(const LiveTvServiceInfo &other);
/**
@ -147,8 +152,13 @@ protected:
bool m_hasUpdateAvailable;
bool m_isVisible;
QStringList m_tuners;
private:
// Private constructor which generates an invalid object, for use withing LiveTvServiceInfo::fromJson();
LiveTvServiceInfo();
};
} // NS DTO
namespace Support {

View file

@ -46,8 +46,7 @@ namespace DTO {
class LocalizationOption {
public:
LocalizationOption();
public: LocalizationOption();
LocalizationOption(const LocalizationOption &other);
/**
@ -78,8 +77,11 @@ public:
protected:
QString m_name;
QString m_value;
};
} // NS DTO
namespace Support {

View file

@ -48,7 +48,12 @@ namespace DTO {
class LogFile {
public:
LogFile();
LogFile(
QDateTime dateCreated,
QDateTime dateModified,
qint64 size
);
LogFile(const LogFile &other);
/**
@ -105,8 +110,13 @@ protected:
QDateTime m_dateModified;
qint64 m_size;
QString m_name;
private:
// Private constructor which generates an invalid object, for use withing LogFile::fromJson();
LogFile();
};
} // NS DTO
namespace Support {

View file

@ -47,7 +47,10 @@ namespace DTO {
class MediaAttachment {
public:
MediaAttachment();
MediaAttachment(
qint32 index
);
MediaAttachment(const MediaAttachment &other);
/**
@ -144,8 +147,13 @@ protected:
QString m_fileName;
QString m_mimeType;
QString m_deliveryUrl;
private:
// Private constructor which generates an invalid object, for use withing MediaAttachment::fromJson();
MediaAttachment();
};
} // NS DTO
namespace Support {

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