Skip to content

Commit

Permalink
Add connector for copyparty (#3616)
Browse files Browse the repository at this point in the history
* Add connector for copyparty

* Refactor copyparty connector:

* better np_url retrieval

* Update copyparty connector:

* actually retrieve np_url
  • Loading branch information
9001 committed Apr 5, 2023
1 parent e30f91f commit 0aba5ee
Show file tree
Hide file tree
Showing 2 changed files with 23 additions and 0 deletions.
17 changes: 17 additions & 0 deletions src/connectors/copyparty.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
export {};

Connector.playerSelector = '#np_inf';
Connector.pauseButtonSelector = '#np_inf.playing';

Connector.trackArtSelector = '#np_img';
Connector.albumArtistSelector = '#np_circle';
Connector.albumSelector = '#np_album';
Connector.artistSelector = '#np_artist';
Connector.trackSelector = '#np_title';

Connector.currentTimeSelector = '#np_pos';
Connector.durationSelector = '#np_dur';

Connector.getUniqueID = () => {
return Util.getTextFromSelectors('#np_url');
};
6 changes: 6 additions & 0 deletions src/core/connectors.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2088,4 +2088,10 @@ export default <ConnectorMeta[]>[
js: 'rockantenne.js',
id: 'rockantenne',
},
{
label: 'copyparty',
matches: ['*://127.0.0.1:3923/*', '*://a.ocv.me/*'],
js: 'copyparty.js',
id: 'copyparty',
},
];

0 comments on commit 0aba5ee

Please sign in to comment.