chore: update to edition 2024; update packages; rename some stuff
This commit is contained in:
parent
82e52bc8f9
commit
275d249320
48 changed files with 359 additions and 208 deletions
|
|
@ -4,12 +4,12 @@ use gpodder::AuthErr;
|
|||
|
||||
use super::SqliteRepository;
|
||||
use crate::{
|
||||
DbError,
|
||||
models::{
|
||||
session::Session,
|
||||
user::{NewUser, User},
|
||||
},
|
||||
schema::*,
|
||||
DbError,
|
||||
};
|
||||
|
||||
impl From<User> for gpodder::User {
|
||||
|
|
|
|||
|
|
@ -6,12 +6,12 @@ use gpodder::AuthErr;
|
|||
|
||||
use super::SqliteRepository;
|
||||
use crate::{
|
||||
DbError,
|
||||
models::{
|
||||
device::{Device, DeviceType, NewDevice},
|
||||
sync_group::SyncGroup,
|
||||
},
|
||||
schema::*,
|
||||
DbError,
|
||||
};
|
||||
|
||||
impl From<DeviceType> for gpodder::DeviceType {
|
||||
|
|
@ -157,10 +157,9 @@ impl gpodder::DeviceRepository for SqliteRepository {
|
|||
.execute(conn)?;
|
||||
|
||||
// Add the non-synchronized devices into the new sync group
|
||||
let unsynced_device_ids =
|
||||
devices.iter().filter_map(
|
||||
|(id, group_id)| if group_id.is_none() { Some(id) } else { None },
|
||||
);
|
||||
let unsynced_device_ids = devices
|
||||
.iter()
|
||||
.filter_map(|(id, group_id)| if group_id.is_none() { Some(id) } else { None });
|
||||
|
||||
diesel::update(devices::table.filter(devices::id.eq_any(unsynced_device_ids)))
|
||||
.set(devices::sync_group_id.eq(sync_group_id))
|
||||
|
|
|
|||
|
|
@ -4,12 +4,12 @@ use gpodder::AuthErr;
|
|||
|
||||
use super::SqliteRepository;
|
||||
use crate::{
|
||||
DbError,
|
||||
models::{
|
||||
device::Device,
|
||||
episode_action::{ActionType, EpisodeAction, NewEpisodeAction},
|
||||
},
|
||||
schema::*,
|
||||
DbError,
|
||||
};
|
||||
|
||||
impl From<gpodder::EpisodeAction> for NewEpisodeAction {
|
||||
|
|
|
|||
|
|
@ -6,9 +6,9 @@ use gpodder::AuthErr;
|
|||
|
||||
use super::SqliteRepository;
|
||||
use crate::{
|
||||
DbError,
|
||||
models::device_subscription::{DeviceSubscription, NewDeviceSubscription},
|
||||
schema::*,
|
||||
DbError,
|
||||
};
|
||||
|
||||
fn set_subscriptions_for_single_device(
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue