@@ -608,6 +608,17 @@ def test_video_Movie_extras(movies):
608608 assert extra .type == 'clip'
609609 assert extra .section () == movies
610610
611+ def test_video_Movie_PlexWebURL (plex , movie ):
612+ url = movie .getWebURL ()
613+ assert url .startswith ('https://app.plex.tv/desktop' )
614+ assert plex .machineIdentifier in url
615+ assert 'details' in url
616+ assert quote_plus (movie .key ) in url
617+ # Test a different base
618+ base = 'https://doesnotexist.com/plex'
619+ url = movie .getWebURL (base = base )
620+ assert url .startswith (base )
621+
611622
612623def test_video_Show_attrs (show ):
613624 assert utils .is_datetime (show .addedAt )
@@ -801,6 +812,14 @@ def test_video_Show_media_tags(show):
801812 test_media .tag_similar (show )
802813
803814
815+ def test_video_Show_PlexWebURL (plex , show ):
816+ url = show .getWebURL ()
817+ assert url .startswith ('https://app.plex.tv/desktop' )
818+ assert plex .machineIdentifier in url
819+ assert 'details' in url
820+ assert quote_plus (show .key ) in url
821+
822+
804823def test_video_Season (show ):
805824 seasons = show .seasons ()
806825 assert len (seasons ) == 2
@@ -912,6 +931,14 @@ def test_video_Season_mixins_tags(show):
912931 test_mixins .edit_collection (season )
913932
914933
934+ def test_video_Season_PlexWebURL (plex , season ):
935+ url = season .getWebURL ()
936+ assert url .startswith ('https://app.plex.tv/desktop' )
937+ assert plex .machineIdentifier in url
938+ assert 'details' in url
939+ assert quote_plus (season .key ) in url
940+
941+
915942def test_video_Episode_updateProgress (episode , patched_http_call ):
916943 episode .updateProgress (2 * 60 * 1000 ) # 2 minutes.
917944
@@ -1119,6 +1146,14 @@ def test_video_Episode_media_tags(episode):
11191146 test_media .tag_writer (episode )
11201147
11211148
1149+ def test_video_Episode_PlexWebURL (plex , episode ):
1150+ url = episode .getWebURL ()
1151+ assert url .startswith ('https://app.plex.tv/desktop' )
1152+ assert plex .machineIdentifier in url
1153+ assert 'details' in url
1154+ assert quote_plus (episode .key ) in url
1155+
1156+
11221157def test_that_reload_return_the_same_object (plex ):
11231158 # we want to check this that all the urls are correct
11241159 movie_library_search = plex .library .section ("Movies" ).search ("Elephants Dream" )[0 ]
0 commit comments