Commit dcef698 1 parent 4b7fc11 commit dcef698 Copy full SHA for dcef698
File tree 3 files changed +13
-5
lines changed
3 files changed +13
-5
lines changed Original file line number Diff line number Diff line change @@ -193,6 +193,8 @@ pub struct PlexContext {
193
193
// host of the proxy server
194
194
#[ salvo( extract( rename = "host" ) ) ]
195
195
pub host : Option < String > ,
196
+ // #[salvo(extract(rename = "scheme"))]
197
+ // pub scheme: Option<String>,
196
198
// photo transcode
197
199
pub size : Option < String > ,
198
200
pub width : Option < i32 > ,
Original file line number Diff line number Diff line change @@ -323,7 +323,6 @@ async fn ntf_watchlist_force(
323
323
// use memory_stats::memory_stats;
324
324
// dbg!(memory_stats().unwrap().physical_mem / 1024 / 1000);
325
325
let params: PlexContext = req. extract ( ) . await . unwrap ( ) ;
326
- dbg ! ( & req) ;
327
326
if params. clone ( ) . token . is_some ( ) {
328
327
tokio:: spawn ( async move {
329
328
let url = format ! ( "https://notifications.plex.tv/api/v1/notifications/settings?X-Plex-Token={}" , params. clone( ) . token. unwrap( ) ) ;
Original file line number Diff line number Diff line change @@ -797,12 +797,19 @@ impl Transform for MediaStyleTransform {
797
797
if guid. starts_with ( "plex://episode" ) && item. parent_guid . is_some ( ) {
798
798
guid = item. parent_guid . clone ( ) . unwrap ( ) ;
799
799
}
800
- guid = guid
801
- . replace ( "plex://" , "" ) ;
800
+ guid = guid. replace ( "plex://" , "" ) ;
802
801
803
802
//let cover_art = item.get_hero_art(plex_client).await;
804
- let cover_art = Some ( format ! ( "http://{}/image/hero/{}/{}" ,
805
- options. host. clone( ) . unwrap( ) ,
803
+ let cover_art = Some ( format ! ( "{}://{}/image/hero/{}/{}" ,
804
+ match options. forwarded_proto {
805
+ Some ( v) => v,
806
+ None => "http" . to_string( )
807
+ } ,
808
+ match options. forwarded_host {
809
+ Some ( v) => v,
810
+ None => options. host. clone( ) . unwrap( )
811
+ } ,
812
+ // options.host.clone().unwrap(),
806
813
guid,
807
814
options. token. clone( ) . unwrap( )
808
815
) ) ;
You can’t perform that action at this time.
0 commit comments